aboutsummaryrefslogtreecommitdiff
path: root/libjava
AgeCommit message (Collapse)AuthorFilesLines
2002-12-31re PR libgcj/7416 (java.security startup refs "GNU libgcj.security")Tom Tromey4-27/+61
Fix for PR libgcj/7416: * javax/naming/InitialContext.java (init): Use gnu.classpath.home.url. * java/security/Security.java: Use new properties. (loadProviders): Accept base url; use it. * java/lang/System.java: Document gnu.classpath.vm.shortname, and gnu.classpath.home.url. (gnu.classpath.home.url): Define. (gnu.classpath.vm.shortname): Likewise. From-SVN: r60722
2002-12-31re PR libgcj/8997 (spin() calls Thread.sleep)Tom Tromey4-2/+32
2002-12-31 Tom Tromey <tromey@redhat.com> Ranjit Mathew <rmathew@hotmail.com> Fix for PR libgcj/8997: * java/lang/natObject.cc (spin): Use _Jv_platform_usleep. Include platform.h. * include/posix.h (_Jv_platform_usleep): New function. * include/win32.h (_Jv_platform_usleep): New function. Co-Authored-By: Ranjit Mathew <rmathew@hotmail.com> From-SVN: r60700
2002-12-30javaprims.h: Updated.Tom Tromey3-8/+21
* gcj/javaprims.h: Updated. * scripts/classes.pl (scan): Removed stray semicolon. From-SVN: r60659
2002-12-30URLStreamHandler.java (toExternalForm): Ignore port if zero or smaller.Mark Wielaard2-1/+6
* java/net/URLStreamHandler.java (toExternalForm): Ignore port if zero or smaller. From-SVN: r60657
2002-12-30Properties (formatForOutput): Don't fall through to default case after ↵Mark Wielaard2-0/+6
escaping character. * java/util/Properties (formatForOutput): Don't fall through to default case after escaping character. From-SVN: r60618
2002-12-30StringBuffer.java (getChars): Remove wrong dstOffset check against count.Mark Wielaard2-19/+25
* java/lang/StringBuffer.java (getChars): Remove wrong dstOffset check against count. From-SVN: r60616
2002-12-28boehm.cc: Remove stray semicolon.Mark Mitchell11-54/+80
* boehm.cc: Remove stray semicolon. * interpret.cc: Likewise. * prims.cc: Likewise. * verify.cc (_Jv_BytecodeVerifier::verify_fail): Move definition earlier to ensure default arguments are processed. * gcj/array.h (JArray): Add forward declaration. (elements): Likewise. * gcj/javaprim.h: Remove stray semicolons. * include/bohm-gc.h: Likewise. * include/jni.h: Likewise. * include/jvm.h: Likewise. * java/lang/Class.h (_Jv_GetArrayClass): Declare _Jv_NewArrayClass. From-SVN: r60556
2002-12-23exception.cc (PERSONALITY_FUNCTION): Clear least-significant-bit of catch_type.Jeff Sturm4-11/+40
* exception.cc (PERSONALITY_FUNCTION): Clear least-significant-bit of catch_type. * java/lang/natClass.cc (initializeClass): Link vtable, otable, idt tables after initializing superclass. * java/lang/natClassLoader.cc (uaddr): New typedef. (_Jv_PrepareCompiledClass): Resolve superclass, interfaces if they are constant pool indicies. Don't link vtable, otable yet. From-SVN: r60450
2002-12-22Makefile.am: Move org.xml.sax and org.w3c.dom into their own libraries.Anthony Green3-116/+178
2002-12-21 Anthony Green <green@redhat.com> * Makefile.am: Move org.xml.sax and org.w3c.dom into their own libraries. * Makefile.in: Rebuilt. From-SVN: r60410
2002-12-20Makefile.am (ordinary_java_source_files): Add ↵Anthony Green36-8501/+9164
org/xml/sax/helpers/NewInstance.java. 2002-12-19 Anthony Green <green@redhat.com> * Makefile.am (ordinary_java_source_files): Add org/xml/sax/helpers/NewInstance.java. * Makefile.in: Rebuilt. * org/xml/sax/package.html, org/xml/sax/ext/package.html, org/xml/sax/helpers/package.html: New files. * org/xml/sax/*: Upgrade to SAX 2.0.1 release from http://www.saxproject.org. From-SVN: r60350
2002-12-20natResourceBundle.cc: Include ArrayIndexOutOfBoundsException.h.Andrew Haley2-4/+18
2002-12-19 Andrew Haley <aph@redhat.com> * java/util/natResourceBundle.cc: Include ArrayIndexOutOfBoundsException.h. (getCallingClassLoader): Don't put upper bound on stack search. Catch ArrayIndexOutOfBoundsException. From-SVN: r60348
2002-12-20* libtool-version: Increased `current'.Tom Tromey2-1/+5
From-SVN: r60346
2002-12-19natClassLoader.cc (defineClass0): Removed erroneous comment.Tom Tromey11-96/+221
* java/lang/natClassLoader.cc (defineClass0): Removed erroneous comment. * java/lang/ClassLoader.java (defineClass): Use chained exception when rethrowing. * defineclass.cc (handleClassBegin): Mark class as interpreted. * java/lang/reflect/Modifier.java (INVISIBLE, INTERPRETED): New constants. * resolve.cc (_Jv_PrepareMissingMethods): New function. (_Jv_PrepareClass): Use it. * include/java-interp.h (_Jv_IsInterpretedClass): Rewrote. (_Jv_InterpClass): _Jv_PrepareMissingMethods now friend. * java/lang/Class.h (Class::getModifiers): Mask with ALL_FLAGS. (Class): _Jv_PrepareMissingMethods now friend. * java/lang/natClassLoader.cc (defineClass0): Use JvSynchronize. Record `NULL' for system class loader. (_Jv_RegisterInitiatingLoader): Use JvSynchronize. Special case system class loader. (_Jv_FindClassInCache): Likewise. (_Jv_UnregisterClass): Use JvSynchronize. Free old loader info. (_Jv_FindClass): Special case system class loader. * java/lang/natClass.cc (_Jv_abstractMethodError): New function. (_Jv_SetVTableEntries): Put _Jv_abstractMethodError into empty vtable slots. (_Jv_LayoutVTableMethods): Don't generate vtable slot for a method in a final class. (_getDeclaredMethod): Don't return synthetic methods. (getDeclaredMethods): Likewise. (_getMethod): Likewise. (_getMethods): Likewise. From-SVN: r60319
2002-12-19BigInteger.java (euclidInv): Make sure quot and rem are in canonical form ↵Raif Naffah2-0/+12
after divide(). 2002-12-18 Raif Naffah <raif@fl.net.au> * java/math/BigInteger.java (euclidInv): Make sure quot and rem are in canonical form after divide(). (modInverse): Likewise. From-SVN: r60292
2002-12-19pr8945.java: New file.Tom Tromey3-0/+15
* libjava.lang/pr8945.java: New file. * libjava.lang/pr8945.out: New file. From-SVN: r60286
2002-12-16Merge basic-improvements-branch to trunkZack Weinberg6-468/+392
From-SVN: r60174
2002-12-13SecurityRandom (digest): Removed field.Casey Marshall3-89/+127
2002-12-13 Casey Marshall <rsdio@metastatic.org> Mark Wielaard <mark@klomp.org> * java/security/SecurityRandom (digest): Removed field. (SecureRandom): Check all providers for case-insensitive SecureRandom implementation. Don't ignore classname == null. Fallback to SHA1PRNG if necessary. (getInstance(String,Provider,boolean): New method. (getInstance(String)): Use new method. (getInstance(String,String)): Likewise. (getInstance(String,Provider)): Likewise. 2002-12-13 Casey Marshall <rsdio@metastatic.org> * java/security/Security.java (loadProviders): Increment i only once. Co-Authored-By: Mark Wielaard <mark@klomp.org> From-SVN: r60099
2002-12-13ClassLoader.java (resolveClass0): Transform ClassNotFoundException to ↵Mark Wielaard2-6/+18
NoClassDefFoundError. * java/lang/ClassLoader.java (resolveClass0): Transform ClassNotFoundException to NoClassDefFoundError. Transform all other throwables to LinkageError. From-SVN: r60097
2002-12-13loader.exp (gcj_loader_test_one): Use libjava_prune_warnings.Tom Tromey5-21/+56
* libjava.loader/loader.exp (gcj_loader_test_one): Use libjava_prune_warnings. (gcj_loader_run): Likewise. * libjava.mauve/mauve.exp (test_mauve): Use libjava_prune_warnings. (test_mauve_sim): Likewise. * libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Use libjava_prune_warnings. (gcj_jni_build_header): Likewise. * lib/libjava.exp (libjava_prune_warnings): New proc. (gcj_link): Use it. (test_libjava_from_source): Likewise. (test_libjava_from_javac): Likewise. From-SVN: r60089
2002-12-12* java/lang/ClassLoader.java (findLoadedClass): Now synchronized.Tom Tromey2-2/+4
From-SVN: r60053
2002-12-11ClassLoader.java (loadedClasses): New field.Tom Tromey3-30/+43
* java/lang/ClassLoader.java (loadedClasses): New field. (defineClass): Fixed indentation. Put new class in loadedClasses. (findLoadedClass): Implement here. * java/lang/natClassLoader.cc (findLoadedClass): Removed. From-SVN: r60043
2002-12-11Makefile.in: Rebuilt.Tom Tromey5-58/+87
* Makefile.in: Rebuilt. * Makefile.am (nat_source_files): Added natVMClassLoader.cc. * gnu/gcj/runtime/natVMClassLoader.cc: New file. (gnu::gcj::runtime::VMClassLoader::findClass): Moved here. * java/lang/natClassLoader.cc (gnu::gcj::runtime::VMClassLoader::findClass): Removed. From-SVN: r60020
2002-12-11URLClassLoader.java (getCanonicalFileURL): New method.Mark Wielaard2-21/+55
2002-12-10 Mark Wielaard <mark@klomp.org> Tom Tromey <tromey@redhat.com> * java/net/URLClassLoader.java (getCanonicalFileURL): New method. (JarURLLoader): Use it. (FileURLLoader): Likewise. (JarURLResource.getURL): Use chained exception. (FileResource.getURL): Likewise. (FileURLLoader.getResource): Use canonical file name. (addURL): Indentation fix. Co-Authored-By: Tom Tromey <tromey@redhat.com> From-SVN: r60019
2002-12-10win32.h: Fixed typo in "DISABLE_JAVA_NET".Tom Tromey2-4/+9
* include/win32.h: Fixed typo in "DISABLE_JAVA_NET". From Laurent Bardet <l.bardet@magic.fr>. From-SVN: r60013
2002-12-10win32.h (_Jv_platform_solib_prefix): New define.Tom Tromey4-19/+65
* include/win32.h (_Jv_platform_solib_prefix): New define. (_Jv_platform_solib_suffix): Likewise. * include/posix.h (_Jv_platform_solib_prefix): New define. (_Jv_platform_solib_suffix): Likewise. * java/lang/natRuntime.cc: Include StackTrace.h. (_load): Use findLibrary and new platform defines. (nativeGetLibname): Use new platform defines. From-SVN: r59976
2002-12-10natResourceBundle.cc (getCallingClassLoader): Assume `t' won't be null.Tom Tromey2-3/+7
* java/util/natResourceBundle.cc (getCallingClassLoader): Assume `t' won't be null. From-SVN: r59975
2002-12-09Test for PR libgcj/8823:Tom Tromey3-0/+31
* libjava.lang/pr8823.java: New file. * libjava.lang/pr8823.out: New file. From-SVN: r59953
2002-12-09Connection.java (getJarFile): download and cache remote jar files.Mark Wielaard6-331/+1065
* gnu/gcj/protocol/jar/Connection.java (getJarFile): download and cache remote jar files. * gnu/gcj/runtime/VMClassLoader.java: Don't construct jar URL, only add File.separator to URL when it is a directory. * java/lang/ClassLoader.java: Add Classpath javadoc. (parent): final. (getParent): Add (disabled) security check. (findLibrary): New default method. * java/net/JarURLConnection.java (getManifest): Implement. (getInputStream): Only create InputStream when entry exists. (getHeaders): Only use jarFileURLConnection or JarEntry to set length when they exist. * java/net/URLClassLoader.java: New/Rewritten version from Classpath. From-SVN: r59949
2002-12-08ResourceBundle.java (resourceBundleCache): Not final.Mark Wielaard2-3/+22
* java/util/ResourceBundle.java (resourceBundleCache): Not final. (lastDefaultLocale): New field. (getBundle): When Locale.getDefault != lastDefaultLocale reset resourceBundleCache. From-SVN: r59948
2002-12-07InetAddress.java (toString): Use hostname when not null, don't do an ↵Mark Wielaard3-7/+18
explicit reverse getHostName() lookup. * java/net/InetAddress.java (toString): Use hostname when not null, don't do an explicit reverse getHostName() lookup. * java/net/Socket.java (setSocketImplFactory): When fac == null throw NullPointerException. From-SVN: r59902
2002-12-06java-interp.h (class _Jv_InterpMethod): Added JV_MARKOBJ_DECL.Tom Tromey4-16/+34
* include/java-interp.h (class _Jv_InterpMethod): Added JV_MARKOBJ_DECL. * boehm.cc (_Jv_MarkObj): Consolidated interpreter code. Also mark `prepared' field of interpreted method. * interpret.cc (compile): Use _Jv_AllocBytes. From-SVN: r59900
2002-12-05natStackTrace.cc (fillInStackTrace): Throw #ifdef (HAVE_BACKTRACE) around ↵Andrew Haley2-3/+11
the whole function body. 2002-12-05 Andrew Haley <aph@redhat.com> * gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Throw #ifdef (HAVE_BACKTRACE) around the whole function body. From-SVN: r59855
2002-12-05override.java: New file.Tom Tromey3-0/+26
* libjava.lang/override.java: New file. * libjava.lang/override.out: New file. From-SVN: r59848
2002-12-05Class.h (_Jv_SetVTableEntries): Updated declaration.Tom Tromey5-35/+73
* java/lang/Class.h (_Jv_SetVTableEntries): Updated declaration. * resolve.cc: Don't include AbstractMethodError.h. (_Jv_abstractMethodError): Removed. * defineclass.cc (handleMethodsBegin): Initialize method index to -1. * java/lang/natClass.cc (_Jv_LayoutVTableMethods): Don't set method index for "new" final method. (_Jv_SetVTableEntries): Compare index against -1 instead of using isVirtualMethod. Added `flags' argument. (_Jv_MakeVTable): Throw exception for abstract method in concrete class. From-SVN: r59847
2002-12-05Fixed snafu caused when fixing previous snafu.Tom Tromey1-2/+2
From-SVN: r59846
2002-12-05Fixed ChangeLog patch snafuTom Tromey2-2/+13
From-SVN: r59844
2002-12-05* java/net/SocketPermission.java (hashCode): Rewrote.Tom Tromey2-15/+7
From-SVN: r59843
2002-12-05Makefile.in: Rebuilt.Tom Tromey8-59/+121
* Makefile.in: Rebuilt. * Makefile.am (nat_source_files): Added natVMSecurityManager, natResourceBundle. * java/util/ResourceBundle.java (Security): Removed. (getCallingClassLoader): Now native. * java/util/natResourceBundle.cc: New file. * java/lang/natVMSecurityManager.cc: New file. * java/lang/VMSecurityManager.java (getClassContext): Now native. From-SVN: r59840
2002-12-03JarFile.java (manifest): Not final.Mark Wielaard5-128/+217
* java/util/jar/JarFile.java (manifest): Not final. (manifestRead): New field. (JarFile): Don't read Manifest in constructor. (getManifest): New method. (JarEnumeration.nextElement): Use new method. (getEntry): Likewise. * java/util/zip/ZipFile.java (name): Final. (raf): Likewsie. (entries): Change type to Hashtable. (closed): New field. (ZipFile): Don't read enties in constructor. (readEntries): Use Hashtable. (close): Set new close flag and set entries to null inside synchronized block. (entries): Contruct enumeration using new getEntries() method and entries Hashtable. (getEntryIndex): Removed. (getEntries): New method. (getEntry): Use new getEntries() method and entries Hastable. (getInputStream): Likewise. (size): Return getEntries().size(). (ZipEntryEnumeration): Wrap entries Hashtable elements. * java/util/zip/ZipEntry.java (cal): Don't initialize. (time): Removed (dostime): New field. (zipFileIndex): Removed. (ZipEntry(ZipEntry)): Copy dostime. (setDOSTime): Now final and doesn't convert dos time. (getDOSTime): Likewise. (setTime): Convert dos time. (getTime): Likewise. (getCalendar): New method. (setExtra): Use setTime(). * java/util/zip/ZipInputStream.java (getNextEntry): Format error msg. From-SVN: r59785
2002-12-03* java/lang/Character.java (forDigit): Formatting fix.Tom Tromey2-2/+6
From-SVN: r59781
2002-12-03DSAParameterSpec.java (getP): Return p, not q.Raif Naffah4-3/+9
2002-12-03 Raif Naffah <raif@fl.net.au> * java/security/spec/DSAParameterSpec.java (getP): Return p, not q. * java/security/spec/DSAPrivateKeySpec.java (getP): Likewise. * java/security/spec/DSAPublicKeySpec.java (getP): Likewise. From-SVN: r59779
2002-12-03natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass.Andrew Haley4-0/+419
2002-12-03 Andrew Haley <aph@redhat.com> * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass. (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL. (_Jv_PopClass): New. (_Jv_PushClass): New. * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to discover the ClassLoader of our caller. (_Jv_CheckArrayStore): Don't check that a class is assignment compatible with Object. * java/lang/natVMTHrowable.cc: Delete. * gnu/gcj/runtime/StackTrace.java: New, partly copied from java.lang.VMThrowable. (StackTrace(), StackTrace(int)): New constructors. (classAt, methodAt, update, methodAtAddress): New methods. (map): New field. * java/lang/VMThrowable.java: Use StackTrace instead of natVMTHrowable. * java/lang/Class.h (getClassLoaderInternal): New. (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass. Be friendly with gnu::gcj::runtime::StackTrace. (Object.chain): New field. * include/java-interp.h (class _Jv_InterpMethod): Be friendly with gnu::gcj::runtime::StackTrace. * gnu/gcj/runtime/natStackTrace.cc: New file. * gnu/gcj/runtime/MethodRef.java: New file. * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal() instead of getClassLoader(). * verify.cc (class _Jv_BytecodeVerifier): Likewise. java::lang::VMThrowable. * Makefile.am (core_java_source_files): Add MethodRef.java, StackTrace.java. (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc. * Makefile.in: Rebuild. From-SVN: r59771
2002-12-03natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass.Andrew Haley1-97/+0
2002-12-03 Andrew Haley <aph@redhat.com> * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass. (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL. (_Jv_PopClass): New. (_Jv_PushClass): New. * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to discover the ClassLoader of our caller. (_Jv_CheckArrayStore): Don't check that a class is assignment compatible with Object. * java/lang/natVMTHrowable.cc: Delete. * gnu/gcj/runtime/StackTrace.java: New, partly copied from java.lang.VMThrowable. (StackTrace(), StackTrace(int)): New constructors. (classAt, methodAt, update, methodAtAddress): New methods. (map): New field. * java/lang/VMThrowable.java: Use StackTrace instead of natVMTHrowable. * java/lang/Class.h (getClassLoaderInternal): New. (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass. Be friendly with gnu::gcj::runtime::StackTrace. (Object.chain): New field. * include/java-interp.h (class _Jv_InterpMethod): Be friendly with gnu::gcj::runtime::StackTrace. * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal() instead of getClassLoader(). * verify.cc (class _Jv_BytecodeVerifier): Likewise. java::lang::VMThrowable. * Makefile.am (core_java_source_files): Add MethodRef.java, StackTrace.java. (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc. * Makefile.in: Rebuild. From-SVN: r59770
2002-12-03natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass.Andrew Haley9-39/+124
2002-12-03 Andrew Haley <aph@redhat.com> * java/lang/natClassLoader.cc (_Jv_PrepareCompiledClass): Call _Jv_PushClass. (_Jv_InitNewClassFields): Set protectionDomain and chain = NULL. (_Jv_PopClass): New. (_Jv_PushClass): New. * java/lang/natClass.cc (forName (jstring)): Use a StackTrace to discover the ClassLoader of our caller. (_Jv_CheckArrayStore): Don't check that a class is assignment compatible with Object. * java/lang/natVMTHrowable.cc: Delete. * gnu/gcj/runtime/StackTrace.java: New, partly copied from java.lang.VMThrowable. (StackTrace(), StackTrace(int)): New constructors. (classAt, methodAt, update, methodAtAddress): New methods. (map): New field. * java/lang/VMThrowable.java: Use StackTrace instead of natVMTHrowable. * java/lang/Class.h (getClassLoaderInternal): New. (class Class): Be friendly with _Jv_PopClass and _Jv_PushClass. Be friendly with gnu::gcj::runtime::StackTrace. (Object.chain): New field. * include/java-interp.h (class _Jv_InterpMethod): Be friendly with gnu::gcj::runtime::StackTrace. * prims.cc (_Jv_NewObjectArray): Use getClassLoaderInternal() instead of getClassLoader(). * verify.cc (class _Jv_BytecodeVerifier): Likewise. java::lang::VMThrowable. * Makefile.am (core_java_source_files): Add MethodRef.java, StackTrace.java. (nat_source_files): Remove natVMThrowable.cc; add natStackTrace.cc. * Makefile.in: Rebuild. 2002-12-03 Andrew Haley <aph@redhat.com> * class.c (make_class_data): New field, "chain". * decl.c (java_init_decl_processing): Likewise. From-SVN: r59769
2002-12-03jni.cc: Added `name' argument.Tom Tromey3-8/+18
* jni.cc: Added `name' argument. * include/jni.h (struct JNINativeInterface) [DefineClass]: Added `const char *' argument. (class _Jv_JNIEnv) [DefineClass]: Likewise. From-SVN: r59756
2002-12-02Bug compatibility, for PR libgcj/8738:Tom Tromey2-28/+16
* java/io/CharArrayWriter.java (close): Do nothing. (flush): Likewise. (reset): Don't touch `closed'. (write(int)): Don't throw IOException. (write(char[],int,int)): Likewise. (write(String,int,int)): Likewise. (closed): Removed. From-SVN: r59743
2002-12-01jacks.exp (gcj_jacks_setup_xfail): New function.Tom Tromey3-2/+874
* libjava.jacks/jacks.exp (gcj_jacks_setup_xfail): New function. (gcj_jacks_parse): Use it; set up xfails. * libjava.jacks/jacks.xfail: New file. From-SVN: r59702
2002-12-01SecurityManager.java: Remerge comments, indenting and checkXXX methods with ↵Mark Wielaard2-688/+956
Classpath. * java/lang/SecurityManager.java: Remerge comments, indenting and checkXXX methods with Classpath. From-SVN: r59685
2002-12-01* libjava.mauve/xfails: Remove Inspector FAILs that now PASS.Mark Wielaard2-9/+4
From-SVN: r59680
2002-11-30ColorModel.java (getUnnormalizedComponents, [...]): Fix calculation which ↵Scott Gilbertson2-2/+8
was using one too many bits in the unnormalized format. 2002-11-29 Scott Gilbertson <scottg@mantatest.com> * java/awt/image/ColorModel.java (getUnnormalizedComponents, getNormalizedComponents): Fix calculation which was using one too many bits in the unnormalized format. From-SVN: r59651