natArray.cc (newInstance): Don't allow array of `void' to be created.
* java/lang/reflect/natArray.cc (newInstance): Don't allow array of `void' to be created. From-SVN: r32443
This commit is contained in:
parent
0f72dc9e31
commit
c500e5ec9f
5 changed files with 68 additions and 24 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2000-03-08 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
|
* java/lang/reflect/natArray.cc (newInstance): Don't allow array
|
||||||
|
of `void' to be created.
|
||||||
|
|
||||||
2000-03-08 Warren Levy <warrenl@cygnus.com>
|
2000-03-08 Warren Levy <warrenl@cygnus.com>
|
||||||
|
|
||||||
* java/math/BigInteger.java(signum): Handle zero properly.
|
* java/math/BigInteger.java(signum): Handle zero properly.
|
||||||
|
|
|
@ -735,14 +735,15 @@ CCLD = $(CC)
|
||||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||||
DATA = $(data_DATA) $(toolexeclib_DATA)
|
DATA = $(data_DATA) $(toolexeclib_DATA)
|
||||||
|
|
||||||
DIST_COMMON = README COPYING.LIB ChangeLog Makefile.am Makefile.in NEWS \
|
DIST_COMMON = README COPYING ChangeLog Makefile.am Makefile.in NEWS \
|
||||||
THANKS acinclude.m4 aclocal.m4 configure configure.in \
|
THANKS acconfig.h acinclude.m4 aclocal.m4 configure configure.in \
|
||||||
libgcj-test.spec.in libgcj.spec.in
|
include/config.h.in include/stamp-h.in libgcj-test.spec.in \
|
||||||
|
libgcj.spec.in
|
||||||
|
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
TAR = gtar
|
TAR = tar
|
||||||
GZIP_ENV = --best
|
GZIP_ENV = --best
|
||||||
DIST_SUBDIRS = @DIRLTDL@ testsuite gcj include @DIRLTDL@ gcj include
|
DIST_SUBDIRS = @DIRLTDL@ testsuite gcj include @DIRLTDL@ gcj include
|
||||||
DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
|
DEP_FILES = .deps/$(srcdir)/$(CONVERT_DIR)/gen-from-JIS.P \
|
||||||
|
@ -963,6 +964,34 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
$(SHELL) ./config.status --recheck
|
$(SHELL) ./config.status --recheck
|
||||||
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||||
cd $(srcdir) && $(AUTOCONF)
|
cd $(srcdir) && $(AUTOCONF)
|
||||||
|
|
||||||
|
include/config.h: include/stamp-h
|
||||||
|
@if test ! -f $@; then \
|
||||||
|
rm -f include/stamp-h; \
|
||||||
|
$(MAKE) include/stamp-h; \
|
||||||
|
else :; fi
|
||||||
|
include/stamp-h: $(srcdir)/include/config.h.in $(top_builddir)/config.status
|
||||||
|
cd $(top_builddir) \
|
||||||
|
&& CONFIG_FILES= CONFIG_HEADERS=include/config.h \
|
||||||
|
$(SHELL) ./config.status
|
||||||
|
@echo timestamp > include/stamp-h 2> /dev/null
|
||||||
|
$(srcdir)/include/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/include/stamp-h.in
|
||||||
|
@if test ! -f $@; then \
|
||||||
|
rm -f $(srcdir)/include/stamp-h.in; \
|
||||||
|
$(MAKE) $(srcdir)/include/stamp-h.in; \
|
||||||
|
else :; fi
|
||||||
|
$(srcdir)/include/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
|
||||||
|
cd $(top_srcdir) && $(AUTOHEADER)
|
||||||
|
@echo timestamp > $(srcdir)/include/stamp-h.in 2> /dev/null
|
||||||
|
|
||||||
|
mostlyclean-hdr:
|
||||||
|
|
||||||
|
clean-hdr:
|
||||||
|
|
||||||
|
distclean-hdr:
|
||||||
|
-rm -f include/config.h
|
||||||
|
|
||||||
|
maintainer-clean-hdr:
|
||||||
libgcj.spec: $(top_builddir)/config.status libgcj.spec.in
|
libgcj.spec: $(top_builddir)/config.status libgcj.spec.in
|
||||||
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
libgcj-test.spec: $(top_builddir)/config.status libgcj-test.spec.in
|
libgcj-test.spec: $(top_builddir)/config.status libgcj-test.spec.in
|
||||||
|
@ -1288,7 +1317,7 @@ distdir: $(DISTFILES)
|
||||||
@for file in $(DISTFILES); do \
|
@for file in $(DISTFILES); do \
|
||||||
d=$(srcdir); \
|
d=$(srcdir); \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
cp -pr $$/$$file $(distdir)/$$file; \
|
||||||
else \
|
else \
|
||||||
test -f $(distdir)/$$file \
|
test -f $(distdir)/$$file \
|
||||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||||
|
@ -1403,31 +1432,33 @@ distclean-generic:
|
||||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||||
|
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
mostlyclean-am: mostlyclean-toolexeclibLIBRARIES mostlyclean-compile \
|
mostlyclean-am: mostlyclean-hdr mostlyclean-toolexeclibLIBRARIES \
|
||||||
mostlyclean-libtool mostlyclean-toolexeclibLTLIBRARIES \
|
mostlyclean-compile mostlyclean-libtool \
|
||||||
|
mostlyclean-toolexeclibLTLIBRARIES \
|
||||||
mostlyclean-binPROGRAMS mostlyclean-noinstPROGRAMS \
|
mostlyclean-binPROGRAMS mostlyclean-noinstPROGRAMS \
|
||||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||||
|
|
||||||
mostlyclean: mostlyclean-recursive
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
clean-am: clean-toolexeclibLIBRARIES clean-compile clean-libtool \
|
clean-am: clean-hdr clean-toolexeclibLIBRARIES clean-compile \
|
||||||
clean-toolexeclibLTLIBRARIES clean-binPROGRAMS \
|
clean-libtool clean-toolexeclibLTLIBRARIES \
|
||||||
clean-noinstPROGRAMS clean-tags clean-depend \
|
clean-binPROGRAMS clean-noinstPROGRAMS clean-tags \
|
||||||
clean-generic mostlyclean-am clean-local
|
clean-depend clean-generic mostlyclean-am clean-local
|
||||||
|
|
||||||
clean: clean-recursive
|
clean: clean-recursive
|
||||||
|
|
||||||
distclean-am: distclean-toolexeclibLIBRARIES distclean-compile \
|
distclean-am: distclean-hdr distclean-toolexeclibLIBRARIES \
|
||||||
distclean-libtool distclean-toolexeclibLTLIBRARIES \
|
distclean-compile distclean-libtool \
|
||||||
distclean-binPROGRAMS distclean-noinstPROGRAMS \
|
distclean-toolexeclibLTLIBRARIES distclean-binPROGRAMS \
|
||||||
distclean-tags distclean-depend distclean-generic \
|
distclean-noinstPROGRAMS distclean-tags \
|
||||||
clean-am
|
distclean-depend distclean-generic clean-am
|
||||||
-rm -f libtool
|
-rm -f libtool
|
||||||
|
|
||||||
distclean: distclean-recursive
|
distclean: distclean-recursive
|
||||||
-rm -f config.status
|
-rm -f config.status
|
||||||
|
|
||||||
maintainer-clean-am: maintainer-clean-toolexeclibLIBRARIES \
|
maintainer-clean-am: maintainer-clean-hdr \
|
||||||
|
maintainer-clean-toolexeclibLIBRARIES \
|
||||||
maintainer-clean-compile maintainer-clean-libtool \
|
maintainer-clean-compile maintainer-clean-libtool \
|
||||||
maintainer-clean-toolexeclibLTLIBRARIES \
|
maintainer-clean-toolexeclibLTLIBRARIES \
|
||||||
maintainer-clean-binPROGRAMS \
|
maintainer-clean-binPROGRAMS \
|
||||||
|
@ -1440,7 +1471,8 @@ maintainer-clean-am: maintainer-clean-toolexeclibLIBRARIES \
|
||||||
maintainer-clean: maintainer-clean-recursive
|
maintainer-clean: maintainer-clean-recursive
|
||||||
-rm -f config.status
|
-rm -f config.status
|
||||||
|
|
||||||
.PHONY: mostlyclean-toolexeclibLIBRARIES distclean-toolexeclibLIBRARIES \
|
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
|
||||||
|
mostlyclean-toolexeclibLIBRARIES distclean-toolexeclibLIBRARIES \
|
||||||
clean-toolexeclibLIBRARIES maintainer-clean-toolexeclibLIBRARIES \
|
clean-toolexeclibLIBRARIES maintainer-clean-toolexeclibLIBRARIES \
|
||||||
uninstall-toolexeclibLIBRARIES install-toolexeclibLIBRARIES \
|
uninstall-toolexeclibLIBRARIES install-toolexeclibLIBRARIES \
|
||||||
mostlyclean-compile distclean-compile clean-compile \
|
mostlyclean-compile distclean-compile clean-compile \
|
||||||
|
|
|
@ -128,7 +128,7 @@ DIST_COMMON = Makefile.am Makefile.in
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
TAR = gtar
|
TAR = tar
|
||||||
GZIP_ENV = --best
|
GZIP_ENV = --best
|
||||||
all: all-redirect
|
all: all-redirect
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
@ -197,7 +197,7 @@ distdir: $(DISTFILES)
|
||||||
@for file in $(DISTFILES); do \
|
@for file in $(DISTFILES); do \
|
||||||
d=$(srcdir); \
|
d=$(srcdir); \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
cp -pr $$/$$file $(distdir)/$$file; \
|
||||||
else \
|
else \
|
||||||
test -f $(distdir)/$$file \
|
test -f $(distdir)/$$file \
|
||||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||||
|
|
|
@ -127,7 +127,7 @@ DIST_COMMON = ./stamp-h.in Makefile.am Makefile.in config.h.in
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
TAR = gtar
|
TAR = tar
|
||||||
GZIP_ENV = --best
|
GZIP_ENV = --best
|
||||||
all: all-redirect
|
all: all-redirect
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
@ -224,7 +224,7 @@ distdir: $(DISTFILES)
|
||||||
@for file in $(DISTFILES); do \
|
@for file in $(DISTFILES); do \
|
||||||
d=$(srcdir); \
|
d=$(srcdir); \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
cp -pr $$/$$file $(distdir)/$$file; \
|
||||||
else \
|
else \
|
||||||
test -f $(distdir)/$$file \
|
test -f $(distdir)/$$file \
|
||||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// natField.cc - Implementation of java.lang.reflect.Field native methods.
|
// natField.cc - Implementation of java.lang.reflect.Field native methods.
|
||||||
|
|
||||||
/* Copyright (C) 1999 Free Software Foundation
|
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||||
|
|
||||||
This file is part of libgcj.
|
This file is part of libgcj.
|
||||||
|
|
||||||
|
@ -29,7 +29,14 @@ jobject
|
||||||
java::lang::reflect::Array::newInstance (jclass componentType, jint length)
|
java::lang::reflect::Array::newInstance (jclass componentType, jint length)
|
||||||
{
|
{
|
||||||
if (componentType->isPrimitive())
|
if (componentType->isPrimitive())
|
||||||
|
{
|
||||||
|
// We could check for this in _Jv_NewPrimArray, but that seems
|
||||||
|
// like needless overhead when the only real route to this
|
||||||
|
// problem is here.
|
||||||
|
if (componentType == JvPrimClass (void))
|
||||||
|
throw new java::lang::IllegalArgumentException ();
|
||||||
return _Jv_NewPrimArray (componentType, length);
|
return _Jv_NewPrimArray (componentType, length);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return JvNewObjectArray (length, componentType, NULL);
|
return JvNewObjectArray (length, componentType, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue