From 2bc043354c4edb1f5aad751285060fb722a63ea1 Mon Sep 17 00:00:00 2001 From: doko Date: Tue, 21 Oct 2008 17:55:01 +0000 Subject: [PATCH] libjava/ChangeLog: 2008-10-21 Andrew John Hughes * sources.am, Makfile.in: Regenerate. 2008-10-17 Matthias Klose * configure.ac: Fix bashisms. * configure: Regenerate. 2008-10-15 Matthias Klose * configure.ac: Disable build of gjdoc, if configured without --with-antlr-jar or if no antlr.jar found. * configure: Regenerate. 2008-10-09 Andrew John Hughes * classpath/configure.ac, * classpath/m4/ac_prog_antlr.m4, * classpath/m4/ac_prog_java.m4, * classpath/tools/Makefile.am: Ported --regen-gjdoc-parser patch and cantlr support from GNU Classpath. 2008-10-06 Andrew Haley * java/lang/Thread.java (Thread): Always create the ThreadLocalMap when creating a thread. (getThreadLocals) Don't lazily create the ThreadLocalMap. 2008-09-28 Andrew John Hughes * classpath/java/lang/ThreadLocalMap.java, * java/lang/ThreadLocalMap$Entry.h, * java/lang/ThreadLocalMap.h, * lib/java/lang/ThreadLocalMap.class, * lib/java/lang/ThreadLocalMap$Entry.class: Add the new files for the ThreadLocal patch. 2008-09-28 Andrew John Hughes * classpath/ChangeLog, * classpath/java/lang/InheritableThreadLocal.java, * classpath/java/lang/Thread.java, * classpath/java/lang/ThreadLocal.java: Merge Daniel Frampton's ThreadLocal patch. * gcj/javaprims.h: Updated. * java/lang/Thread.h: Regenerated. * java/lang/Thread.java: Replace WeakIdentityHashMap with ThreadLocalMap. (getThreadLocals()): Likewise. * java/lang/ThreadLocal.h: Regenerated. * java/lang/ThreadLocal.java: (computeNextHash()): New method. (ThreadLocal()): Initialise fastHash. (internalGet()): Updated to match Classpath's get(). (internalSet(Object)): Likewise for set(Object). (internalRemove()): Likewise for remove(). 2008-09-25 Andrew John Hughes * classpath/configure, * classpath/configure.ac: Resynchronise with Classpath's configure. * classpath/examples/Makefile.in: Add equivalent support for building as in tools/Makefile.in. * classpath/java/nio/Buffer.java, * classpath/java/nio/ByteBuffer.java, * classpath/java/nio/ByteBufferImpl.java, * classpath/java/nio/CharBuffer.java, * classpath/java/nio/CharBufferImpl.java, * classpath/java/nio/CharSequenceBuffer.java, * classpath/java/nio/CharViewBufferImpl.java, * classpath/java/nio/DirectByteBufferImpl.java, * classpath/java/nio/DoubleBuffer.java, * classpath/java/nio/DoubleBufferImpl.java, * classpath/java/nio/DoubleViewBufferImpl.java, * classpath/java/nio/FloatBuffer.java, * classpath/java/nio/FloatBufferImpl.java, * classpath/java/nio/FloatViewBufferImpl.java, * classpath/java/nio/IntBuffer.java, * classpath/java/nio/IntBufferImpl.java, * classpath/java/nio/IntViewBufferImpl.java, * classpath/java/nio/LongBuffer.java, * classpath/java/nio/LongBufferImpl.java, * classpath/java/nio/LongViewBufferImpl.java, * classpath/java/nio/MappedByteBuffer.java, * classpath/java/nio/MappedByteBufferImpl.java, * classpath/java/nio/ShortBuffer.java, * classpath/java/nio/ShortBufferImpl.java, * classpath/java/nio/ShortViewBufferImpl.java: Replace use of gnu.classpath.Pointer with gnu.gcj.RawData, and fix some formatting issues. * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaLexer.java, * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaLexer.smap, * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaRecognizer.java, * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaRecognizer.smap, * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaTokenTypes.java, * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaTokenTypes.txt: Regenerated (later version of antlr). * java/nio/Buffer.h: Regenerated. * java/nio/Buffer.java: Ported changes from Classpath. * java/nio/ByteBuffer.h, * java/nio/CharBuffer.h: Regenerated. * java/nio/DirectByteBufferImpl.java: Ported changes from Classpath. * java/nio/DoubleBuffer.h, * java/nio/FloatBuffer.h, * java/nio/IntBuffer.h, * java/nio/LongBuffer.h, * java/nio/MappedByteBuffer.h, * java/nio/MappedByteBufferImpl.h: Regenerated. * java/nio/MappedByteBufferImpl.java: Ported changes from Classpath. * java/nio/ShortBuffer.h: Regenerated. 2008-09-24 Matthias Klose * configure.ac: Search for antlr.jar, if not configured. * configure: Regenerate. 2008-09-24 Matthias Klose * Makefile.am: Build a gjdoc binary, if enabled. * configure.ac: Add options --disable-gjdoc, --with-antlr-jar=file. * Makefile.in, */Makefile.in, configure: Regenerate. 2008-09-22 Andrew Haley * java/lang/String.java (toString(char[], int, int)): New method. 2008-09-14 Matthias Klose Import GNU Classpath (libgcj-import-20080914). * Regenerate class and header files. * Regenerate auto* files. * configure.ac: Don't pass --disable-gjdoc to classpath. * sources.am: Regenerated. * HACKING: Mention to build gjdoc in maintainer builds. * gnu/classpath/Configuration.java: Update classpath version. * gcj/javaprims.h: Update. 2008-09-08 Andrew John Hughes * Makefile.am: Replace natStringBuffer.cc and natStringBuilder.cc with natAbstractStringBuffer.cc. * Makefile.in: Regenerated. * java/lang/AbstractStringBuffer.java: (append(int)): Made native. (regionMatches(int,String)): Likewise. * java/lang/StringBuffer.h: Regenerated. * java/lang/StringBuffer.java: Remerged with GNU Classpath. * java/lang/StringBuilder.h: Regenerated. * java/lang/StringBuilder.java: Remerged with GNU Classpath. * java/lang/natAbstractStringBuffer.cc: Provide common native methods for StringBuffer and StringBuilder. * java/lang/natStringBuffer.cc, * java/lang/natStringBuilder.cc: Removed. 2008-09-04 Andrew John Hughes * Makefile.in, * classpath/configure: Regenerated. * gnu/gcj/util/natDebug.cc, * gnu/gcj/xlib/natColormap.cc, * gnu/gcj/xlib/natDisplay.cc, * gnu/gcj/xlib/natDrawable.cc, * gnu/gcj/xlib/natFont.cc, * gnu/gcj/xlib/natWMSizeHints.cc, * gnu/gcj/xlib/natWindow.cc, * gnu/gcj/xlib/natXImage.cc: Add :: prefix to namespaces. * java/io/CharArrayWriter.h, * java/lang/StringBuffer.h: Regenerated using patched gjavah. * java/lang/natStringBuffer.cc: Fix naming of append(jint). * java/sql/Timestamp.h: Regenerated using patched gjavah. * jni.cc: Rename p to functions to match change in GNU Classpath. * scripts/makemake.tcl: Switch gnu.java.math to BC compilation. * sources.am: Regenerated. 2008-08-21 Andrew John Hughes * Makefile.in: Updated location of Configuration.java. * classpath/lib/gnu/java/locale/LocaleData.class: Regenerated. 2008-08-18 Andrew John Hughes * Makefile.in: Updated with new Java files. * classpath/configure: Regenerated. * classpath/tools/Makefile.am: Add missing use of GJDOC_EX so --disable-gjdoc works. * classpath/tools/Makefile.in: Regenerated. 2008-08-15 Matthias Klose Import GNU Classpath (libgcj-import-20080811). * Regenerate class and header files. * Regenerate auto* files. * configure.ac: Don't pass --with-fastjar to classpath, substitute new dummy value in classpath/gnu/classpath/Configuration.java.in, pass --disable-gjdoc to classpath. * scripts/makemake.tcl: * sources.am: Regenerated. * java/lang/AbstractStringBuffer.java, gnu/java/lang/VMCPStringBuilder.java: New, copied from classpath, use System instead of VMSystem. * java/lang/StringBuffer.java: Merge from classpath. * java/lang/ClassLoader.java: Merge from classpath. * gcj/javaprims.h: Update class definitions, remove _Jv_jobjectRefType, jobjectRefType definitions. libjava/classpath/ChangeLog.gcj: 2008-10-21 Matthias Klose * classpath/tools/gnu/classpath/tools/gjdoc/expr/Java*: Move from ... * classpath/tools/generated/gnu/classpath/tools/gjdoc/expr/ ... here. * Update .class files. 2008-10-21 Andrew John Hughes * tools/Makefile.am: Always generate parser in the srcdir. 2008-10-21 Matthias Klose * doc/Makefile.am (MAINTAINERCLEANFILES): Add gjdoc.1. * doc/Makefile.in: Regenerate. 2008-10-20 Matthias Klose * configure.ac: Don't check for working java, if not configured with --enable-java-maintainer-mode. * configure: Regenerate. 2008-10-19 Matthias Klose * m4/ac_prog_java.m4: Revert previous change. * m4/ac_prog_javac.m4: Apply it here. * configure: Regenerate. 2008-10-19 Matthias Klose * m4/ac_prog_javac.m4: Don't check for working javac, if not configured with --enable-java-maintainer-mode. * configure: Regenerate. * Makefile.in, */Makefile.in: Regenerate. 2008-09-30 Matthias Klose * m4/ac_prog_antlr.m4: Check for cantlr binary as well. 2008-09-29 Matthias Klose * m4/ac_prog_antlr.m4: Check for antlr binary as well. 2008-09-28 Matthias Klose * PR libgcj/37636. Revert: 2008-02-20 Matthias Klose * tools/Makefile.am ($(TOOLS_ZIP)): Revert part of previous change, Do copy resource files in JAVA_MAINTAINER_MODE only. * tools/Makefile.in: Regenerate. 2008-09-14 Matthias Klose * m4/ac_prog_javac_works.m4, m4/ac_prog_javac.m4, m4/acinclude.m4: Revert local changes. * m4/ac_prog_antlr.m4: Check for an runantlr binary. * tools/Makefile.am, lib/Makefile.am: Revert local changes (JCOMPILER). * tools/Makefile.am: Remove USE_JAVAC_FLAGS, pass ANTLR_JAR in GLIBJ_CLASSPATH. 2008-09-14 Matthias Klose Revert: Daniel Frampton * AUTHORS: Added. * java/lang/InheritableThreadLocal.java, * java/lang/Thread.java, * java/lang/ThreadLocal.java: Modified to use java.lang.ThreadLocalMap. * java/lang/ThreadLocalMap.java: New cheaper ThreadLocal-specific WeakHashMap. 2008-08-15 Matthias Klose * m4/acinclude.m4 (CLASSPATH_JAVAC_MEM_CHECK): Remove unknown args for javac. libjava/classpath/ChangeLog: 2008-10-20 Andrew John Hughes * m4/ac_prog_antlr.m4: Remove redundant checks. * tools/Makefile.am: Use gjdoc_gendir when calling antlr. 2008-10-15 Andrew John Hughes * configure.ac: Remove superfluous AC_PROG_JAVA call. 2008-10-06 Andrew John Hughes * m4/ac_prog_antlr: Check for cantlr as well. * tools/Makefile.am: Only build GJDoc parser when both CREATE_GJDOC and CREATE_GJDOC_PARSER are on. 2008-10-02 Andrew John Hughes * configure.ac: Add regen-gjdoc-parser option, and separate antlr tests. * m4/ac_prog_antlr.m4: Turn single test into AC_LIB_ANTLR and AC_PROG_ANTLR. * m4/ac_prog_java.m4: Quote tests. * tools/Makefile.am: Support CREATE_GJDOC_PARSER option. 2008-09-14 Andrew John Hughes * examples/Makefile.am: Check lib directly as well as glibj.zip for boot classes. * m4/acinclude.m4: Only require the class files to be built to allow the tools and examples to be built, not the installation of glibj.zip. * tools/Makefile.am: Check lib directly as well as glibj.zip for boot classes. 2008-09-13 Andrew John Hughes * examples/Makefile.am, * lib/Makefile.am: Add GCJ rules. * m4/ac_prog_javac.m4: Check whether JAVAC is gcj. * m4/ac_prog_javac_works.m4: Add GCJ rules. * m4/acinclude.m4: Don't bother checking for -J if using GCJ. * tools/Makefile.am: Add GCJ rules. 2007-08-23 Daniel Frampton * AUTHORS: Added. * java/lang/InheritableThreadLocal.java, * java/lang/Thread.java, * java/lang/ThreadLocal.java: Modified to use java.lang.ThreadLocalMap. * java/lang/ThreadLocalMap.java: New cheaper ThreadLocal-specific WeakHashMap. 2008-02-07 Ian Rogers * java/util/zip/ZipEntry.java: Use byte fields instead of integer fields, store the time as well as the DOS time and don't retain a global Calendar instance. (setDOSTime(int)): Set KNOWN_DOSTIME instead of KNOWN_TIME, and unset KNOWN_TIME. (getDOSTime()): Compute DOS time from UNIX time only when needed. (clone()): Provide cloning via the ZipEntry constructor where possible. (setTime(long)): Don't compute DOS time at this point. (getCalendar()): Removed. 2008-09-09 Andrew John Hughes * tools/gnu/classpath/tools/getopt/Parser.java: (setHeader(String)): Make synchronized. (setFooter(String)): Likewise. * tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java, (reset()): Make synchronized. (name(Class)): Likewise. 2008-09-04 Robert Schuster * gnu/java/nio/charset/ByteDecodeLoopHelper: (arrayDecodeLoop): Added new break label, escape to that label. * gnu/java/nio/charset/ByteEncodeLoopHelper: (arrayDecodeLoop): Added new break label, escape to that label. 2008-09-04 Robert Schuster * java/text/DecimalFormat.java: (scanFix): Use 'i + 1' when looking at following character. (scanNegativePattern): Dito. 2008-09-02 Andrew John Hughes * tools/gnu/classpath/tools/javah/ClassWrapper.java: (makeVtable()): Populate methodNameMap. (printMethods(CniPrintStream)): Always use pre-populated methodNameMap for bridge targets. 2008-09-01 Mario Torre * gnu/java/awt/peer/x/XImage.java (XImageProducer): remove @Override annotation to allow compilation on javac < 1.6 and ecj < 3.4. 2008-09-01 Mario Torre * gnu/java/awt/peer/x/XGraphicsDevice.java (getDisplay): fix to support new Escher API. * gnu/java/awt/peer/x/XImage.java (getSource): method implemented. * gnu/java/awt/peer/x/XImage.java (XImageProducer): implement ImageProducer for getSource. 2008-09-01 Andrew John Hughes * gnu/java/util/regex/BacktrackStack.java, * gnu/java/util/regex/CharIndexed.java, * gnu/java/util/regex/CharIndexedCharArray.java, * gnu/java/util/regex/CharIndexedCharSequence.java, * gnu/java/util/regex/CharIndexedInputStream.java, * gnu/java/util/regex/CharIndexedString.java, * gnu/java/util/regex/CharIndexedStringBuffer.java, * gnu/java/util/regex/RE.java, * gnu/java/util/regex/REException.java, * gnu/java/util/regex/REFilterInputStream.java, * gnu/java/util/regex/REMatch.java, * gnu/java/util/regex/REMatchEnumeration.java, * gnu/java/util/regex/RESyntax.java, * gnu/java/util/regex/REToken.java, * gnu/java/util/regex/RETokenAny.java, * gnu/java/util/regex/RETokenBackRef.java, * gnu/java/util/regex/RETokenChar.java, * gnu/java/util/regex/RETokenEnd.java, * gnu/java/util/regex/RETokenEndOfPreviousMatch.java, * gnu/java/util/regex/RETokenEndSub.java, * gnu/java/util/regex/RETokenIndependent.java, * gnu/java/util/regex/RETokenLookAhead.java, * gnu/java/util/regex/RETokenLookBehind.java, * gnu/java/util/regex/RETokenNamedProperty.java, * gnu/java/util/regex/RETokenOneOf.java, * gnu/java/util/regex/RETokenPOSIX.java, * gnu/java/util/regex/RETokenRange.java, * gnu/java/util/regex/RETokenRepeated.java, * gnu/java/util/regex/RETokenStart.java, * gnu/java/util/regex/RETokenWordBoundary.java, * gnu/java/util/regex/UncheckedRE.java: Fix indentation. 2008-09-01 Andrew John Hughes * gnu/java/util/regex/RETokenStart.java: (getMaximumLength()): Add Override annotation. (matchThis(CharIndexed, REMatch)): Likewise. (returnsFixedLengthMatches()): Renamed from returnsFixedLengthmatches and added Override annotation. (findFixedLengthMatches(CharIndexed,REMatch,int)): Add Override annotation. (dump(CPStringBuilder)): Likewise. * gnu/javax/print/ipp/IppRequest.java: (RequestWriter.writeOperationAttributes(AttributeSet)): Throw exception, don't just create and drop it. * javax/management/MBeanServerPermission.java: (MBeanServerPermissionCollection.add(Permission)): Compare against individual Strings not the entire array, and store the result of replace. * javax/swing/text/html/StyleSheet.java: (setBaseFontSize(size)): Store result of trim(). 2008-09-01 Andrew John Hughes * javax/tools/FileObject.java: (openReader(boolean)): Document new parameter. 2008-03-27 Michael Franz PR classpath/35690: * javax/tools/FileObject.java: (toUri()): Fix case from toURI. (openReader(boolean)): Add missing boolean argument. 2008-08-26 Andrew John Hughes PR classpath/35487: * gnu/javax/management/Server.java: (beans): Change to ConcurrentHashMap. (defaultDomain): Make final. (outer): Likewise. (LazyListenersHolder): Added to wrap listeners, also now a ConcurrentHashMap, providing lazy initialisation safely. (sequenceNumber): Documented. (getBean(ObjectName)): Remove redundant cast. (addNotificationListener(ObjectName,NotificationListener, NotificationFilter,Object)): Remove map initialisation and use holder. (getObjectInstance(ObjectName)): Remove redundant cast. (registerMBean(Object,ObjectName)): Add bean atomically. (removeNotificationListener(ObjectName,NotificationListener)): Simplified. (removeNotificationListener(ObjectName,NotificationListener, NotificationFilter,Object)): Likewise. (notify(ObjectName,String)): Documented. 2008-08-26 Andrew John Hughes * gnu/javax/management/Server.java: Genericised. 2008-08-26 Andrew John Hughes * gnu/javax/management/Translator.java: Genericised. 2008-08-26 Andrew John Hughes * javax/management/DefaultLoaderRepository.java, * javax/management/JMX.java, * javax/management/MBeanAttributeInfo.java, * javax/management/MBeanConstructorInfo.java, * javax/management/MBeanOperationInfo.java, * javax/management/MBeanServerDelegate.java: Fix warnings due to generics. 2008-08-25 Andrew John Hughes * javax/management/MBeanPermission.java, * javax/management/MBeanServerDelegate.java, * javax/management/MBeanServerFactory.java, * javax/management/MBeanServerInvocationHandler.java, * javax/management/MBeanServerPermission.java: Fix warnings due to use of non-generic collections. 2008-08-25 Mario Torre * gnu/javax/rmi/CORBA/RmiUtilities.java (readValue): check if sender is null to avoid NPE. 2008-08-22 Mario Torre * gnu/CORBA/OrbFunctional.java (set_parameters): Fix NullPointerException checking when param is null. 2008-08-23 Andrew John Hughes * java/util/regex/Matcher.java: (reset()): Reset append position so we don't try and append to the end of the old input. 2008-08-22 Andrew John Hughes PR classpath/32028: * m4/acinclude.m4: Also allow versions of GJDoc from 0.8* on, as CVS is 0.8.0-pre. 2008-08-21 Andrew John Hughes PR classpath/32028: * m4/acinclude.m4: (CLASSPATH_WITH_GJDOC): Ensure version 0.7.9 is being used. 2008-08-20 Andrew John Hughes * tools/Makefile.am: Add taglets subdirectory to list of excluded paths when GJDoc is not compiled. 2008-08-19 David P Grove * scripts/check_jni_methods.sh.in: Fix build issue on AIX by splitting generation of method list. 2008-08-18 Andrew John Hughes * native/jni/gstreamer-peer/gst_native_pipeline.c: (get_free_space(int)): Use #else not #elif when there is no condition. 2008-08-17 Andrew John Hughes PR classpath/31895: * java/text/DecimalFormat.java: (setCurrency(Currency)): Update prefixes and suffixes when currency changes. * java/text/DecimalFormatSymbols.java: (DecimalFormatSymbols(Locale)): Set locale earlier so it can be used by setCurrency(Currency). (setCurrency(Currency)): Set the symbol correctly using the locale of the instance. * java/util/Currency.java: Throw error instead of just printing a message. 2008-08-17 Andrew John Hughes * javax/activation/ActivationDataFlavor.java: Suppress warnings from public API. (mimeType): Made final. (representationClass): Added generic type and made final. (normalizeMimeTypeParameter(String,String)): Use CPStringBuilder. * javax/activation/CommandInfo.java: (verb): Made final. (className): Made final. * javax/activation/DataHandler.java: (dataSource): Made final. * javax/activation/FileDataSource.java: (file): Made final. * javax/activation/MailcapCommandMap.java: Use generics on collections and CPStringBuilder instead of StringBuffer. * javax/activation/MimeType.java: (toString()): Use CPStringBuilder. (getBaseType()): Likewise. * javax/activation/MimeTypeParameterList.java: Use generics on collections and CPStringBuilder instead of StringBuffer. * javax/activation/MimeTypeParseException.java: (MimeTypeParseException(String,String)): Use CPStringBuilder. * javax/activation/MimetypesFileTypeMap.java: Use generics on collections and CPStringBuilder instead of StringBuffer. * javax/activation/URLDataSource.java: (url): Made final. 2008-08-17 Andrew John Hughes * gnu/javax/activation/viewers/ImageViewer.java, * gnu/javax/activation/viewers/TextEditor.java, * gnu/javax/activation/viewers/TextViewer.java, * javax/activation/ActivationDataFlavor.java, * javax/activation/CommandInfo.java, * javax/activation/CommandMap.java, * javax/activation/CommandObject.java, * javax/activation/DataContentHandler.java, * javax/activation/DataContentHandlerFactory.java, * javax/activation/DataHandler.java, * javax/activation/DataHandlerDataSource.java, * javax/activation/DataSource.java, * javax/activation/DataSourceDataContentHandler.java, * javax/activation/FileDataSource.java, * javax/activation/FileTypeMap.java, * javax/activation/MailcapCommandMap.java, * javax/activation/MimeType.java, * javax/activation/MimeTypeParameterList.java, * javax/activation/MimeTypeParseException.java, * javax/activation/MimetypesFileTypeMap.java, * javax/activation/ObjectDataContentHandler.java, * javax/activation/URLDataSource.java, * javax/activation/UnsupportedDataTypeException.java, * javax/activation/package.html, * resource/META-INF/mailcap.default, * resource/META-INF/mimetypes.default: Import GNU JAF CVS as of 17/08/2008. 2006-04-25 Archit Shah * javax/activation/MimeTypeParameterList.java: Insert ';' separator before parameter list. 2005-06-29 Xavier Poinsard * javax/activation/ObjectDataContentHandler.java: Fixed typo. 2005-05-28 Chris Burdess * javax/activation/CommandMap.java, * javax/activation/MailcapCommandMap.java: Updated to JAF 1.1. 2004-06-09 Chris Burdess * javax/activation/MailcapCommandMap.java: Fixed bug whereby x-java prefix was not attempted. 2008-08-17 Andrew John Hughes * AUTHORS: Added Laszlo. 2008-04-20 Andrew John Hughes PR classpath/30436: * java/util/Scanner.java: Fix package to be java.util and correct indentation. 2007-07-25 Laszlo Andras Hernadi PR classpath/30436: * java/util/Scanner.java: Initial implementation. 2008-08-17 Andrew John Hughes * java/util/regex/Matcher.java: (toMatchResult()): Implemented. 2008-08-13 Joshua Sumali * doc/Makefile.am (gjdoc.pod): Generate gjdoc pod from cp-tools.texinfo instead of invoke.texi. Remove invoke.texi from EXTRA_DIST. * doc/invoke.texi: Removed and merged into ... * doc/cp-tools.texinfo: Here 2008-08-12 Robert Schuster * native/jni/java-net/local.c (local_bind): Removed fprintf call, fixed access outside of array bounds. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141271 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 218 + libjava/HACKING | 3 +- libjava/Makefile.am | 16 +- libjava/Makefile.in | 309 +- libjava/classpath/AUTHORS | 2 + libjava/classpath/ChangeLog | 3324 +++++- libjava/classpath/ChangeLog.gcj | 84 + libjava/classpath/Makefile.am | 2 +- libjava/classpath/Makefile.in | 27 +- libjava/classpath/NEWS | 16 + libjava/classpath/THANKYOU | 1 + libjava/classpath/aclocal.m4 | 3 + libjava/classpath/configure | 1676 ++- libjava/classpath/configure.ac | 142 +- libjava/classpath/doc/Makefile.am | 13 +- libjava/classpath/doc/Makefile.in | 38 +- libjava/classpath/doc/api/Makefile.in | 25 +- libjava/classpath/doc/cp-tools.texinfo | 1414 ++- libjava/classpath/examples/Makefile.am | 20 +- libjava/classpath/examples/Makefile.in | 46 +- .../communication/DemoServant.java | 4 +- .../communication/DirectTest.java | 4 +- .../examples/CORBA/swing/x5/IorReader.java | 2 +- .../examples/CORBA/swing/x5/X5Server.java | 2 +- .../examples/gnu/classpath/examples/html/Demo.java | 2 +- libjava/classpath/external/Makefile.in | 25 +- libjava/classpath/external/jsr166/Makefile.in | 25 +- .../classpath/external/relaxngDatatype/Makefile.in | 25 +- libjava/classpath/external/sax/Makefile.in | 25 +- libjava/classpath/external/w3c_dom/Makefile.in | 25 +- libjava/classpath/gnu/CORBA/BigDecimalHelper.java | 6 +- .../gnu/CORBA/CDR/LittleEndianInputStream.java | 6 +- libjava/classpath/gnu/CORBA/CDR/Vio.java | 6 +- libjava/classpath/gnu/CORBA/CDR/gnuRuntime.java | 4 +- .../classpath/gnu/CORBA/GIOP/MessageHeader.java | 6 +- .../classpath/gnu/CORBA/GIOP/RequestHeader.java | 4 +- .../classpath/gnu/CORBA/GIOP/v1_0/ReplyHeader.java | 4 +- .../gnu/CORBA/GIOP/v1_0/RequestHeader.java | 6 +- libjava/classpath/gnu/CORBA/IOR.java | 16 +- .../gnu/CORBA/NamingService/NameParser.java | 8 +- .../gnu/CORBA/NamingService/NameTransformer.java | 8 +- libjava/classpath/gnu/CORBA/OrbFunctional.java | 2 +- libjava/classpath/gnu/CORBA/Poa/gnuPOA.java | 4 +- .../classpath/gnu/CORBA/Poa/gnuServantObject.java | 6 +- .../classpath/gnu/classpath/Configuration.java.in | 10 + .../jdwp/processor/VirtualMachineCommandSet.java | 2 +- .../gnu/classpath/jdwp/util/Signature.java | 8 +- .../gnu/java/awt/font/OpenTypeFontPeer.java | 8 +- .../classpath/gnu/java/awt/font/autofit/Edge.java | 4 +- .../gnu/java/awt/font/autofit/LatinBlue.java | 4 +- .../gnu/java/awt/font/autofit/Segment.java | 4 +- .../classpath/gnu/java/awt/font/autofit/Width.java | 4 +- .../gnu/java/awt/font/opentype/GlyphNamer.java | 4 +- .../gnu/java/awt/font/opentype/truetype/Fixed.java | 3 +- .../gnu/java/awt/font/opentype/truetype/Point.java | 4 +- .../awt/font/opentype/truetype/VirtualMachine.java | 4 +- .../gnu/java/awt/java2d/AbstractGraphics2D.java | 169 +- .../classpath/gnu/java/awt/java2d/ActiveEdges.java | 4 +- .../gnu/java/awt/java2d/RasterGraphics.java | 15 + .../gnu/java/awt/java2d/ScanlineConverter.java | 1 + .../gnu/java/awt/peer/GnomeDesktopPeer.java | 4 +- .../gnu/java/awt/peer/KDEDesktopPeer.java | 4 +- .../gnu/java/awt/peer/gtk/GdkFontPeer.java | 6 +- .../gnu/java/awt/peer/gtk/GtkClipboard.java | 21 +- .../classpath/gnu/java/awt/peer/x/GLGraphics.java | 13 +- .../classpath/gnu/java/awt/peer/x/XEventPump.java | 346 +- .../classpath/gnu/java/awt/peer/x/XFontPeer.java | 4 +- .../classpath/gnu/java/awt/peer/x/XFramePeer.java | 3 +- .../classpath/gnu/java/awt/peer/x/XGraphics2D.java | 28 +- .../java/awt/peer/x/XGraphicsConfiguration.java | 9 +- .../gnu/java/awt/peer/x/XGraphicsDevice.java | 27 +- libjava/classpath/gnu/java/awt/peer/x/XImage.java | 71 +- .../classpath/gnu/java/awt/peer/x/XToolkit.java | 50 +- .../classpath/gnu/java/awt/peer/x/XWindowPeer.java | 37 +- .../classpath/gnu/java/lang/CPStringBuilder.java | 1161 ++ libjava/classpath/gnu/java/lang/ClassHelper.java | 2 +- .../java/lang/reflect/GenericSignatureParser.java | 16 +- .../gnu/java/lang/reflect/TypeSignature.java | 6 +- libjava/classpath/gnu/java/math/GMP.java | 474 + .../gnu/java/net/protocol/ftp/FTPConnection.java | 12 +- .../java/net/protocol/http/ChunkedInputStream.java | 4 +- .../gnu/java/net/protocol/http/Cookie.java | 4 +- .../gnu/java/net/protocol/http/HTTPConnection.java | 6 +- .../gnu/java/net/protocol/http/Headers.java | 4 +- .../protocol/http/LimitedLengthInputStream.java | 34 +- .../gnu/java/net/protocol/http/Request.java | 7 +- .../gnu/java/net/protocol/jar/Handler.java | 6 +- .../gnu/java/nio/charset/ByteDecodeLoopHelper.java | 6 +- .../gnu/java/nio/charset/ByteEncodeLoopHelper.java | 6 +- .../gnu/java/rmi/server/RMIClassLoaderImpl.java | 6 +- .../classpath/gnu/java/rmi/server/RMIHashes.java | 4 +- libjava/classpath/gnu/java/security/Engine.java | 4 +- libjava/classpath/gnu/java/security/OID.java | 4 +- .../classpath/gnu/java/security/PolicyFile.java | 8 +- .../classpath/gnu/java/security/der/BitString.java | 4 +- .../classpath/gnu/java/security/der/DERReader.java | 8 +- .../gnu/java/security/hash/Whirlpool.java | 20 +- .../gnu/java/security/jce/sig/DSSParameters.java | 4 +- .../gnu/java/security/key/dss/DSSKey.java | 4 +- .../gnu/java/security/key/dss/DSSPrivateKey.java | 4 +- .../gnu/java/security/key/dss/DSSPublicKey.java | 4 +- .../gnu/java/security/key/rsa/GnuRSAKey.java | 4 +- .../java/security/key/rsa/GnuRSAPrivateKey.java | 4 +- .../gnu/java/security/key/rsa/GnuRSAPublicKey.java | 4 +- .../security/provider/X509CertificateFactory.java | 5 +- .../gnu/java/security/util/ByteArray.java | 6 +- libjava/classpath/gnu/java/security/util/Util.java | 10 +- .../gnu/java/security/x509/PolicyNodeImpl.java | 4 +- libjava/classpath/gnu/java/security/x509/Util.java | 10 +- .../java/security/x509/X500DistinguishedName.java | 10 +- .../gnu/java/text/AttributedFormatBuffer.java | 24 +- .../gnu/java/text/StringFormatBuffer.java | 2 +- libjava/classpath/gnu/java/util/Base64.java | 4 +- .../classpath/gnu/java/util/EmptyEnumeration.java | 18 +- .../gnu/java/util/prefs/EventDispatcher.java | 113 - .../gnu/java/util/prefs/GConfBasedPreferences.java | 6 +- .../classpath/gnu/java/util/prefs/NodeWriter.java | 4 +- .../gnu/java/util/prefs/gconf/GConfNativePeer.java | 99 +- .../gnu/java/util/regex/BacktrackStack.java | 128 +- .../classpath/gnu/java/util/regex/CharIndexed.java | 29 +- .../gnu/java/util/regex/CharIndexedCharArray.java | 12 +- .../java/util/regex/CharIndexedCharSequence.java | 130 +- .../java/util/regex/CharIndexedInputStream.java | 448 +- .../gnu/java/util/regex/CharIndexedString.java | 10 +- .../java/util/regex/CharIndexedStringBuffer.java | 10 +- libjava/classpath/gnu/java/util/regex/RE.java | 4828 +++++---- .../classpath/gnu/java/util/regex/REException.java | 66 +- .../gnu/java/util/regex/REFilterInputStream.java | 97 +- libjava/classpath/gnu/java/util/regex/REMatch.java | 382 +- .../gnu/java/util/regex/REMatchEnumeration.java | 76 +- .../classpath/gnu/java/util/regex/RESyntax.java | 369 +- libjava/classpath/gnu/java/util/regex/REToken.java | 196 +- .../classpath/gnu/java/util/regex/RETokenAny.java | 84 +- .../gnu/java/util/regex/RETokenBackRef.java | 86 +- .../classpath/gnu/java/util/regex/RETokenChar.java | 183 +- .../classpath/gnu/java/util/regex/RETokenEnd.java | 125 +- .../java/util/regex/RETokenEndOfPreviousMatch.java | 72 +- .../gnu/java/util/regex/RETokenEndSub.java | 61 +- .../gnu/java/util/regex/RETokenIndependent.java | 45 +- .../gnu/java/util/regex/RETokenLookAhead.java | 50 +- .../gnu/java/util/regex/RETokenLookBehind.java | 114 +- .../gnu/java/util/regex/RETokenNamedProperty.java | 783 +- .../gnu/java/util/regex/RETokenOneOf.java | 613 +- .../gnu/java/util/regex/RETokenPOSIX.java | 174 +- .../gnu/java/util/regex/RETokenRange.java | 105 +- .../gnu/java/util/regex/RETokenRepeated.java | 1169 +- .../gnu/java/util/regex/RETokenStart.java | 194 +- .../gnu/java/util/regex/RETokenWordBoundary.java | 169 +- .../classpath/gnu/java/util/regex/UncheckedRE.java | 31 +- .../gnu/javax/activation/viewers/ImageViewer.java | 138 + .../gnu/javax/activation/viewers/TextEditor.java | 119 + .../gnu/javax/activation/viewers/TextViewer.java | 81 + .../crypto/assembly/TransformerException.java | 4 +- .../gnu/javax/crypto/cipher/BaseCipher.java | 4 +- .../gnu/javax/crypto/jce/sig/DHParameters.java | 4 +- .../javax/crypto/key/KeyAgreementException.java | 4 +- .../classpath/gnu/javax/crypto/mode/BaseMode.java | 4 +- .../classpath/gnu/javax/crypto/pad/BasePad.java | 4 +- .../gnu/javax/crypto/sasl/crammd5/CramMD5Util.java | 4 +- .../javax/crypto/sasl/crammd5/PasswordFile.java | 6 +- .../gnu/javax/crypto/sasl/plain/PasswordFile.java | 6 +- .../gnu/javax/crypto/sasl/plain/PlainClient.java | 4 +- .../gnu/javax/crypto/sasl/srp/PasswordFile.java | 12 +- .../gnu/javax/crypto/sasl/srp/SRPClient.java | 4 +- .../gnu/javax/crypto/sasl/srp/SRPServer.java | 4 +- .../gnu/javax/crypto/sasl/srp/ServerStore.java | 4 +- .../gnu/javax/imageio/bmp/BMPImageWriter.java | 1 - .../gnu/javax/imageio/bmp/BMPImageWriterSpi.java | 2 +- libjava/classpath/gnu/javax/management/Server.java | 123 +- .../classpath/gnu/javax/management/Translator.java | 42 +- .../gnu/javax/naming/giop/CorbalocParser.java | 8 +- .../naming/giop/GiopNamingServiceFactory.java | 4 +- .../javax/naming/giop/ListBindingsEnumeration.java | 4 +- .../gnu/javax/naming/giop/ListEnumeration.java | 6 +- .../gnu/javax/naming/ictxImpl/trans/GnuName.java | 4 +- .../gnu/javax/net/ssl/PrivateCredentials.java | 6 +- libjava/classpath/gnu/javax/net/ssl/Session.java | 6 +- .../gnu/javax/net/ssl/provider/HelloRequest.java | 4 +- .../classpath/gnu/javax/net/ssl/provider/Util.java | 10 +- .../classpath/gnu/javax/print/ipp/IppRequest.java | 2 +- .../print/ipp/attribute/RequestedAttributes.java | 4 +- .../gnu/javax/rmi/CORBA/RmiUtilities.java | 11 +- .../security/auth/callback/AWTCallbackHandler.java | 6 +- .../security/auth/login/ConfigFileTokenizer.java | 6 +- .../sampled/gstreamer/io/GstAudioFileReader.java | 4 +- .../swing/text/html/parser/htmlValidator.java | 36 +- .../javax/swing/text/html/parser/models/list.java | 4 +- .../javax/swing/text/html/parser/models/node.java | 4 +- .../swing/text/html/parser/support/Parser.java | 10 +- libjava/classpath/gnu/xml/dom/DomAttr.java | 36 +- libjava/classpath/gnu/xml/dom/DomDocument.java | 8 +- libjava/classpath/gnu/xml/dom/DomElement.java | 26 + libjava/classpath/gnu/xml/dom/DomEvent.java | 13 +- libjava/classpath/gnu/xml/dom/DomNode.java | 12 +- libjava/classpath/gnu/xml/dom/DomNsNode.java | 29 +- libjava/classpath/gnu/xml/dom/DomText.java | 4 +- libjava/classpath/gnu/xml/dom/ls/DomLSInput.java | 4 +- libjava/classpath/gnu/xml/dom/ls/DomLSParser.java | 2 +- libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java | 7 +- .../classpath/gnu/xml/libxmlj/dom/GnomeAttr.java | 4 +- .../gnu/xml/libxmlj/dom/GnomeCharacterData.java | 4 +- .../gnu/xml/libxmlj/dom/GnomeDocument.java | 7 +- .../gnu/xml/libxmlj/dom/GnomeDocumentType.java | 4 +- .../gnu/xml/libxmlj/dom/GnomeElement.java | 4 +- .../classpath/gnu/xml/libxmlj/dom/GnomeEntity.java | 4 +- .../classpath/gnu/xml/libxmlj/dom/GnomeNode.java | 6 +- .../gnu/xml/libxmlj/dom/GnomeNotation.java | 4 +- .../libxmlj/dom/GnomeProcessingInstruction.java | 4 +- .../classpath/gnu/xml/libxmlj/dom/GnomeText.java | 4 +- .../gnu/xml/libxmlj/dom/GnomeXPathResult.java | 4 +- libjava/classpath/gnu/xml/stream/XMLEventImpl.java | 14 +- libjava/classpath/gnu/xml/stream/XMLParser.java | 28 +- .../gnu/xml/transform/AbstractNumberNode.java | 12 +- .../gnu/xml/transform/ApplyTemplatesNode.java | 4 +- .../classpath/gnu/xml/transform/AttributeNode.java | 4 +- libjava/classpath/gnu/xml/transform/Bindings.java | 4 +- .../gnu/xml/transform/CallTemplateNode.java | 17 +- .../classpath/gnu/xml/transform/ChooseNode.java | 4 +- libjava/classpath/gnu/xml/transform/CopyNode.java | 4 +- .../classpath/gnu/xml/transform/CopyOfNode.java | 4 +- .../classpath/gnu/xml/transform/ElementNode.java | 4 +- .../classpath/gnu/xml/transform/ForEachNode.java | 58 +- libjava/classpath/gnu/xml/transform/IfNode.java | 4 +- .../classpath/gnu/xml/transform/MessageNode.java | 4 +- .../classpath/gnu/xml/transform/ParameterNode.java | 44 +- .../xml/transform/ProcessingInstructionNode.java | 4 +- libjava/classpath/gnu/xml/transform/SortKey.java | 62 +- .../gnu/xml/transform/StreamSerializer.java | 18 +- .../classpath/gnu/xml/transform/Stylesheet.java | 129 +- libjava/classpath/gnu/xml/transform/Template.java | 6 +- .../classpath/gnu/xml/transform/TemplateNode.java | 2 +- .../classpath/gnu/xml/transform/TemplatesImpl.java | 17 +- libjava/classpath/gnu/xml/transform/TextNode.java | 4 +- .../gnu/xml/transform/TransformerImpl.java | 6 +- .../xml/transform/TransformerOutputProperties.java | 4 +- .../xml/transform/UnparsedEntityUriFunction.java | 19 +- .../classpath/gnu/xml/transform/ValueOfNode.java | 12 +- libjava/classpath/gnu/xml/transform/WhenNode.java | 4 +- .../classpath/gnu/xml/transform/XSLComparator.java | 108 +- .../gnu/xml/transform/XSLURIResolver.java | 9 +- libjava/classpath/gnu/xml/util/DoParse.java | 4 +- libjava/classpath/gnu/xml/util/XCat.java | 6 +- libjava/classpath/gnu/xml/util/XMLWriter.java | 6 +- .../gnu/xml/validation/datatype/EntitiesType.java | 4 +- .../gnu/xml/validation/datatype/NMTokensType.java | 4 +- .../classpath/gnu/xml/xpath/ArithmeticExpr.java | 4 +- .../classpath/gnu/xml/xpath/BooleanFunction.java | 4 +- .../classpath/gnu/xml/xpath/CeilingFunction.java | 4 +- .../classpath/gnu/xml/xpath/ConcatFunction.java | 22 +- .../classpath/gnu/xml/xpath/ContainsFunction.java | 5 +- libjava/classpath/gnu/xml/xpath/CountFunction.java | 7 +- .../gnu/xml/xpath/DocumentOrderComparator.java | 12 +- libjava/classpath/gnu/xml/xpath/EqualityExpr.java | 36 +- libjava/classpath/gnu/xml/xpath/Expr.java | 75 +- libjava/classpath/gnu/xml/xpath/FloorFunction.java | 5 +- libjava/classpath/gnu/xml/xpath/Function.java | 2 +- libjava/classpath/gnu/xml/xpath/FunctionCall.java | 26 +- libjava/classpath/gnu/xml/xpath/IdFunction.java | 7 +- libjava/classpath/gnu/xml/xpath/LangFunction.java | 5 +- .../classpath/gnu/xml/xpath/LocalNameFunction.java | 13 +- libjava/classpath/gnu/xml/xpath/NameFunction.java | 18 +- .../gnu/xml/xpath/NamespaceUriFunction.java | 13 +- .../gnu/xml/xpath/NormalizeSpaceFunction.java | 9 +- libjava/classpath/gnu/xml/xpath/NotFunction.java | 5 +- .../classpath/gnu/xml/xpath/NumberFunction.java | 5 +- .../classpath/gnu/xml/xpath/ParenthesizedExpr.java | 7 +- libjava/classpath/gnu/xml/xpath/Path.java | 2 +- libjava/classpath/gnu/xml/xpath/Root.java | 10 +- libjava/classpath/gnu/xml/xpath/RoundFunction.java | 5 +- libjava/classpath/gnu/xml/xpath/Selector.java | 48 +- .../gnu/xml/xpath/StartsWithFunction.java | 4 +- libjava/classpath/gnu/xml/xpath/Steps.java | 61 +- .../classpath/gnu/xml/xpath/StringFunction.java | 4 +- .../gnu/xml/xpath/StringLengthFunction.java | 3 +- .../gnu/xml/xpath/SubstringAfterFunction.java | 4 +- .../gnu/xml/xpath/SubstringBeforeFunction.java | 4 +- .../classpath/gnu/xml/xpath/SubstringFunction.java | 7 +- libjava/classpath/gnu/xml/xpath/SumFunction.java | 12 +- .../classpath/gnu/xml/xpath/TranslateFunction.java | 10 +- libjava/classpath/gnu/xml/xpath/UnionExpr.java | 21 +- .../classpath/gnu/xml/xpath/VariableReference.java | 4 +- libjava/classpath/gnu/xml/xpath/XPathParser.java | 88 +- libjava/classpath/gnu/xml/xpath/XPathParser.y | 62 +- .../classpath/gnu/xml/xpath/XPathTokenizer.java | 10 +- libjava/classpath/include/Makefile.am | 3 + libjava/classpath/include/Makefile.in | 28 +- libjava/classpath/include/config.h.in | 12 + libjava/classpath/include/gnu_java_math_GMP.h | 58 + .../gnu_java_util_prefs_gconf_GConfNativePeer.h | 16 +- libjava/classpath/include/java_io_VMFile.h | 1 + .../include/java_net_VMNetworkInterface.h | 4 + libjava/classpath/include/jni.h | 481 +- libjava/classpath/java/awt/AlphaComposite.java | 35 + libjava/classpath/java/awt/Component.java | 6 +- libjava/classpath/java/awt/Container.java | 4 +- libjava/classpath/java/awt/JobAttributes.java | 4 +- libjava/classpath/java/awt/MouseInfo.java | 7 + .../classpath/java/awt/datatransfer/MimeType.java | 4 +- libjava/classpath/java/awt/event/ActionEvent.java | 8 +- .../classpath/java/awt/event/ComponentEvent.java | 4 +- .../classpath/java/awt/event/HierarchyEvent.java | 4 +- libjava/classpath/java/awt/event/InputEvent.java | 3 +- .../classpath/java/awt/event/InputMethodEvent.java | 6 +- libjava/classpath/java/awt/event/KeyEvent.java | 3 +- libjava/classpath/java/awt/event/MouseEvent.java | 3 +- libjava/classpath/java/awt/event/WindowEvent.java | 4 +- libjava/classpath/java/awt/font/TextLayout.java | 4 +- .../java/awt/image/BandedSampleModel.java | 3 +- .../classpath/java/awt/image/BufferedImage.java | 6 +- libjava/classpath/java/awt/image/ColorModel.java | 4 +- .../java/awt/image/ComponentColorModel.java | 2 +- .../classpath/java/awt/image/DirectColorModel.java | 6 +- .../awt/image/MultiPixelPackedSampleModel.java | 3 +- libjava/classpath/java/awt/image/Raster.java | 4 +- .../awt/image/SinglePixelPackedSampleModel.java | 3 +- .../classpath/java/awt/image/WritableRaster.java | 23 +- libjava/classpath/java/beans/Statement.java | 4 +- .../beancontext/BeanContextServicesSupport.java | 5 + libjava/classpath/java/io/BufferedReader.java | 4 +- libjava/classpath/java/io/DataInputStream.java | 6 +- libjava/classpath/java/io/File.java | 6 +- libjava/classpath/java/io/StreamTokenizer.java | 8 +- .../classpath/java/lang/AbstractStringBuffer.java | 1037 ++ libjava/classpath/java/lang/Byte.java | 18 +- libjava/classpath/java/lang/Character.java | 13 +- libjava/classpath/java/lang/ClassLoader.java | 2 +- libjava/classpath/java/lang/Double.java | 41 +- libjava/classpath/java/lang/Enum.java | 5 +- libjava/classpath/java/lang/Float.java | 42 +- .../java/lang/InheritableThreadLocal.java | 24 +- libjava/classpath/java/lang/Integer.java | 126 +- libjava/classpath/java/lang/Long.java | 146 +- libjava/classpath/java/lang/Short.java | 19 +- libjava/classpath/java/lang/String.java | 3 +- libjava/classpath/java/lang/StringBuffer.java | 414 +- libjava/classpath/java/lang/StringBuilder.java | 505 +- libjava/classpath/java/lang/Thread.java | 16 +- libjava/classpath/java/lang/ThreadLocal.java | 39 +- libjava/classpath/java/lang/ThreadLocalMap.java | 325 + libjava/classpath/java/lang/Throwable.java | 6 +- .../java/lang/reflect/AccessibleObject.java | 51 + .../classpath/java/lang/reflect/Constructor.java | 453 + libjava/classpath/java/lang/reflect/Field.java | 735 ++ libjava/classpath/java/lang/reflect/Method.java | 497 + libjava/classpath/java/lang/reflect/Modifier.java | 24 +- libjava/classpath/java/lang/reflect/Proxy.java | 6 +- libjava/classpath/java/math/BigDecimal.java | 12 +- libjava/classpath/java/math/BigInteger.java | 566 +- libjava/classpath/java/net/Inet4Address.java | 4 +- libjava/classpath/java/net/Inet6Address.java | 4 +- libjava/classpath/java/net/NetworkInterface.java | 54 +- libjava/classpath/java/net/SocketPermission.java | 4 +- libjava/classpath/java/net/URI.java | 20 +- libjava/classpath/java/net/URLClassLoader.java | 6 +- libjava/classpath/java/net/URLDecoder.java | 4 +- libjava/classpath/java/net/URLEncoder.java | 4 +- libjava/classpath/java/net/URLStreamHandler.java | 4 +- libjava/classpath/java/nio/Buffer.java | 18 +- libjava/classpath/java/nio/ByteBuffer.java | 16 +- libjava/classpath/java/nio/ByteBufferImpl.java | 18 +- libjava/classpath/java/nio/CharBuffer.java | 18 +- libjava/classpath/java/nio/CharBufferImpl.java | 12 +- libjava/classpath/java/nio/CharSequenceBuffer.java | 9 +- libjava/classpath/java/nio/CharViewBufferImpl.java | 20 +- .../classpath/java/nio/DirectByteBufferImpl.java | 6 +- libjava/classpath/java/nio/DoubleBuffer.java | 15 +- libjava/classpath/java/nio/DoubleBufferImpl.java | 18 +- .../classpath/java/nio/DoubleViewBufferImpl.java | 18 +- libjava/classpath/java/nio/FloatBuffer.java | 15 +- libjava/classpath/java/nio/FloatBufferImpl.java | 9 +- .../classpath/java/nio/FloatViewBufferImpl.java | 18 +- libjava/classpath/java/nio/IntBuffer.java | 18 +- libjava/classpath/java/nio/IntBufferImpl.java | 6 +- libjava/classpath/java/nio/IntViewBufferImpl.java | 18 +- libjava/classpath/java/nio/LongBuffer.java | 15 +- libjava/classpath/java/nio/LongBufferImpl.java | 18 +- libjava/classpath/java/nio/LongViewBufferImpl.java | 18 +- libjava/classpath/java/nio/MappedByteBuffer.java | 8 +- .../classpath/java/nio/MappedByteBufferImpl.java | 5 +- libjava/classpath/java/nio/ShortBuffer.java | 16 +- libjava/classpath/java/nio/ShortBufferImpl.java | 18 +- .../classpath/java/nio/ShortViewBufferImpl.java | 18 +- libjava/classpath/java/nio/channels/FileLock.java | 5 +- .../classpath/java/rmi/activation/Activatable.java | 6 +- libjava/classpath/java/rmi/dgc/VMID.java | 4 +- .../java/security/AlgorithmParameterGenerator.java | 4 +- .../java/security/AlgorithmParameters.java | 4 +- libjava/classpath/java/security/CodeSource.java | 4 +- libjava/classpath/java/security/KeyFactory.java | 4 +- .../classpath/java/security/KeyPairGenerator.java | 4 +- libjava/classpath/java/security/MessageDigest.java | 8 +- libjava/classpath/java/security/Permission.java | 4 +- .../java/security/PermissionCollection.java | 4 +- .../classpath/java/security/ProtectionDomain.java | 4 +- libjava/classpath/java/security/SecureRandom.java | 3 +- libjava/classpath/java/security/Signature.java | 4 +- libjava/classpath/java/security/cert/CertPath.java | 4 +- .../java/security/cert/CertPathBuilder.java | 4 +- .../java/security/cert/CertPathValidator.java | 4 +- .../classpath/java/security/cert/CertStore.java | 4 +- .../java/security/cert/PKIXBuilderParameters.java | 4 +- .../security/cert/PKIXCertPathBuilderResult.java | 4 +- .../java/security/cert/PolicyQualifierInfo.java | 6 +- .../java/security/cert/X509CRLSelector.java | 3 +- .../java/security/cert/X509CertSelector.java | 3 +- libjava/classpath/java/text/AttributedString.java | 4 +- libjava/classpath/java/text/ChoiceFormat.java | 10 +- .../java/text/CollationElementIterator.java | 4 +- libjava/classpath/java/text/Collator.java | 2 + libjava/classpath/java/text/DateFormat.java | 90 +- libjava/classpath/java/text/DateFormatSymbols.java | 98 +- libjava/classpath/java/text/DecimalFormat.java | 53 +- .../classpath/java/text/DecimalFormatSymbols.java | 4 +- libjava/classpath/java/text/Format.java | 2 +- libjava/classpath/java/text/MessageFormat.java | 8 +- libjava/classpath/java/text/NumberFormat.java | 2 +- libjava/classpath/java/text/RuleBasedCollator.java | 2 +- libjava/classpath/java/text/SimpleDateFormat.java | 30 +- .../classpath/java/util/AbstractCollection.java | 4 +- libjava/classpath/java/util/AbstractMap.java | 4 +- libjava/classpath/java/util/ArrayList.java | 21 +- libjava/classpath/java/util/Arrays.java | 24 +- libjava/classpath/java/util/BitSet.java | 5 +- libjava/classpath/java/util/Calendar.java | 36 +- libjava/classpath/java/util/Collections.java | 4 +- libjava/classpath/java/util/Currency.java | 2 +- libjava/classpath/java/util/Date.java | 4 +- libjava/classpath/java/util/Formatter.java | 28 +- libjava/classpath/java/util/Hashtable.java | 4 +- libjava/classpath/java/util/Locale.java | 7 +- libjava/classpath/java/util/Properties.java | 42 +- .../java/util/PropertyResourceBundle.java | 19 +- libjava/classpath/java/util/ResourceBundle.java | 70 +- libjava/classpath/java/util/Scanner.java | 2223 ++++ libjava/classpath/java/util/Stack.java | 6 +- libjava/classpath/java/util/TimeZone.java | 6 +- libjava/classpath/java/util/TreeMap.java | 6 +- libjava/classpath/java/util/Vector.java | 43 +- .../classpath/java/util/logging/FileHandler.java | 4 +- libjava/classpath/java/util/logging/Logger.java | 4 +- .../java/util/logging/SimpleFormatter.java | 4 +- .../classpath/java/util/logging/XMLFormatter.java | 20 +- .../java/util/prefs/AbstractPreferences.java | 55 +- libjava/classpath/java/util/regex/Matcher.java | 289 +- libjava/classpath/java/util/regex/Pattern.java | 6 +- .../java/util/regex/PatternSyntaxException.java | 4 +- libjava/classpath/java/util/zip/Deflater.java | 2 - libjava/classpath/java/util/zip/Inflater.java | 2 - libjava/classpath/java/util/zip/ZipEntry.java | 166 +- libjava/classpath/java/util/zip/ZipFile.java | 2 +- .../javax/accessibility/AccessibleRelationSet.java | 4 +- .../javax/accessibility/AccessibleStateSet.java | 4 +- .../javax/activation/ActivationDataFlavor.java | 161 + .../classpath/javax/activation/CommandInfo.java | 117 + libjava/classpath/javax/activation/CommandMap.java | 212 + .../classpath/javax/activation/CommandObject.java | 62 + .../javax/activation/DataContentHandler.java | 85 + .../activation/DataContentHandlerFactory.java | 56 + .../classpath/javax/activation/DataHandler.java | 482 + .../javax/activation/DataHandlerDataSource.java | 84 + libjava/classpath/javax/activation/DataSource.java | 76 + .../activation/DataSourceDataContentHandler.java | 126 + .../classpath/javax/activation/FileDataSource.java | 123 + .../classpath/javax/activation/FileTypeMap.java | 108 + .../javax/activation/MailcapCommandMap.java | 804 ++ libjava/classpath/javax/activation/MimeType.java | 293 + .../javax/activation/MimeTypeParameterList.java | 336 + .../javax/activation/MimeTypeParseException.java | 84 + .../javax/activation/MimetypesFileTypeMap.java | 440 + .../javax/activation/ObjectDataContentHandler.java | 128 + .../classpath/javax/activation/URLDataSource.java | 138 + .../activation/UnsupportedDataTypeException.java | 70 + libjava/classpath/javax/activation/package.html | 44 + libjava/classpath/javax/imageio/ImageIO.java | 1 + .../imageio/plugins/jpeg/JPEGHuffmanTable.java | 4 +- .../javax/imageio/plugins/jpeg/JPEGQTable.java | 4 +- .../javax/imageio/stream/ImageInputStreamImpl.java | 4 +- .../javax/management/DefaultLoaderRepository.java | 4 + libjava/classpath/javax/management/JMX.java | 2 + .../javax/management/MBeanAttributeInfo.java | 4 +- .../javax/management/MBeanConstructorInfo.java | 4 +- .../javax/management/MBeanOperationInfo.java | 4 +- .../javax/management/MBeanPermission.java | 32 +- .../javax/management/MBeanServerDelegate.java | 12 +- .../javax/management/MBeanServerFactory.java | 7 +- .../management/MBeanServerInvocationHandler.java | 4 +- .../javax/management/MBeanServerPermission.java | 18 +- libjava/classpath/javax/management/ObjectName.java | 33 +- .../classpath/javax/management/StandardMBean.java | 24 +- .../javax/management/openmbean/ArrayType.java | 23 +- .../management/openmbean/CompositeDataSupport.java | 11 +- .../javax/management/openmbean/CompositeType.java | 6 +- .../openmbean/OpenMBeanAttributeInfoSupport.java | 23 +- .../management/openmbean/OpenMBeanInfoSupport.java | 8 +- .../openmbean/OpenMBeanParameterInfoSupport.java | 23 +- .../javax/management/openmbean/SimpleType.java | 2 +- .../management/openmbean/TabularDataSupport.java | 31 +- .../javax/management/openmbean/TabularType.java | 5 +- .../javax/management/remote/rmi/RMIConnection.java | 10 + libjava/classpath/javax/naming/BinaryRefAddr.java | 4 +- libjava/classpath/javax/naming/CompositeName.java | 6 +- libjava/classpath/javax/naming/CompoundName.java | 6 +- .../classpath/javax/naming/NamingException.java | 4 +- .../classpath/javax/naming/spi/NamingManager.java | 4 +- .../javax/security/auth/x500/X500Principal.java | 10 +- .../javax/security/sasl/SaslException.java | 4 +- .../classpath/javax/sound/sampled/AudioFormat.java | 4 +- .../javax/sound/sampled/CompoundControl.java | 4 +- .../classpath/javax/sound/sampled/DataLine.java | 4 +- libjava/classpath/javax/swing/AbstractButton.java | 4 +- libjava/classpath/javax/swing/JButton.java | 4 +- libjava/classpath/javax/swing/JComboBox.java | 4 +- libjava/classpath/javax/swing/JComponent.java | 4 +- libjava/classpath/javax/swing/JDesktopPane.java | 4 +- libjava/classpath/javax/swing/JFileChooser.java | 4 +- libjava/classpath/javax/swing/JFrame.java | 4 +- libjava/classpath/javax/swing/JLabel.java | 4 +- libjava/classpath/javax/swing/JList.java | 4 +- libjava/classpath/javax/swing/JMenuBar.java | 4 +- libjava/classpath/javax/swing/JPopupMenu.java | 4 +- libjava/classpath/javax/swing/JProgressBar.java | 4 +- libjava/classpath/javax/swing/JScrollBar.java | 4 +- libjava/classpath/javax/swing/JSlider.java | 4 +- libjava/classpath/javax/swing/JSplitPane.java | 4 +- libjava/classpath/javax/swing/JTabbedPane.java | 4 +- libjava/classpath/javax/swing/JToolBar.java | 4 +- libjava/classpath/javax/swing/JToolTip.java | 4 +- libjava/classpath/javax/swing/UIManager.java | 4 +- .../javax/swing/event/EventListenerList.java | 4 +- .../javax/swing/table/AbstractTableModel.java | 4 +- .../javax/swing/text/AbstractDocument.java | 4 +- .../javax/swing/text/DefaultEditorKit.java | 4 +- .../javax/swing/text/DefaultStyledDocument.java | 6 +- .../classpath/javax/swing/text/JTextComponent.java | 4 +- .../classpath/javax/swing/text/MaskFormatter.java | 6 +- libjava/classpath/javax/swing/text/TabSet.java | 4 +- .../classpath/javax/swing/text/html/CSSParser.java | 6 - .../javax/swing/text/html/HTMLWriter.java | 6 +- .../javax/swing/text/html/StyleSheet.java | 39 +- .../javax/swing/text/html/ViewAttributeSet.java | 6 +- .../javax/swing/tree/DefaultMutableTreeNode.java | 2 +- .../swing/tree/DefaultTreeSelectionModel.java | 4 +- libjava/classpath/javax/tools/FileObject.java | 6 +- .../javax/xml/datatype/DatatypeFactory.java | 8 +- .../javax/xml/namespace/NamespaceContext.java | 1 + libjava/classpath/javax/xml/namespace/QName.java | 4 +- .../javax/xml/parsers/DocumentBuilderFactory.java | 2 +- .../javax/xml/parsers/SAXParserFactory.java | 2 +- .../javax/xml/stream/XMLEventFactory.java | 7 +- .../classpath/javax/xml/stream/XMLEventReader.java | 1 + .../javax/xml/stream/XMLInputFactory.java | 2 +- .../javax/xml/stream/XMLOutputFactory.java | 2 +- libjava/classpath/javax/xml/stream/events/DTD.java | 2 + .../javax/xml/stream/events/EndElement.java | 1 + .../javax/xml/stream/events/StartElement.java | 2 + .../javax/xml/transform/TransformerException.java | 5 +- .../javax/xml/transform/TransformerFactory.java | 4 +- .../javax/xml/validation/SchemaFactory.java | 4 +- .../classpath/javax/xml/xpath/XPathFactory.java | 2 +- .../classpath/javax/xml/xpath/XPathFunction.java | 1 + libjava/classpath/lib/Makefile.am | 40 +- libjava/classpath/lib/Makefile.in | 51 +- libjava/classpath/lib/copy-vmresources.sh.in | 4 +- .../classpath/lib/gnu/CORBA/BigDecimalHelper.class | Bin 3255 -> 3290 bytes .../gnu/CORBA/CDR/LittleEndianInputStream.class | Bin 4549 -> 4570 bytes libjava/classpath/lib/gnu/CORBA/CDR/Vio.class | Bin 21547 -> 21568 bytes .../classpath/lib/gnu/CORBA/CDR/gnuRuntime$1.class | Bin 984 -> 984 bytes .../lib/gnu/CORBA/CDR/gnuRuntime$Entry.class | Bin 886 -> 886 bytes .../lib/gnu/CORBA/CDR/gnuRuntime$Redirection.class | Bin 672 -> 672 bytes .../classpath/lib/gnu/CORBA/CDR/gnuRuntime.class | Bin 4831 -> 4852 bytes .../lib/gnu/CORBA/GIOP/MessageHeader.class | Bin 6691 -> 6719 bytes .../lib/gnu/CORBA/GIOP/RequestHeader.class | Bin 1442 -> 1463 bytes .../lib/gnu/CORBA/GIOP/v1_0/ReplyHeader.class | Bin 2441 -> 2469 bytes .../lib/gnu/CORBA/GIOP/v1_0/RequestHeader.class | Bin 3122 -> 3150 bytes .../IOR$CodeSets_profile$CodeSet_component.class | Bin 2363 -> 2391 bytes .../lib/gnu/CORBA/IOR$CodeSets_profile.class | Bin 2149 -> 2149 bytes .../lib/gnu/CORBA/IOR$Internet_profile.class | Bin 2861 -> 2896 bytes libjava/classpath/lib/gnu/CORBA/IOR.class | Bin 8940 -> 8975 bytes .../lib/gnu/CORBA/NamingService/NameParser.class | Bin 9789 -> 9817 bytes .../gnu/CORBA/NamingService/NameTransformer.class | Bin 4814 -> 4849 bytes .../classpath/lib/gnu/CORBA/OrbFunctional.class | Bin 24797 -> 24801 bytes .../lib/gnu/CORBA/Poa/gnuPOA$RefTemplate.class | Bin 1993 -> 1993 bytes libjava/classpath/lib/gnu/CORBA/Poa/gnuPOA.class | Bin 25950 -> 25978 bytes .../lib/gnu/CORBA/Poa/gnuServantObject.class | Bin 14508 -> 14536 bytes .../lib/gnu/classpath/Configuration.class | Bin 857 -> 908 bytes .../lib/gnu/classpath/SystemProperties.class | Bin 2655 -> 2659 bytes .../jdwp/processor/VirtualMachineCommandSet.class | Bin 9298 -> 9301 bytes .../lib/gnu/classpath/jdwp/util/Signature.class | Bin 2661 -> 2696 bytes .../awt/font/OpenTypeFontPeer$XFontMetrics.class | Bin 2812 -> 2812 bytes .../awt/font/OpenTypeFontPeer$XLineMetrics.class | Bin 2787 -> 2787 bytes .../lib/gnu/java/awt/font/OpenTypeFontPeer.class | Bin 9903 -> 9927 bytes .../lib/gnu/java/awt/font/autofit/Edge.class | Bin 1636 -> 1799 bytes .../lib/gnu/java/awt/font/autofit/LatinBlue.class | Bin 999 -> 1023 bytes .../lib/gnu/java/awt/font/autofit/Segment.class | Bin 1926 -> 1962 bytes .../lib/gnu/java/awt/font/autofit/Width.class | Bin 823 -> 847 bytes .../gnu/java/awt/font/opentype/GlyphNamer.class | Bin 21906 -> 21934 bytes .../java/awt/font/opentype/truetype/Fixed.class | Bin 2303 -> 2338 bytes .../java/awt/font/opentype/truetype/Point.class | Bin 3821 -> 3845 bytes .../font/opentype/truetype/VirtualMachine.class | Bin 25434 -> 25469 bytes .../gnu/java/awt/java2d/AbstractGraphics2D.class | Bin 29260 -> 31188 bytes .../lib/gnu/java/awt/java2d/ActiveEdges.class | Bin 2545 -> 2575 bytes .../lib/gnu/java/awt/java2d/RasterGraphics.class | Bin 940 -> 1388 bytes .../gnu/java/awt/java2d/ScanlineConverter.class | Bin 6616 -> 6616 bytes .../lib/gnu/java/awt/peer/GnomeDesktopPeer.class | Bin 2612 -> 2670 bytes .../lib/gnu/java/awt/peer/KDEDesktopPeer.class | Bin 2336 -> 2394 bytes .../peer/gtk/GdkFontPeer$GdkFontLineMetrics.class | Bin 1705 -> 1705 bytes .../awt/peer/gtk/GdkFontPeer$GdkFontMetrics.class | Bin 2341 -> 2341 bytes .../lib/gnu/java/awt/peer/gtk/GdkFontPeer.class | Bin 9446 -> 9467 bytes .../lib/gnu/java/awt/peer/gtk/GtkClipboard.class | Bin 6419 -> 6440 bytes .../lib/gnu/java/lang/CPStringBuilder.class | Bin 0 -> 11746 bytes .../classpath/lib/gnu/java/lang/ClassHelper.class | Bin 3642 -> 3660 bytes .../lib/gnu/java/lang/VMCPStringBuilder.class | Bin 0 -> 1998 bytes .../java/lang/reflect/GenericArrayTypeImpl.class | Bin 1366 -> 1366 bytes .../java/lang/reflect/GenericSignatureParser.class | Bin 5172 -> 5172 bytes .../java/lang/reflect/ParameterizedTypeImpl.class | Bin 3079 -> 3109 bytes .../lib/gnu/java/lang/reflect/TypeSignature.class | Bin 3877 -> 4039 bytes .../gnu/java/lang/reflect/TypeVariableImpl.class | Bin 1659 -> 1659 bytes .../java/lang/reflect/UnresolvedTypeVariable.class | Bin 1892 -> 1892 bytes .../gnu/java/lang/reflect/WildcardTypeImpl.class | Bin 1856 -> 1856 bytes .../classpath/lib/gnu/java/locale/LocaleData.class | Bin 6225 -> 7402 bytes libjava/classpath/lib/gnu/java/math/GMP.class | Bin 0 -> 7517 bytes .../gnu/java/net/protocol/ftp/FTPConnection.class | Bin 16992 -> 17027 bytes .../net/protocol/http/ChunkedInputStream.class | Bin 2676 -> 2728 bytes .../lib/gnu/java/net/protocol/http/Cookie.class | Bin 1894 -> 1918 bytes .../protocol/http/HTTPConnection$Pool$Reaper.class | Bin 1482 -> 1482 bytes .../net/protocol/http/HTTPConnection$Pool.class | Bin 3583 -> 3583 bytes .../java/net/protocol/http/HTTPConnection.class | Bin 10243 -> 10447 bytes .../net/protocol/http/Headers$HeaderElement.class | Bin 571 -> 571 bytes .../lib/gnu/java/net/protocol/http/Headers.class | Bin 6192 -> 6210 bytes .../protocol/http/LimitedLengthInputStream.class | Bin 2288 -> 2288 bytes .../lib/gnu/java/net/protocol/http/Request.class | Bin 15685 -> 15842 bytes .../lib/gnu/java/net/protocol/jar/Handler.class | Bin 3908 -> 3936 bytes .../java/nio/charset/ByteDecodeLoopHelper.class | Bin 2171 -> 2171 bytes .../java/nio/charset/ByteEncodeLoopHelper.class | Bin 2180 -> 2180 bytes .../rmi/server/RMIClassLoaderImpl$CacheKey.class | Bin 1553 -> 1553 bytes .../server/RMIClassLoaderImpl$MyClassLoader.class | Bin 1276 -> 1304 bytes .../gnu/java/rmi/server/RMIClassLoaderImpl.class | Bin 5117 -> 5145 bytes .../lib/gnu/java/rmi/server/RMIHashes.class | Bin 2179 -> 2207 bytes .../classpath/lib/gnu/java/security/Engine.class | Bin 5326 -> 5442 bytes libjava/classpath/lib/gnu/java/security/OID.class | Bin 6174 -> 6202 bytes .../lib/gnu/java/security/PolicyFile$1.class | Bin 2136 -> 2136 bytes .../lib/gnu/java/security/PolicyFile.class | Bin 12896 -> 12910 bytes .../lib/gnu/java/security/der/BitString.class | Bin 3755 -> 3776 bytes .../lib/gnu/java/security/der/DERReader.class | Bin 6823 -> 6844 bytes .../lib/gnu/java/security/hash/Whirlpool.class | Bin 10870 -> 10870 bytes .../gnu/java/security/jce/sig/DSSParameters.class | Bin 4369 -> 4390 bytes .../lib/gnu/java/security/key/dss/DSSKey.class | Bin 2829 -> 2853 bytes .../gnu/java/security/key/dss/DSSPrivateKey.class | Bin 3030 -> 3081 bytes .../gnu/java/security/key/dss/DSSPublicKey.class | Bin 3030 -> 3081 bytes .../lib/gnu/java/security/key/rsa/GnuRSAKey.class | Bin 2347 -> 2365 bytes .../java/security/key/rsa/GnuRSAPrivateKey.class | Bin 4618 -> 4669 bytes .../java/security/key/rsa/GnuRSAPublicKey.class | Bin 2694 -> 2745 bytes .../security/provider/X509CertificateFactory.class | Bin 5056 -> 5077 bytes .../lib/gnu/java/security/util/ByteArray.class | Bin 2137 -> 2165 bytes .../lib/gnu/java/security/util/Util.class | Bin 7620 -> 7655 bytes .../gnu/java/security/x509/PolicyNodeImpl.class | Bin 4472 -> 4514 bytes .../lib/gnu/java/security/x509/Util.class | Bin 2815 -> 2843 bytes .../java/security/x509/X500DistinguishedName.class | Bin 11414 -> 11442 bytes .../lib/gnu/java/text/AttributedFormatBuffer.class | Bin 4193 -> 4282 bytes .../lib/gnu/java/text/StringFormatBuffer.class | Bin 2445 -> 2445 bytes libjava/classpath/lib/gnu/java/util/Base64.class | Bin 3647 -> 3675 bytes .../lib/gnu/java/util/EmptyEnumeration.class | Bin 795 -> 1171 bytes .../lib/gnu/java/util/prefs/EventDispatcher.class | Bin 1330 -> 0 bytes .../java/util/prefs/GConfBasedPreferences.class | Bin 5363 -> 5319 bytes .../lib/gnu/java/util/prefs/NodeWriter.class | Bin 5937 -> 5958 bytes .../java/util/prefs/gconf/GConfNativePeer.class | Bin 2702 -> 2243 bytes .../java/util/regex/BacktrackStack$Backtrack.class | Bin 911 -> 911 bytes .../lib/gnu/java/util/regex/BacktrackStack.class | Bin 1487 -> 1487 bytes .../gnu/java/util/regex/CharIndexedCharArray.class | Bin 508 -> 508 bytes .../java/util/regex/CharIndexedCharSequence.class | Bin 2168 -> 2180 bytes .../java/util/regex/CharIndexedInputStream.class | Bin 3586 -> 3614 bytes .../gnu/java/util/regex/CharIndexedString.class | Bin 458 -> 458 bytes .../java/util/regex/CharIndexedStringBuffer.class | Bin 488 -> 488 bytes .../gnu/java/util/regex/RE$CharExpression.class | Bin 654 -> 654 bytes .../lib/gnu/java/util/regex/RE$CharUnit.class | Bin 516 -> 516 bytes .../lib/gnu/java/util/regex/RE$IntPair.class | Bin 515 -> 515 bytes .../lib/gnu/java/util/regex/RE$NamedProperty.class | Bin 549 -> 549 bytes .../java/util/regex/RE$ParseCharClassResult.class | Bin 632 -> 632 bytes libjava/classpath/lib/gnu/java/util/regex/RE.class | Bin 29677 -> 31303 bytes .../lib/gnu/java/util/regex/REException.class | Bin 2106 -> 2142 bytes .../gnu/java/util/regex/REFilterInputStream.class | Bin 2226 -> 2238 bytes .../lib/gnu/java/util/regex/REMatch.class | Bin 4207 -> 4247 bytes .../gnu/java/util/regex/REMatchEnumeration.class | Bin 2007 -> 2121 bytes .../lib/gnu/java/util/regex/RESyntax.class | Bin 5039 -> 4835 bytes .../lib/gnu/java/util/regex/REToken.class | Bin 4189 -> 4242 bytes .../lib/gnu/java/util/regex/RETokenAny.class | Bin 1863 -> 1895 bytes .../lib/gnu/java/util/regex/RETokenBackRef.class | Bin 1555 -> 1610 bytes .../lib/gnu/java/util/regex/RETokenChar.class | Bin 2825 -> 2873 bytes .../lib/gnu/java/util/regex/RETokenEnd.class | Bin 2560 -> 2612 bytes .../util/regex/RETokenEndOfPreviousMatch.class | Bin 1604 -> 1640 bytes .../lib/gnu/java/util/regex/RETokenEndSub.class | Bin 1668 -> 1696 bytes .../gnu/java/util/regex/RETokenIndependent.class | Bin 1615 -> 1654 bytes .../lib/gnu/java/util/regex/RETokenLookAhead.class | Bin 1537 -> 1580 bytes .../RETokenLookBehind$RETokenMatchHereOnly.class | Bin 1065 -> 1079 bytes .../gnu/java/util/regex/RETokenLookBehind.class | Bin 2393 -> 2432 bytes .../java/util/regex/RETokenNamedProperty$1.class | Bin 849 -> 849 bytes .../util/regex/RETokenNamedProperty$Handler.class | Bin 566 -> 566 bytes .../RETokenNamedProperty$JavaCategoryHandler.class | Bin 1489 -> 1489 bytes .../regex/RETokenNamedProperty$POSIXHandler.class | Bin 1256 -> 1256 bytes .../RETokenNamedProperty$UnicodeBlockHandler.class | Bin 1014 -> 1014 bytes ...kenNamedProperty$UnicodeCategoriesHandler.class | Bin 886 -> 886 bytes ...TokenNamedProperty$UnicodeCategoryHandler.class | Bin 800 -> 800 bytes .../gnu/java/util/regex/RETokenNamedProperty.class | Bin 6999 -> 7043 bytes .../lib/gnu/java/util/regex/RETokenOneOf.class | Bin 6662 -> 7250 bytes .../lib/gnu/java/util/regex/RETokenPOSIX.class | Bin 3820 -> 3903 bytes .../lib/gnu/java/util/regex/RETokenRange.class | Bin 2109 -> 2149 bytes .../util/regex/RETokenRepeated$DoablesFinder.class | Bin 2420 -> 2428 bytes .../regex/RETokenRepeated$FindMatchControl.class | Bin 675 -> 675 bytes .../RETokenRepeated$FindMatchControlStack.class | Bin 1725 -> 0 bytes .../util/regex/RETokenRepeated$StackedInfo.class | Bin 1138 -> 1138 bytes .../regex/RETokenRepeated$TryAnotherResult.class | Bin 768 -> 768 bytes .../lib/gnu/java/util/regex/RETokenRepeated.class | Bin 9461 -> 9414 bytes .../lib/gnu/java/util/regex/RETokenStart.class | Bin 2229 -> 2273 bytes .../gnu/java/util/regex/RETokenWordBoundary.class | Bin 2115 -> 2163 bytes .../lib/gnu/java/util/regex/UncheckedRE.class | Bin 1096 -> 1096 bytes .../gnu/javax/activation/viewers/ImageViewer.class | Bin 0 -> 2745 bytes .../gnu/javax/activation/viewers/TextEditor.class | Bin 0 -> 2359 bytes .../gnu/javax/activation/viewers/TextViewer.class | Bin 0 -> 1413 bytes .../crypto/assembly/TransformerException.class | Bin 1878 -> 1899 bytes .../lib/gnu/javax/crypto/cipher/BaseCipher.class | Bin 4395 -> 4423 bytes .../gnu/javax/crypto/jce/sig/DHParameters.class | Bin 4564 -> 4592 bytes .../javax/crypto/key/KeyAgreementException.class | Bin 1782 -> 1803 bytes .../lib/gnu/javax/crypto/mode/BaseMode.class | Bin 4880 -> 4901 bytes .../lib/gnu/javax/crypto/pad/BasePad.class | Bin 2343 -> 2371 bytes .../javax/crypto/sasl/crammd5/CramMD5Util.class | Bin 2534 -> 2548 bytes .../javax/crypto/sasl/crammd5/PasswordFile.class | Bin 5083 -> 5104 bytes .../gnu/javax/crypto/sasl/plain/PasswordFile.class | Bin 5266 -> 5287 bytes .../gnu/javax/crypto/sasl/plain/PlainClient.class | Bin 3394 -> 3429 bytes .../gnu/javax/crypto/sasl/srp/PasswordFile.class | Bin 11564 -> 11585 bytes .../lib/gnu/javax/crypto/sasl/srp/SRPClient.class | Bin 18659 -> 18687 bytes .../lib/gnu/javax/crypto/sasl/srp/SRPServer.class | Bin 15844 -> 15872 bytes .../gnu/javax/crypto/sasl/srp/ServerStore.class | Bin 2658 -> 2672 bytes .../lib/gnu/javax/imageio/bmp/BMPImageWriter.class | Bin 3379 -> 3350 bytes .../gnu/javax/imageio/bmp/BMPImageWriterSpi.class | Bin 3398 -> 3426 bytes .../management/Server$LazyListenersHolder.class | Bin 0 -> 783 bytes .../gnu/javax/management/Server$ServerInfo.class | Bin 898 -> 898 bytes .../management/Server$ServerInputStream.class | Bin 1219 -> 1291 bytes .../Server$ServerNotificationListener.class | Bin 1282 -> 1282 bytes .../lib/gnu/javax/management/Server.class | Bin 24212 -> 25137 bytes .../lib/gnu/javax/management/Translator.class | Bin 13799 -> 14179 bytes .../lib/gnu/javax/naming/giop/CorbalocParser.class | Bin 7252 -> 7280 bytes .../naming/giop/GiopNamingServiceFactory$1.class | Bin 908 -> 908 bytes .../naming/giop/GiopNamingServiceFactory.class | Bin 3635 -> 3663 bytes .../naming/giop/ListBindingsEnumeration.class | Bin 1743 -> 1771 bytes .../gnu/javax/naming/giop/ListEnumeration.class | Bin 1733 -> 1761 bytes .../ictxImpl/trans/GnuName$GnuNameEnum.class | Bin 1068 -> 1068 bytes .../gnu/javax/naming/ictxImpl/trans/GnuName.class | Bin 4953 -> 4981 bytes .../lib/gnu/javax/net/ssl/PrivateCredentials.class | Bin 9533 -> 9561 bytes .../lib/gnu/javax/net/ssl/Session$ID.class | Bin 1871 -> 1892 bytes .../classpath/lib/gnu/javax/net/ssl/Session.class | Bin 5167 -> 5167 bytes .../gnu/javax/net/ssl/provider/HelloRequest.class | Bin 985 -> 1006 bytes .../lib/gnu/javax/net/ssl/provider/Util$1.class | Bin 692 -> 692 bytes .../lib/gnu/javax/net/ssl/provider/Util$2.class | Bin 725 -> 725 bytes .../net/ssl/provider/Util$WrappedBuffer.class | Bin 773 -> 773 bytes .../lib/gnu/javax/net/ssl/provider/Util.class | Bin 7423 -> 7451 bytes .../javax/print/ipp/IppRequest$RequestWriter.class | Bin 9273 -> 9275 bytes .../print/ipp/attribute/RequestedAttributes.class | Bin 1632 -> 1660 bytes .../lib/gnu/javax/rmi/CORBA/RmiUtilities$1.class | Bin 863 -> 863 bytes .../lib/gnu/javax/rmi/CORBA/RmiUtilities$2.class | Bin 822 -> 822 bytes .../lib/gnu/javax/rmi/CORBA/RmiUtilities.class | Bin 18745 -> 18786 bytes .../auth/callback/AWTCallbackHandler.class | Bin 10086 -> 10107 bytes .../security/auth/login/ConfigFileTokenizer.class | Bin 3414 -> 3435 bytes .../sampled/gstreamer/io/GstAudioFileReader.class | Bin 3894 -> 3908 bytes .../text/html/parser/htmlValidator$hTag.class | Bin 1932 -> 1932 bytes .../swing/text/html/parser/htmlValidator.class | Bin 10489 -> 10524 bytes .../javax/swing/text/html/parser/models/list.class | Bin 4383 -> 4418 bytes .../javax/swing/text/html/parser/models/node.class | Bin 3855 -> 3883 bytes .../swing/text/html/parser/support/Parser$1.class | Bin 859 -> 859 bytes .../swing/text/html/parser/support/Parser$2.class | Bin 1742 -> 1742 bytes .../swing/text/html/parser/support/Parser.class | Bin 20727 -> 20865 bytes libjava/classpath/lib/gnu/xml/dom/DomAttr.class | Bin 5209 -> 5609 bytes .../classpath/lib/gnu/xml/dom/DomDocument.class | Bin 23877 -> 23858 bytes libjava/classpath/lib/gnu/xml/dom/DomElement.class | Bin 8155 -> 8505 bytes .../gnu/xml/dom/DomEvent$DomMutationEvent.class | Bin 1909 -> 1909 bytes .../lib/gnu/xml/dom/DomEvent$DomUIEvent.class | Bin 1038 -> 1038 bytes libjava/classpath/lib/gnu/xml/dom/DomEvent.class | Bin 2406 -> 2427 bytes .../gnu/xml/dom/DomNode$DomEventException.class | Bin 459 -> 459 bytes .../lib/gnu/xml/dom/DomNode$ListenerRecord.class | Bin 1009 -> 1009 bytes .../lib/gnu/xml/dom/DomNode$LiveNodeList.class | Bin 3023 -> 3023 bytes .../lib/gnu/xml/dom/DomNode$ShadowList.class | Bin 1048 -> 1048 bytes libjava/classpath/lib/gnu/xml/dom/DomNode.class | Bin 23045 -> 23073 bytes libjava/classpath/lib/gnu/xml/dom/DomNsNode.class | Bin 2725 -> 3022 bytes libjava/classpath/lib/gnu/xml/dom/DomText.class | Bin 3741 -> 3762 bytes .../classpath/lib/gnu/xml/dom/ls/DomLSInput.class | Bin 2644 -> 2665 bytes .../classpath/lib/gnu/xml/dom/ls/DomLSParser.class | Bin 10784 -> 10785 bytes .../lib/gnu/xml/dom/ls/SAXEventSink.class | Bin 12990 -> 13086 bytes .../lib/gnu/xml/libxmlj/dom/GnomeAttr.class | Bin 1884 -> 1905 bytes .../gnu/xml/libxmlj/dom/GnomeCharacterData.class | Bin 2367 -> 2388 bytes .../lib/gnu/xml/libxmlj/dom/GnomeDocument.class | Bin 10110 -> 10138 bytes .../gnu/xml/libxmlj/dom/GnomeDocumentType.class | Bin 1475 -> 1496 bytes .../lib/gnu/xml/libxmlj/dom/GnomeElement.class | Bin 3362 -> 3383 bytes .../lib/gnu/xml/libxmlj/dom/GnomeEntity.class | Bin 1358 -> 1379 bytes .../lib/gnu/xml/libxmlj/dom/GnomeNode.class | Bin 9218 -> 9239 bytes .../lib/gnu/xml/libxmlj/dom/GnomeNotation.class | Bin 1060 -> 1081 bytes .../libxmlj/dom/GnomeProcessingInstruction.class | Bin 1110 -> 1131 bytes .../lib/gnu/xml/libxmlj/dom/GnomeText.class | Bin 2414 -> 2435 bytes .../lib/gnu/xml/libxmlj/dom/GnomeXPathResult.class | Bin 2237 -> 2265 bytes .../lib/gnu/xml/stream/XMLEventImpl.class | Bin 3112 -> 3140 bytes .../gnu/xml/stream/XMLParser$AnyContentModel.class | Bin 617 -> 617 bytes .../lib/gnu/xml/stream/XMLParser$Attribute.class | Bin 2414 -> 2442 bytes .../gnu/xml/stream/XMLParser$AttributeDecl.class | Bin 897 -> 897 bytes .../gnu/xml/stream/XMLParser$ContentModel.class | Bin 787 -> 787 bytes .../gnu/xml/stream/XMLParser$ContentParticle.class | Bin 595 -> 595 bytes .../lib/gnu/xml/stream/XMLParser$Doctype.class | Bin 5914 -> 5914 bytes .../xml/stream/XMLParser$ElementContentModel.class | Bin 1059 -> 1059 bytes .../xml/stream/XMLParser$EmptyContentModel.class | Bin 623 -> 623 bytes .../lib/gnu/xml/stream/XMLParser$ExternalIds.class | Bin 556 -> 556 bytes .../lib/gnu/xml/stream/XMLParser$Input.class | Bin 6256 -> 6256 bytes .../xml/stream/XMLParser$MixedContentModel.class | Bin 988 -> 988 bytes .../classpath/lib/gnu/xml/stream/XMLParser.class | Bin 67890 -> 68200 bytes .../lib/gnu/xml/transform/AbstractNumberNode.class | Bin 6009 -> 6058 bytes .../lib/gnu/xml/transform/ApplyTemplatesNode.class | Bin 5369 -> 5404 bytes .../lib/gnu/xml/transform/AttributeNode.class | Bin 4870 -> 4905 bytes .../classpath/lib/gnu/xml/transform/Bindings.class | Bin 5240 -> 5268 bytes .../lib/gnu/xml/transform/CallTemplateNode.class | Bin 4096 -> 4150 bytes .../lib/gnu/xml/transform/ChooseNode.class | Bin 1521 -> 1542 bytes .../classpath/lib/gnu/xml/transform/CopyNode.class | Bin 3782 -> 3810 bytes .../lib/gnu/xml/transform/CopyOfNode.class | Bin 4070 -> 4105 bytes .../lib/gnu/xml/transform/ElementNode.class | Bin 6372 -> 6407 bytes .../lib/gnu/xml/transform/ForEachNode.class | Bin 3796 -> 4173 bytes .../classpath/lib/gnu/xml/transform/IfNode.class | Bin 2314 -> 2349 bytes .../lib/gnu/xml/transform/MessageNode.class | Bin 2468 -> 2496 bytes .../lib/gnu/xml/transform/ParameterNode.class | Bin 4111 -> 4441 bytes .../xml/transform/ProcessingInstructionNode.class | Bin 2568 -> 2596 bytes .../classpath/lib/gnu/xml/transform/SortKey.class | Bin 3065 -> 3780 bytes .../lib/gnu/xml/transform/StreamSerializer.class | Bin 17799 -> 17834 bytes .../lib/gnu/xml/transform/Stylesheet.class | Bin 38670 -> 40444 bytes .../classpath/lib/gnu/xml/transform/Template.class | Bin 5603 -> 5674 bytes .../lib/gnu/xml/transform/TemplateNode.class | Bin 2764 -> 2829 bytes .../lib/gnu/xml/transform/TemplatesImpl.class | Bin 1466 -> 2075 bytes .../classpath/lib/gnu/xml/transform/TextNode.class | Bin 2653 -> 2681 bytes .../lib/gnu/xml/transform/TransformerImpl.class | Bin 17191 -> 17219 bytes .../transform/TransformerOutputProperties.class | Bin 3339 -> 3367 bytes .../xml/transform/UnparsedEntityUriFunction.class | Bin 2875 -> 3170 bytes .../lib/gnu/xml/transform/ValueOfNode.class | Bin 3965 -> 3959 bytes .../classpath/lib/gnu/xml/transform/WhenNode.class | Bin 2325 -> 2360 bytes .../lib/gnu/xml/transform/XSLComparator.class | Bin 2207 -> 2419 bytes .../lib/gnu/xml/transform/XSLURIResolver.class | Bin 7205 -> 7357 bytes .../lib/gnu/xml/util/DoParse$MyErrorHandler.class | Bin 1301 -> 1301 bytes libjava/classpath/lib/gnu/xml/util/DoParse.class | Bin 5058 -> 5093 bytes .../classpath/lib/gnu/xml/util/XCat$Catalog.class | Bin 5842 -> 5863 bytes .../lib/gnu/xml/util/XCat$DoneDelegation.class | Bin 372 -> 372 bytes .../classpath/lib/gnu/xml/util/XCat$Loader.class | Bin 10223 -> 10223 bytes libjava/classpath/lib/gnu/xml/util/XCat.class | Bin 7607 -> 7635 bytes libjava/classpath/lib/gnu/xml/util/XMLWriter.class | Bin 26506 -> 26527 bytes .../gnu/xml/validation/datatype/EntitiesType.class | Bin 2090 -> 2111 bytes .../gnu/xml/validation/datatype/NMTokensType.class | Bin 2500 -> 2521 bytes .../lib/gnu/xml/xpath/ArithmeticExpr.class | Bin 2522 -> 2557 bytes .../lib/gnu/xml/xpath/BooleanFunction.class | Bin 1655 -> 1803 bytes .../lib/gnu/xml/xpath/CeilingFunction.class | Bin 1681 -> 1829 bytes .../lib/gnu/xml/xpath/ConcatFunction.class | Bin 2181 -> 2439 bytes .../lib/gnu/xml/xpath/ContainsFunction.class | Bin 1971 -> 2119 bytes .../lib/gnu/xml/xpath/CountFunction.class | Bin 1592 -> 1740 bytes .../gnu/xml/xpath/DocumentOrderComparator.class | Bin 694 -> 793 bytes .../classpath/lib/gnu/xml/xpath/EqualityExpr.class | Bin 4075 -> 4116 bytes .../lib/gnu/xml/xpath/Expr$ExprNodeSet.class | Bin 939 -> 1147 bytes libjava/classpath/lib/gnu/xml/xpath/Expr.class | Bin 8763 -> 9641 bytes .../lib/gnu/xml/xpath/FloorFunction.class | Bin 1674 -> 1822 bytes libjava/classpath/lib/gnu/xml/xpath/Function.class | Bin 156 -> 220 bytes .../classpath/lib/gnu/xml/xpath/FunctionCall.class | Bin 3750 -> 4176 bytes .../classpath/lib/gnu/xml/xpath/IdFunction.class | Bin 1789 -> 1937 bytes .../classpath/lib/gnu/xml/xpath/LangFunction.class | Bin 2382 -> 2530 bytes .../lib/gnu/xml/xpath/LocalNameFunction.class | Bin 1830 -> 2069 bytes .../classpath/lib/gnu/xml/xpath/NameFunction.class | Bin 1797 -> 2036 bytes .../lib/gnu/xml/xpath/NamespaceUriFunction.class | Bin 1848 -> 2087 bytes .../lib/gnu/xml/xpath/NormalizeSpaceFunction.class | Bin 2184 -> 2360 bytes .../classpath/lib/gnu/xml/xpath/NotFunction.class | Bin 1639 -> 1787 bytes .../lib/gnu/xml/xpath/NumberFunction.class | Bin 1651 -> 1799 bytes .../lib/gnu/xml/xpath/ParenthesizedExpr.class | Bin 1627 -> 1815 bytes libjava/classpath/lib/gnu/xml/xpath/Path.class | Bin 356 -> 483 bytes libjava/classpath/lib/gnu/xml/xpath/Root.class | Bin 1538 -> 1818 bytes .../lib/gnu/xml/xpath/RoundFunction.class | Bin 1759 -> 1907 bytes libjava/classpath/lib/gnu/xml/xpath/Selector.class | Bin 8831 -> 9882 bytes .../lib/gnu/xml/xpath/StartsWithFunction.class | Bin 1982 -> 2130 bytes libjava/classpath/lib/gnu/xml/xpath/Steps.class | Bin 4349 -> 5062 bytes .../lib/gnu/xml/xpath/StringFunction.class | Bin 1678 -> 1826 bytes .../lib/gnu/xml/xpath/StringLengthFunction.class | Bin 1853 -> 2001 bytes .../lib/gnu/xml/xpath/SubstringAfterFunction.class | Bin 2036 -> 2184 bytes .../gnu/xml/xpath/SubstringBeforeFunction.class | Bin 2011 -> 2159 bytes .../lib/gnu/xml/xpath/SubstringFunction.class | Bin 2340 -> 2488 bytes .../classpath/lib/gnu/xml/xpath/SumFunction.class | Bin 2040 -> 2261 bytes .../lib/gnu/xml/xpath/TranslateFunction.class | Bin 2543 -> 2673 bytes .../classpath/lib/gnu/xml/xpath/UnionExpr.class | Bin 2105 -> 2414 bytes .../lib/gnu/xml/xpath/VariableReference.class | Bin 2043 -> 2071 bytes .../gnu/xml/xpath/XPathParser$YyCheckClass.class | Bin 7787 -> 7787 bytes .../gnu/xml/xpath/XPathParser$YyDefRedClass.class | Bin 863 -> 863 bytes .../gnu/xml/xpath/XPathParser$YyDgotoClass.class | Bin 669 -> 669 bytes .../gnu/xml/xpath/XPathParser$YyGindexClass.class | Bin 589 -> 589 bytes .../lib/gnu/xml/xpath/XPathParser$YyLenClass.class | Bin 952 -> 952 bytes .../lib/gnu/xml/xpath/XPathParser$YyLhsClass.class | Bin 1018 -> 1018 bytes .../gnu/xml/xpath/XPathParser$YyNameClass.class | Bin 1520 -> 1520 bytes .../gnu/xml/xpath/XPathParser$YyRindexClass.class | Bin 774 -> 774 bytes .../gnu/xml/xpath/XPathParser$YySindexClass.class | Bin 1024 -> 1024 bytes .../gnu/xml/xpath/XPathParser$YyTableClass.class | Bin 5389 -> 5389 bytes .../classpath/lib/gnu/xml/xpath/XPathParser.class | Bin 15438 -> 16014 bytes .../gnu/xml/xpath/XPathTokenizer$XPathToken.class | Bin 796 -> 796 bytes .../lib/gnu/xml/xpath/XPathTokenizer.class | Bin 7255 -> 7353 bytes .../classpath/lib/java/awt/AlphaComposite.class | Bin 3106 -> 3353 bytes ...WTComponent$AccessibleAWTComponentHandler.class | Bin 1391 -> 1391 bytes ...bleAWTComponent$AccessibleAWTFocusHandler.class | Bin 1188 -> 1188 bytes .../awt/Component$AccessibleAWTComponent.class | Bin 7344 -> 7344 bytes .../lib/java/awt/Component$BltBufferStrategy.class | Bin 3283 -> 3283 bytes .../java/awt/Component$FlipBufferStrategy.class | Bin 3475 -> 3475 bytes ...omponent$HeavyweightInLightweightListener.class | Bin 1500 -> 1500 bytes libjava/classpath/lib/java/awt/Component.class | Bin 58484 -> 58512 bytes ...leAWTContainer$AccessibleContainerHandler.class | Bin 1195 -> 1195 bytes .../awt/Container$AccessibleAWTContainer.class | Bin 2043 -> 2043 bytes .../java/awt/Container$GfxPaintAllVisitor.class | Bin 822 -> 822 bytes .../lib/java/awt/Container$GfxPaintVisitor.class | Bin 810 -> 810 bytes .../java/awt/Container$GfxPrintAllVisitor.class | Bin 822 -> 822 bytes .../lib/java/awt/Container$GfxPrintVisitor.class | Bin 810 -> 810 bytes .../lib/java/awt/Container$GfxVisitor.class | Bin 421 -> 421 bytes libjava/classpath/lib/java/awt/Container.class | Bin 26128 -> 26149 bytes .../awt/JobAttributes$DefaultSelectionType.class | Bin 812 -> 812 bytes .../java/awt/JobAttributes$DestinationType.class | Bin 726 -> 726 bytes .../lib/java/awt/JobAttributes$DialogType.class | Bin 768 -> 768 bytes ...obAttributes$MultipleDocumentHandlingType.class | Bin 903 -> 903 bytes .../lib/java/awt/JobAttributes$SidesType.class | Bin 833 -> 833 bytes libjava/classpath/lib/java/awt/JobAttributes.class | Bin 9010 -> 9052 bytes libjava/classpath/lib/java/awt/MouseInfo.class | Bin 1744 -> 1748 bytes .../lib/java/awt/datatransfer/MimeType.class | Bin 4348 -> 4511 bytes .../classpath/lib/java/awt/event/ActionEvent.class | Bin 2338 -> 2366 bytes .../lib/java/awt/event/ComponentEvent.class | Bin 1641 -> 1669 bytes .../lib/java/awt/event/HierarchyEvent.class | Bin 2402 -> 2437 bytes .../classpath/lib/java/awt/event/InputEvent.class | Bin 2833 -> 2854 bytes .../lib/java/awt/event/InputMethodEvent.class | Bin 3854 -> 3896 bytes .../classpath/lib/java/awt/event/KeyEvent.class | Bin 15180 -> 15215 bytes .../classpath/lib/java/awt/event/MouseEvent.class | Bin 4526 -> 4568 bytes .../classpath/lib/java/awt/event/WindowEvent.class | Bin 2974 -> 3009 bytes .../lib/java/awt/font/TextLayout$CaretPolicy.class | Bin 1005 -> 1005 bytes .../lib/java/awt/font/TextLayout$Run.class | Bin 946 -> 946 bytes .../classpath/lib/java/awt/font/TextLayout.class | Bin 23678 -> 23699 bytes .../lib/java/awt/image/BandedSampleModel.class | Bin 10990 -> 11018 bytes .../lib/java/awt/image/BufferedImage$1.class | Bin 2308 -> 2308 bytes .../lib/java/awt/image/BufferedImage.class | Bin 14708 -> 14750 bytes .../classpath/lib/java/awt/image/ColorModel.class | Bin 9110 -> 9110 bytes .../lib/java/awt/image/ComponentColorModel.class | Bin 7615 -> 7615 bytes .../lib/java/awt/image/DirectColorModel.class | Bin 6947 -> 6947 bytes .../awt/image/MultiPixelPackedSampleModel.class | Bin 7107 -> 7135 bytes libjava/classpath/lib/java/awt/image/Raster.class | Bin 11880 -> 11915 bytes .../awt/image/SinglePixelPackedSampleModel.class | Bin 7186 -> 7214 bytes .../lib/java/awt/image/WritableRaster.class | Bin 7103 -> 7062 bytes libjava/classpath/lib/java/beans/Statement.class | Bin 6040 -> 6061 bytes ...tServicesSupport$BCSSProxyServiceProvider.class | Bin 2015 -> 2093 bytes ...ontextServicesSupport$BCSSServiceProvider.class | Bin 1471 -> 1471 bytes .../BeanContextServicesSupport$Request.class | Bin 837 -> 837 bytes .../BeanContextServicesSupport$ServiceLease.class | Bin 1014 -> 1014 bytes ...BeanContextServicesSupport$ServiceRequest.class | Bin 1163 -> 1163 bytes .../beancontext/BeanContextServicesSupport.class | Bin 12828 -> 12828 bytes libjava/classpath/lib/java/io/BufferedReader.class | Bin 5085 -> 5137 bytes .../classpath/lib/java/io/DataInputStream.class | Bin 5487 -> 5539 bytes .../classpath/lib/java/io/StreamTokenizer.class | Bin 6870 -> 6891 bytes .../lib/java/lang/AbstractStringBuffer.class | Bin 0 -> 10215 bytes libjava/classpath/lib/java/lang/Byte.class | Bin 3077 -> 3059 bytes libjava/classpath/lib/java/lang/ClassLoader.class | Bin 12663 -> 12611 bytes libjava/classpath/lib/java/lang/Double.class | Bin 4644 -> 4784 bytes libjava/classpath/lib/java/lang/Enum.class | Bin 3093 -> 3131 bytes libjava/classpath/lib/java/lang/Float.class | Bin 4589 -> 4728 bytes .../lib/java/lang/InheritableThreadLocal.class | Bin 1623 -> 1070 bytes libjava/classpath/lib/java/lang/Integer.class | Bin 6788 -> 7295 bytes libjava/classpath/lib/java/lang/Long.class | Bin 6360 -> 7040 bytes libjava/classpath/lib/java/lang/Short.class | Bin 3282 -> 3265 bytes libjava/classpath/lib/java/lang/String.class | Bin 10265 -> 10376 bytes libjava/classpath/lib/java/lang/StringBuffer.class | Bin 10783 -> 11403 bytes .../classpath/lib/java/lang/StringBuilder.class | Bin 10292 -> 9439 bytes libjava/classpath/lib/java/lang/Thread$State.class | Bin 1242 -> 1242 bytes libjava/classpath/lib/java/lang/Thread.class | Bin 10274 -> 10278 bytes libjava/classpath/lib/java/lang/ThreadLocal.class | Bin 1704 -> 1861 bytes .../lib/java/lang/ThreadLocalMap$Entry.class | Bin 0 -> 710 bytes .../classpath/lib/java/lang/ThreadLocalMap.class | Bin 0 -> 3328 bytes .../lib/java/lang/Throwable$StaticData.class | Bin 598 -> 598 bytes libjava/classpath/lib/java/lang/Throwable.class | Bin 4466 -> 4629 bytes .../lib/java/lang/reflect/AccessibleObject.class | Bin 2646 -> 2646 bytes .../lib/java/lang/reflect/Proxy$ClassFactory.class | Bin 11611 -> 11774 bytes .../lib/java/lang/reflect/Proxy$ProxyData.class | Bin 4144 -> 4144 bytes .../java/lang/reflect/Proxy$ProxySignature.class | Bin 3655 -> 3655 bytes .../lib/java/lang/reflect/Proxy$ProxyType.class | Bin 997 -> 997 bytes .../classpath/lib/java/lang/reflect/Proxy.class | Bin 4462 -> 4462 bytes libjava/classpath/lib/java/math/BigDecimal.class | Bin 18062 -> 18075 bytes libjava/classpath/lib/java/math/BigInteger.class | Bin 30694 -> 35161 bytes libjava/classpath/lib/java/net/Inet4Address.class | Bin 2735 -> 2763 bytes libjava/classpath/lib/java/net/Inet6Address.class | Bin 5032 -> 5060 bytes .../classpath/lib/java/net/SocketPermission.class | Bin 6565 -> 6586 bytes libjava/classpath/lib/java/net/URI.class | Bin 16406 -> 16539 bytes .../classpath/lib/java/net/URLClassLoader$1.class | Bin 1197 -> 1197 bytes .../classpath/lib/java/net/URLClassLoader$2.class | Bin 1099 -> 1099 bytes .../classpath/lib/java/net/URLClassLoader.class | Bin 14494 -> 14679 bytes libjava/classpath/lib/java/net/URLDecoder.class | Bin 1781 -> 1809 bytes libjava/classpath/lib/java/net/URLEncoder.class | Bin 1846 -> 1870 bytes .../classpath/lib/java/net/URLStreamHandler.class | Bin 6389 -> 6417 bytes libjava/classpath/lib/java/nio/Buffer.class | Bin 2875 -> 2898 bytes libjava/classpath/lib/java/nio/ByteBuffer.class | Bin 5629 -> 5758 bytes .../classpath/lib/java/nio/ByteBufferImpl.class | Bin 7873 -> 7902 bytes libjava/classpath/lib/java/nio/CharBuffer.class | Bin 5855 -> 5983 bytes .../classpath/lib/java/nio/CharBufferImpl.class | Bin 3360 -> 3350 bytes .../lib/java/nio/CharSequenceBuffer.class | Bin 2357 -> 2365 bytes .../lib/java/nio/CharViewBufferImpl.class | Bin 3286 -> 3305 bytes .../lib/java/nio/DirectByteBufferImpl.class | Bin 8554 -> 8560 bytes libjava/classpath/lib/java/nio/DoubleBuffer.class | Bin 3594 -> 3714 bytes .../classpath/lib/java/nio/DoubleBufferImpl.class | Bin 2345 -> 2374 bytes .../lib/java/nio/DoubleViewBufferImpl.class | Bin 2973 -> 2987 bytes libjava/classpath/lib/java/nio/FloatBuffer.class | Bin 3548 -> 3668 bytes .../classpath/lib/java/nio/FloatBufferImpl.class | Bin 2338 -> 2343 bytes .../lib/java/nio/FloatViewBufferImpl.class | Bin 2961 -> 2972 bytes libjava/classpath/lib/java/nio/IntBuffer.class | Bin 3421 -> 3549 bytes libjava/classpath/lib/java/nio/IntBufferImpl.class | Bin 2314 -> 2319 bytes .../classpath/lib/java/nio/IntViewBufferImpl.class | Bin 2931 -> 2942 bytes libjava/classpath/lib/java/nio/LongBuffer.class | Bin 3498 -> 3618 bytes .../classpath/lib/java/nio/LongBufferImpl.class | Bin 2331 -> 2360 bytes .../lib/java/nio/LongViewBufferImpl.class | Bin 2953 -> 2964 bytes .../classpath/lib/java/nio/MappedByteBuffer.class | Bin 1121 -> 1212 bytes .../lib/java/nio/MappedByteBufferImpl.class | Bin 8190 -> 8199 bytes libjava/classpath/lib/java/nio/ShortBuffer.class | Bin 3485 -> 3605 bytes .../classpath/lib/java/nio/ShortBufferImpl.class | Bin 2338 -> 2367 bytes .../lib/java/nio/ShortViewBufferImpl.class | Bin 2961 -> 2972 bytes .../classpath/lib/java/nio/channels/FileLock.class | Bin 1781 -> 1809 bytes .../lib/java/rmi/activation/Activatable.class | Bin 9002 -> 9002 bytes libjava/classpath/lib/java/rmi/dgc/VMID.class | Bin 1907 -> 1928 bytes .../security/AlgorithmParameterGenerator.class | Bin 4329 -> 4353 bytes .../lib/java/security/AlgorithmParameters.class | Bin 4550 -> 4574 bytes .../classpath/lib/java/security/CodeSource.class | Bin 5314 -> 5349 bytes .../classpath/lib/java/security/KeyFactory.class | Bin 4252 -> 4276 bytes .../lib/java/security/KeyPairGenerator.class | Bin 4574 -> 4695 bytes .../lib/java/security/MessageDigest.class | Bin 5360 -> 5428 bytes .../classpath/lib/java/security/Permission.class | Bin 1736 -> 1764 bytes .../lib/java/security/PermissionCollection.class | Bin 1550 -> 1585 bytes .../lib/java/security/ProtectionDomain.class | Bin 3502 -> 3530 bytes .../classpath/lib/java/security/SecureRandom.class | Bin 7756 -> 7780 bytes .../classpath/lib/java/security/Signature.class | Bin 7379 -> 7500 bytes .../java/security/cert/CertPath$CertPathRep.class | Bin 1562 -> 1562 bytes .../lib/java/security/cert/CertPath.class | Bin 2633 -> 2675 bytes .../lib/java/security/cert/CertPathBuilder.class | Bin 3671 -> 3695 bytes .../java/security/cert/CertPathValidator$1.class | Bin 718 -> 718 bytes .../lib/java/security/cert/CertPathValidator.class | Bin 3933 -> 3957 bytes .../lib/java/security/cert/CertStore$1.class | Bin 678 -> 678 bytes .../lib/java/security/cert/CertStore.class | Bin 4728 -> 4752 bytes .../java/security/cert/PKIXBuilderParameters.class | Bin 1961 -> 1982 bytes .../security/cert/PKIXCertPathBuilderResult.class | Bin 1549 -> 1570 bytes .../java/security/cert/PolicyQualifierInfo.class | Bin 2039 -> 2039 bytes .../lib/java/security/cert/X509CRLSelector.class | Bin 6627 -> 6655 bytes .../lib/java/security/cert/X509CertSelector.class | Bin 19449 -> 19491 bytes .../text/AttributedString$AttributeRange.class | Bin 689 -> 689 bytes .../classpath/lib/java/text/AttributedString.class | Bin 5897 -> 5918 bytes libjava/classpath/lib/java/text/ChoiceFormat.class | Bin 5767 -> 5857 bytes .../lib/java/text/CollationElementIterator.class | Bin 5534 -> 5555 bytes .../classpath/lib/java/text/DateFormat$Field.class | Bin 3600 -> 3080 bytes libjava/classpath/lib/java/text/DateFormat.class | Bin 10043 -> 9760 bytes .../lib/java/text/DateFormatSymbols.class | Bin 7635 -> 10132 bytes .../classpath/lib/java/text/DecimalFormat.class | Bin 24317 -> 25204 bytes .../lib/java/text/DecimalFormatSymbols.class | Bin 7835 -> 7828 bytes libjava/classpath/lib/java/text/Format.class | Bin 2009 -> 2009 bytes .../classpath/lib/java/text/MessageFormat.class | Bin 11646 -> 11683 bytes libjava/classpath/lib/java/text/NumberFormat.class | Bin 9372 -> 9372 bytes .../lib/java/text/RuleBasedCollator.class | Bin 10217 -> 10140 bytes .../java/text/SimpleDateFormat$CompiledField.class | Bin 1496 -> 1526 bytes .../classpath/lib/java/text/SimpleDateFormat.class | Bin 18114 -> 18295 bytes .../lib/java/util/AbstractCollection.class | Bin 4777 -> 4805 bytes .../classpath/lib/java/util/AbstractMap$1.class | Bin 1129 -> 1129 bytes .../classpath/lib/java/util/AbstractMap$2.class | Bin 1304 -> 1304 bytes .../classpath/lib/java/util/AbstractMap$3.class | Bin 1154 -> 1154 bytes .../classpath/lib/java/util/AbstractMap$4.class | Bin 1306 -> 1306 bytes .../lib/java/util/AbstractMap$SimpleEntry.class | Bin 2522 -> 2522 bytes .../util/AbstractMap$SimpleImmutableEntry.class | Bin 1835 -> 1835 bytes libjava/classpath/lib/java/util/AbstractMap.class | Bin 5306 -> 5336 bytes libjava/classpath/lib/java/util/ArrayList.class | Bin 7908 -> 7979 bytes .../classpath/lib/java/util/Arrays$ArrayList.class | Bin 2662 -> 2662 bytes libjava/classpath/lib/java/util/Arrays.class | Bin 32336 -> 32540 bytes libjava/classpath/lib/java/util/BitSet.class | Bin 6968 -> 6996 bytes libjava/classpath/lib/java/util/Calendar.class | Bin 17231 -> 18150 bytes .../util/Collections$1$SynchronizedMapEntry.class | Bin 2229 -> 2229 bytes .../classpath/lib/java/util/Collections$1.class | Bin 1138 -> 1138 bytes .../classpath/lib/java/util/Collections$2.class | Bin 1152 -> 1152 bytes .../classpath/lib/java/util/Collections$3.class | Bin 1545 -> 1545 bytes .../classpath/lib/java/util/Collections$4.class | Bin 1640 -> 1640 bytes .../classpath/lib/java/util/Collections$5.class | Bin 1708 -> 1708 bytes .../classpath/lib/java/util/Collections$6.class | Bin 1553 -> 1553 bytes .../classpath/lib/java/util/Collections$7.class | Bin 1844 -> 1844 bytes .../classpath/lib/java/util/Collections$8.class | Bin 889 -> 889 bytes .../classpath/lib/java/util/Collections$9.class | Bin 930 -> 930 bytes .../java/util/Collections$CheckedCollection.class | Bin 3874 -> 3874 bytes .../java/util/Collections$CheckedIterator.class | Bin 1272 -> 1272 bytes .../lib/java/util/Collections$CheckedList.class | Bin 3930 -> 3930 bytes .../util/Collections$CheckedListIterator.class | Bin 2091 -> 2091 bytes .../Collections$CheckedMap$CheckedEntrySet.class | Bin 1810 -> 1810 bytes .../lib/java/util/Collections$CheckedMap.class | Bin 5166 -> 5166 bytes .../util/Collections$CheckedRandomAccessList.class | Bin 985 -> 985 bytes .../lib/java/util/Collections$CheckedSet.class | Bin 1318 -> 1318 bytes .../java/util/Collections$CheckedSortedMap.class | Bin 2368 -> 2368 bytes .../java/util/Collections$CheckedSortedSet.class | Bin 2174 -> 2174 bytes .../lib/java/util/Collections$CopiesList.class | Bin 2693 -> 2721 bytes .../lib/java/util/Collections$EmptyList.class | Bin 2671 -> 2671 bytes .../lib/java/util/Collections$EmptyMap.class | Bin 2143 -> 2143 bytes .../lib/java/util/Collections$EmptySet.class | Bin 2422 -> 2422 bytes .../lib/java/util/Collections$LIFOQueue.class | Bin 2279 -> 2279 bytes .../lib/java/util/Collections$MapSet.class | Bin 2571 -> 2571 bytes .../java/util/Collections$ReverseComparator.class | Bin 1024 -> 1024 bytes .../lib/java/util/Collections$SingletonList.class | Bin 3063 -> 3063 bytes .../lib/java/util/Collections$SingletonMap.class | Bin 2981 -> 2981 bytes .../lib/java/util/Collections$SingletonSet.class | Bin 2438 -> 2438 bytes .../util/Collections$SynchronizedCollection.class | Bin 4000 -> 4000 bytes .../util/Collections$SynchronizedIterator.class | Bin 1366 -> 1366 bytes .../java/util/Collections$SynchronizedList.class | Bin 3903 -> 3903 bytes .../Collections$SynchronizedListIterator.class | Bin 2061 -> 2061 bytes .../java/util/Collections$SynchronizedMap.class | Bin 4779 -> 4779 bytes .../Collections$SynchronizedRandomAccessList.class | Bin 1488 -> 1488 bytes .../java/util/Collections$SynchronizedSet.class | Bin 1583 -> 1583 bytes .../util/Collections$SynchronizedSortedMap.class | Bin 2637 -> 2637 bytes .../util/Collections$SynchronizedSortedSet.class | Bin 2603 -> 2603 bytes .../util/Collections$UnmodifiableCollection.class | Bin 3127 -> 3127 bytes .../util/Collections$UnmodifiableIterator.class | Bin 1182 -> 1182 bytes .../java/util/Collections$UnmodifiableList.class | Bin 3204 -> 3204 bytes .../Collections$UnmodifiableListIterator.class | Bin 1776 -> 1776 bytes ...UnmodifiableEntrySet$UnmodifiableMapEntry.class | Bin 2223 -> 2223 bytes ...ions$UnmodifiableMap$UnmodifiableEntrySet.class | Bin 2441 -> 2441 bytes .../java/util/Collections$UnmodifiableMap.class | Bin 3757 -> 3757 bytes .../Collections$UnmodifiableRandomAccessList.class | Bin 910 -> 910 bytes .../java/util/Collections$UnmodifiableSet.class | Bin 1226 -> 1226 bytes .../util/Collections$UnmodifiableSortedMap.class | Bin 2131 -> 2131 bytes .../util/Collections$UnmodifiableSortedSet.class | Bin 2058 -> 2058 bytes libjava/classpath/lib/java/util/Collections.class | Bin 21874 -> 21874 bytes libjava/classpath/lib/java/util/Currency.class | Bin 5341 -> 5270 bytes libjava/classpath/lib/java/util/Date.class | Bin 11003 -> 11055 bytes .../java/util/Formatter$BigDecimalLayoutForm.class | Bin 1177 -> 1177 bytes libjava/classpath/lib/java/util/Formatter.class | Bin 17740 -> 17840 bytes libjava/classpath/lib/java/util/Hashtable$1.class | Bin 1239 -> 1239 bytes libjava/classpath/lib/java/util/Hashtable$2.class | Bin 950 -> 950 bytes libjava/classpath/lib/java/util/Hashtable$3.class | Bin 1574 -> 1574 bytes .../lib/java/util/Hashtable$EntryEnumerator.class | Bin 1555 -> 1555 bytes .../lib/java/util/Hashtable$EntryIterator.class | Bin 1941 -> 1941 bytes .../lib/java/util/Hashtable$HashEntry.class | Bin 1103 -> 1103 bytes .../lib/java/util/Hashtable$KeyEnumerator.class | Bin 1384 -> 1384 bytes .../lib/java/util/Hashtable$KeyIterator.class | Bin 1236 -> 1236 bytes .../lib/java/util/Hashtable$ValueEnumerator.class | Bin 1392 -> 1392 bytes .../lib/java/util/Hashtable$ValueIterator.class | Bin 1244 -> 1244 bytes libjava/classpath/lib/java/util/Hashtable.class | Bin 10538 -> 10601 bytes libjava/classpath/lib/java/util/Locale.class | Bin 13806 -> 13834 bytes libjava/classpath/lib/java/util/Properties.class | Bin 12141 -> 12344 bytes .../lib/java/util/PropertyResourceBundle.class | Bin 1762 -> 1934 bytes .../classpath/lib/java/util/ResourceBundle$1.class | Bin 722 -> 1040 bytes .../lib/java/util/ResourceBundle$BundleKey.class | Bin 1438 -> 2090 bytes .../classpath/lib/java/util/ResourceBundle.class | Bin 6232 -> 7134 bytes libjava/classpath/lib/java/util/Scanner.class | Bin 0 -> 22985 bytes libjava/classpath/lib/java/util/Stack.class | Bin 1548 -> 1548 bytes libjava/classpath/lib/java/util/TimeZone$1.class | Bin 1026 -> 1026 bytes libjava/classpath/lib/java/util/TimeZone.class | Bin 31294 -> 31322 bytes libjava/classpath/lib/java/util/TreeMap$1.class | Bin 1557 -> 1557 bytes libjava/classpath/lib/java/util/TreeMap$2.class | Bin 1383 -> 1383 bytes libjava/classpath/lib/java/util/TreeMap$3.class | Bin 1087 -> 1087 bytes libjava/classpath/lib/java/util/TreeMap$4.class | Bin 1612 -> 1612 bytes libjava/classpath/lib/java/util/TreeMap$5.class | Bin 1310 -> 1310 bytes libjava/classpath/lib/java/util/TreeMap$6.class | Bin 1401 -> 1401 bytes libjava/classpath/lib/java/util/TreeMap$7.class | Bin 961 -> 961 bytes .../lib/java/util/TreeMap$DescendingMap.class | Bin 8707 -> 8743 bytes .../lib/java/util/TreeMap$DescendingSet.class | Bin 6891 -> 6921 bytes .../classpath/lib/java/util/TreeMap$EntrySet.class | Bin 2058 -> 2058 bytes .../classpath/lib/java/util/TreeMap$KeySet.class | Bin 1717 -> 1717 bytes .../lib/java/util/TreeMap$NavigableEntrySet.class | Bin 6005 -> 6005 bytes .../lib/java/util/TreeMap$NavigableKeySet.class | Bin 4003 -> 4003 bytes libjava/classpath/lib/java/util/TreeMap$Node.class | Bin 1025 -> 1025 bytes .../lib/java/util/TreeMap$SubMap$EntrySet.class | Bin 2608 -> 2608 bytes .../lib/java/util/TreeMap$SubMap$KeySet.class | Bin 2118 -> 2118 bytes .../util/TreeMap$SubMap$NavigableEntrySet.class | Bin 6159 -> 6159 bytes .../java/util/TreeMap$SubMap$NavigableKeySet.class | Bin 4202 -> 4202 bytes .../classpath/lib/java/util/TreeMap$SubMap.class | Bin 9314 -> 9314 bytes .../lib/java/util/TreeMap$TreeIterator.class | Bin 1790 -> 1790 bytes libjava/classpath/lib/java/util/TreeMap.class | Bin 18433 -> 18433 bytes libjava/classpath/lib/java/util/Vector$1.class | Bin 977 -> 977 bytes libjava/classpath/lib/java/util/Vector.class | Bin 10941 -> 11085 bytes .../lib/java/util/logging/FileHandler$ostr.class | Bin 1249 -> 1249 bytes .../lib/java/util/logging/FileHandler.class | Bin 6238 -> 6273 bytes .../lib/java/util/logging/SimpleFormatter.class | Bin 1997 -> 2032 bytes .../lib/java/util/logging/XMLFormatter.class | Bin 4482 -> 4531 bytes .../java/util/prefs/AbstractPreferences$1.class | Bin 1009 -> 1016 bytes .../java/util/prefs/AbstractPreferences$2.class | Bin 1104 -> 1111 bytes .../lib/java/util/prefs/AbstractPreferences.class | Bin 16200 -> 16565 bytes .../classpath/lib/java/util/regex/Matcher.class | Bin 5016 -> 7085 bytes .../classpath/lib/java/util/regex/Pattern.class | Bin 4324 -> 4383 bytes .../java/util/regex/PatternSyntaxException.class | Bin 1455 -> 1483 bytes libjava/classpath/lib/java/util/zip/ZipEntry.class | Bin 5391 -> 5607 bytes libjava/classpath/lib/java/util/zip/ZipFile.class | Bin 7716 -> 7664 bytes .../accessibility/AccessibleRelationSet.class | Bin 2893 -> 2921 bytes .../javax/accessibility/AccessibleStateSet.class | Bin 2107 -> 2135 bytes .../javax/activation/ActivationDataFlavor.class | Bin 0 -> 2471 bytes .../lib/javax/activation/CommandInfo.class | Bin 0 -> 1744 bytes .../lib/javax/activation/CommandMap.class | Bin 0 -> 2229 bytes .../lib/javax/activation/CommandObject.class | Bin 0 -> 254 bytes .../lib/javax/activation/DataContentHandler.class | Bin 0 -> 598 bytes .../activation/DataContentHandlerFactory.class | Bin 0 -> 243 bytes .../DataHandler$DataContentHandlerWriter.class | Bin 0 -> 1254 bytes .../lib/javax/activation/DataHandler.class | Bin 0 -> 8572 bytes .../javax/activation/DataHandlerDataSource.class | Bin 0 -> 998 bytes .../lib/javax/activation/DataSource.class | Bin 0 -> 346 bytes .../activation/DataSourceDataContentHandler.class | Bin 0 -> 2495 bytes .../lib/javax/activation/FileDataSource.class | Bin 0 -> 1622 bytes .../lib/javax/activation/FileTypeMap.class | Bin 0 -> 1212 bytes .../lib/javax/activation/MailcapCommandMap.class | Bin 0 -> 14744 bytes .../classpath/lib/javax/activation/MimeType.class | Bin 0 -> 4495 bytes ...MimeTypeParameterList$IteratorEnumeration.class | Bin 0 -> 1184 bytes .../javax/activation/MimeTypeParameterList.class | Bin 0 -> 4841 bytes .../javax/activation/MimeTypeParseException.class | Bin 0 -> 858 bytes .../javax/activation/MimetypesFileTypeMap.class | Bin 0 -> 7366 bytes .../activation/ObjectDataContentHandler.class | Bin 0 -> 2520 bytes .../lib/javax/activation/URLDataSource.class | Bin 0 -> 1465 bytes .../activation/UnsupportedDataTypeException.class | Bin 0 -> 491 bytes .../classpath/lib/javax/imageio/ImageIO$1.class | Bin 1187 -> 1187 bytes libjava/classpath/lib/javax/imageio/ImageIO.class | Bin 13284 -> 13313 bytes .../imageio/plugins/jpeg/JPEGHuffmanTable.class | Bin 5297 -> 5318 bytes .../javax/imageio/plugins/jpeg/JPEGQTable.class | Bin 3025 -> 3046 bytes .../imageio/stream/ImageInputStreamImpl.class | Bin 8798 -> 8819 bytes .../javax/management/DefaultLoaderRepository.class | Bin 1974 -> 1974 bytes libjava/classpath/lib/javax/management/JMX.class | Bin 3004 -> 3004 bytes .../javax/management/MBeanConstructorInfo.class | Bin 2979 -> 2979 bytes .../lib/javax/management/MBeanPermission.class | Bin 4723 -> 4784 bytes .../lib/javax/management/MBeanServerDelegate.class | Bin 4942 -> 5082 bytes .../lib/javax/management/MBeanServerFactory.class | Bin 6621 -> 6666 bytes .../management/MBeanServerInvocationHandler.class | Bin 6525 -> 6543 bytes ...llection$MBeanServerPermissionEnumeration.class | Bin 1404 -> 1588 bytes ...ermission$MBeanServerPermissionCollection.class | Bin 2905 -> 2958 bytes .../javax/management/MBeanServerPermission.class | Bin 3110 -> 3110 bytes .../lib/javax/management/ObjectName.class | Bin 11159 -> 11273 bytes .../lib/javax/management/StandardMBean.class | Bin 16907 -> 17250 bytes .../lib/javax/management/openmbean/ArrayType.class | Bin 9802 -> 9867 bytes .../openmbean/CompositeDataSupport.class | Bin 5699 -> 5710 bytes .../javax/management/openmbean/CompositeType.class | Bin 5171 -> 5233 bytes .../openmbean/OpenMBeanAttributeInfoSupport.class | Bin 8111 -> 8111 bytes .../openmbean/OpenMBeanParameterInfoSupport.class | Bin 7528 -> 7528 bytes .../javax/management/openmbean/SimpleType.class | Bin 4740 -> 4795 bytes .../management/openmbean/TabularDataSupport.class | Bin 7765 -> 8207 bytes .../javax/management/openmbean/TabularType.class | Bin 3878 -> 3850 bytes .../classpath/lib/javax/naming/BinaryRefAddr.class | Bin 2131 -> 2159 bytes .../classpath/lib/javax/naming/CompositeName.class | Bin 6538 -> 6667 bytes .../classpath/lib/javax/naming/CompoundName.class | Bin 9575 -> 9769 bytes .../lib/javax/naming/NamingException.class | Bin 3473 -> 3508 bytes .../lib/javax/naming/spi/NamingManager.class | Bin 9601 -> 9629 bytes .../javax/security/auth/x500/X500Principal.class | Bin 11356 -> 11384 bytes .../lib/javax/security/sasl/SaslException.class | Bin 1813 -> 1834 bytes .../javax/sound/sampled/AudioFormat$Encoding.class | Bin 1111 -> 1111 bytes .../lib/javax/sound/sampled/AudioFormat.class | Bin 3974 -> 4016 bytes .../javax/sound/sampled/CompoundControl$Type.class | Bin 517 -> 517 bytes .../lib/javax/sound/sampled/CompoundControl.class | Bin 1241 -> 1262 bytes .../lib/javax/sound/sampled/DataLine$Info.class | Bin 2934 -> 2962 bytes .../lib/javax/swing/AbstractButton$1.class | Bin 1793 -> 1793 bytes .../AbstractButton$AccessibleAbstractButton.class | Bin 9052 -> 9052 bytes .../AbstractButton$ButtonChangeListener.class | Bin 977 -> 977 bytes .../javax/swing/AbstractButton$EventHandler.class | Bin 1356 -> 1356 bytes .../classpath/lib/javax/swing/AbstractButton.class | Bin 20618 -> 20653 bytes .../javax/swing/JButton$AccessibleJButton.class | Bin 820 -> 820 bytes libjava/classpath/lib/javax/swing/JButton.class | Bin 3347 -> 3375 bytes .../classpath/lib/javax/swing/JComboBox$1.class | Bin 997 -> 997 bytes .../swing/JComboBox$AccessibleJComboBox.class | Bin 4039 -> 4039 bytes .../JComboBox$DefaultKeySelectionManager.class | Bin 1378 -> 1378 bytes libjava/classpath/lib/javax/swing/JComboBox.class | Bin 15989 -> 16031 bytes .../classpath/lib/javax/swing/JComponent$1.class | Bin 586 -> 586 bytes ...ibleJComponent$AccessibleContainerHandler.class | Bin 1529 -> 1529 bytes ...cessibleJComponent$AccessibleFocusHandler.class | Bin 1215 -> 1215 bytes .../swing/JComponent$AccessibleJComponent.class | Bin 4577 -> 4577 bytes .../swing/JComponent$ActionListenerProxy.class | Bin 1101 -> 1101 bytes libjava/classpath/lib/javax/swing/JComponent.class | Bin 36587 -> 36622 bytes .../JDesktopPane$AccessibleJDesktopPane.class | Bin 914 -> 914 bytes .../classpath/lib/javax/swing/JDesktopPane.class | Bin 4836 -> 4871 bytes .../classpath/lib/javax/swing/JFileChooser$1.class | Bin 744 -> 744 bytes .../JFileChooser$AccessibleJFileChooser.class | Bin 850 -> 850 bytes .../classpath/lib/javax/swing/JFileChooser.class | Bin 18403 -> 18438 bytes .../lib/javax/swing/JFrame$AccessibleJFrame.class | Bin 543 -> 543 bytes libjava/classpath/lib/javax/swing/JFrame.class | Bin 7079 -> 7114 bytes .../lib/javax/swing/JLabel$AccessibleJLabel.class | Bin 5484 -> 5484 bytes libjava/classpath/lib/javax/swing/JLabel.class | Bin 8529 -> 8564 bytes libjava/classpath/lib/javax/swing/JList$1.class | Bin 790 -> 790 bytes libjava/classpath/lib/javax/swing/JList$2.class | Bin 846 -> 846 bytes libjava/classpath/lib/javax/swing/JList$3.class | Bin 829 -> 829 bytes ...List$AccessibleJList$AccessibleJListChild.class | Bin 6064 -> 6064 bytes .../lib/javax/swing/JList$AccessibleJList.class | Bin 4969 -> 4969 bytes .../lib/javax/swing/JList$ListListener.class | Bin 1488 -> 1488 bytes libjava/classpath/lib/javax/swing/JList.class | Bin 18938 -> 18973 bytes .../javax/swing/JMenuBar$AccessibleJMenuBar.class | Bin 2282 -> 2282 bytes libjava/classpath/lib/javax/swing/JMenuBar.class | Bin 7798 -> 7833 bytes .../classpath/lib/javax/swing/JPopupMenu$1.class | Bin 592 -> 592 bytes .../classpath/lib/javax/swing/JPopupMenu$2.class | Bin 639 -> 639 bytes .../swing/JPopupMenu$AccessibleJPopupMenu.class | Bin 894 -> 894 bytes .../swing/JPopupMenu$ActionChangeListener.class | Bin 833 -> 833 bytes .../lib/javax/swing/JPopupMenu$Separator.class | Bin 503 -> 503 bytes libjava/classpath/lib/javax/swing/JPopupMenu.class | Bin 12623 -> 12658 bytes .../classpath/lib/javax/swing/JProgressBar$1.class | Bin 780 -> 780 bytes .../JProgressBar$AccessibleJProgressBar.class | Bin 2458 -> 2458 bytes .../classpath/lib/javax/swing/JProgressBar.class | Bin 7973 -> 8001 bytes .../swing/JScrollBar$AccessibleJScrollBar.class | Bin 2560 -> 2560 bytes .../swing/JScrollBar$ScrollBarChangeListener.class | Bin 1222 -> 1222 bytes libjava/classpath/lib/javax/swing/JScrollBar.class | Bin 7894 -> 7922 bytes libjava/classpath/lib/javax/swing/JSlider$1.class | Bin 750 -> 750 bytes .../javax/swing/JSlider$AccessibleJSlider.class | Bin 2407 -> 2407 bytes .../lib/javax/swing/JSlider$LabelUIResource.class | Bin 672 -> 672 bytes libjava/classpath/lib/javax/swing/JSlider.class | Bin 11001 -> 11036 bytes .../swing/JSplitPane$AccessibleJSplitPane.class | Bin 2484 -> 2484 bytes libjava/classpath/lib/javax/swing/JSplitPane.class | Bin 9784 -> 9819 bytes .../swing/JTabbedPane$AccessibleJTabbedPane.class | Bin 3196 -> 3196 bytes .../javax/swing/JTabbedPane$ModelListener.class | Bin 810 -> 810 bytes .../lib/javax/swing/JTabbedPane$Page.class | Bin 5502 -> 5502 bytes .../classpath/lib/javax/swing/JTabbedPane.class | Bin 14724 -> 14745 bytes .../javax/swing/JToolBar$AccessibleJToolBar.class | Bin 1014 -> 1014 bytes .../swing/JToolBar$DefaultToolBarLayout.class | Bin 3238 -> 3238 bytes .../lib/javax/swing/JToolBar$Separator.class | Bin 1172 -> 1172 bytes libjava/classpath/lib/javax/swing/JToolBar.class | Bin 6886 -> 6928 bytes .../javax/swing/JToolTip$AccessibleJToolTip.class | Bin 1078 -> 1078 bytes libjava/classpath/lib/javax/swing/JToolTip.class | Bin 2448 -> 2469 bytes .../javax/swing/UIManager$LookAndFeelInfo.class | Bin 1148 -> 1176 bytes ...$MultiplexUIDefaults$MultiplexEnumeration.class | Bin 1221 -> 1221 bytes .../swing/UIManager$MultiplexUIDefaults.class | Bin 1632 -> 1632 bytes libjava/classpath/lib/javax/swing/UIManager.class | Bin 9920 -> 9920 bytes .../lib/javax/swing/event/EventListenerList.class | Bin 4510 -> 4545 bytes .../lib/javax/swing/table/AbstractTableModel.class | Bin 4043 -> 4064 bytes .../text/AbstractDocument$AbstractElement.class | Bin 7302 -> 7344 bytes .../swing/text/AbstractDocument$BidiElement.class | Bin 1192 -> 1192 bytes .../text/AbstractDocument$BidiRootElement.class | Bin 799 -> 799 bytes .../text/AbstractDocument$BranchElement.class | Bin 3831 -> 3831 bytes .../javax/swing/text/AbstractDocument$Bypass.class | Bin 1428 -> 1428 bytes .../AbstractDocument$DefaultDocumentEvent.class | Bin 2958 -> 2958 bytes .../swing/text/AbstractDocument$ElementEdit.class | Bin 1327 -> 1327 bytes .../swing/text/AbstractDocument$LeafElement.class | Bin 2916 -> 2916 bytes .../lib/javax/swing/text/AbstractDocument.class | Bin 20008 -> 20008 bytes .../text/DefaultEditorKit$BackwardAction.class | Bin 818 -> 818 bytes .../swing/text/DefaultEditorKit$BeepAction.class | Bin 716 -> 716 bytes .../swing/text/DefaultEditorKit$BeginAction.class | Bin 1248 -> 1248 bytes .../text/DefaultEditorKit$BeginLineAction.class | Bin 1442 -> 1442 bytes .../text/DefaultEditorKit$BeginWordAction.class | Bin 1434 -> 1434 bytes .../swing/text/DefaultEditorKit$CopyAction.class | Bin 864 -> 864 bytes .../swing/text/DefaultEditorKit$CutAction.class | Bin 859 -> 859 bytes .../DefaultEditorKit$DefaultKeyTypedAction.class | Bin 1326 -> 1326 bytes .../DefaultEditorKit$DeleteNextCharAction.class | Bin 1595 -> 1595 bytes .../DefaultEditorKit$DeletePrevCharAction.class | Bin 1575 -> 1575 bytes .../swing/text/DefaultEditorKit$DownAction.class | Bin 797 -> 797 bytes .../swing/text/DefaultEditorKit$EndAction.class | Bin 1393 -> 1393 bytes .../text/DefaultEditorKit$EndLineAction.class | Bin 1432 -> 1432 bytes .../text/DefaultEditorKit$EndWordAction.class | Bin 1424 -> 1424 bytes .../text/DefaultEditorKit$ForwardAction.class | Bin 813 -> 813 bytes .../text/DefaultEditorKit$InsertBreakAction.class | Bin 896 -> 896 bytes .../DefaultEditorKit$InsertContentAction.class | Bin 658 -> 658 bytes .../text/DefaultEditorKit$InsertTabAction.class | Bin 888 -> 888 bytes .../text/DefaultEditorKit$NextWordAction.class | Bin 1429 -> 1429 bytes .../swing/text/DefaultEditorKit$PasteAction.class | Bin 871 -> 871 bytes .../text/DefaultEditorKit$PreviousWordAction.class | Bin 1449 -> 1449 bytes .../text/DefaultEditorKit$SelectAllAction.class | Bin 1444 -> 1444 bytes .../text/DefaultEditorKit$SelectLineAction.class | Bin 1512 -> 1512 bytes .../text/DefaultEditorKit$SelectWordAction.class | Bin 1776 -> 1776 bytes .../DefaultEditorKit$SelectionBackwardAction.class | Bin 850 -> 850 bytes .../DefaultEditorKit$SelectionBeginAction.class | Bin 1280 -> 1280 bytes ...DefaultEditorKit$SelectionBeginLineAction.class | Bin 1418 -> 1418 bytes ...DefaultEditorKit$SelectionBeginWordAction.class | Bin 1466 -> 1466 bytes .../DefaultEditorKit$SelectionDownAction.class | Bin 829 -> 829 bytes .../text/DefaultEditorKit$SelectionEndAction.class | Bin 1425 -> 1425 bytes .../DefaultEditorKit$SelectionEndLineAction.class | Bin 1408 -> 1408 bytes .../DefaultEditorKit$SelectionEndWordAction.class | Bin 1456 -> 1456 bytes .../DefaultEditorKit$SelectionForwardAction.class | Bin 845 -> 845 bytes .../DefaultEditorKit$SelectionNextWordAction.class | Bin 1461 -> 1461 bytes ...aultEditorKit$SelectionPreviousWordAction.class | Bin 1481 -> 1481 bytes .../text/DefaultEditorKit$SelectionUpAction.class | Bin 821 -> 821 bytes .../swing/text/DefaultEditorKit$UpAction.class | Bin 789 -> 789 bytes .../lib/javax/swing/text/DefaultEditorKit.class | Bin 9767 -> 9788 bytes ...faultStyledDocument$AttributeUndoableEdit.class | Bin 1512 -> 1512 bytes .../DefaultStyledDocument$ElementBuffer$Edit.class | Bin 1219 -> 1219 bytes .../text/DefaultStyledDocument$ElementBuffer.class | Bin 18222 -> 18222 bytes .../text/DefaultStyledDocument$ElementSpec.class | Bin 2801 -> 2831 bytes .../DefaultStyledDocument$SectionElement.class | Bin 863 -> 863 bytes ...DefaultStyledDocument$StyleChangeListener.class | Bin 1181 -> 1181 bytes .../javax/swing/text/DefaultStyledDocument.class | Bin 15654 -> 15675 bytes .../JTextComponent$AccessibleJTextComponent.class | Bin 10641 -> 10641 bytes .../swing/text/JTextComponent$DefaultKeymap.class | Bin 3384 -> 3384 bytes .../JTextComponent$DefaultTransferHandler.class | Bin 3041 -> 3041 bytes .../swing/text/JTextComponent$KeyBinding.class | Bin 595 -> 595 bytes .../text/JTextComponent$KeymapActionMap.class | Bin 1605 -> 1605 bytes .../swing/text/JTextComponent$KeymapWrapper.class | Bin 1999 -> 1999 bytes .../lib/javax/swing/text/JTextComponent.class | Bin 18471 -> 18492 bytes .../lib/javax/swing/text/MaskFormatter.class | Bin 6608 -> 6629 bytes .../classpath/lib/javax/swing/text/TabSet.class | Bin 2402 -> 2423 bytes .../lib/javax/swing/text/html/CSSParser.class | Bin 4348 -> 4242 bytes .../lib/javax/swing/text/html/HTMLWriter.class | Bin 13180 -> 13208 bytes .../swing/text/html/StyleSheet$BoxPainter.class | Bin 3549 -> 3549 bytes .../swing/text/html/StyleSheet$CSSStyle.class | Bin 1625 -> 1846 bytes .../swing/text/html/StyleSheet$ListPainter.class | Bin 2769 -> 2769 bytes .../lib/javax/swing/text/html/StyleSheet.class | Bin 17237 -> 17636 bytes .../javax/swing/text/html/ViewAttributeSet.class | Bin 2944 -> 3083 bytes .../javax/swing/tree/DefaultMutableTreeNode.class | Bin 10962 -> 10910 bytes ...DefaultTreeSelectionModel$PathPlaceHolder.class | Bin 632 -> 632 bytes .../swing/tree/DefaultTreeSelectionModel.class | Bin 14992 -> 15027 bytes libjava/classpath/lib/javax/tools/FileObject.class | Bin 577 -> 578 bytes .../lib/javax/xml/datatype/DatatypeFactory.class | Bin 5735 -> 5903 bytes .../classpath/lib/javax/xml/namespace/QName.class | Bin 2720 -> 2748 bytes .../javax/xml/parsers/DocumentBuilderFactory.class | Bin 5298 -> 5364 bytes .../lib/javax/xml/parsers/SAXParserFactory.class | Bin 4217 -> 4283 bytes .../lib/javax/xml/stream/XMLEventFactory.class | Bin 5548 -> 5614 bytes .../lib/javax/xml/stream/XMLInputFactory.class | Bin 5885 -> 5951 bytes .../lib/javax/xml/stream/XMLOutputFactory.class | Bin 4233 -> 4299 bytes .../javax/xml/transform/TransformerException.class | Bin 3839 -> 3874 bytes .../javax/xml/transform/TransformerFactory.class | Bin 4088 -> 4164 bytes .../lib/javax/xml/validation/SchemaFactory.class | Bin 5068 -> 5144 bytes .../lib/javax/xml/xpath/XPathFactory.class | Bin 3748 -> 3814 bytes libjava/classpath/lib/org/ietf/jgss/Oid.class | Bin 4656 -> 4684 bytes .../lib/org/omg/CORBA/portable/Delegate.class | Bin 4453 -> 4474 bytes libjava/classpath/ltgcc.m4 | 60 + libjava/classpath/ltmain.sh | 10560 ++++++++++--------- libjava/classpath/ltoptions.m4 | 368 + libjava/classpath/ltsugar.m4 | 123 + libjava/classpath/ltversion.m4 | 23 + libjava/classpath/lt~obsolete.m4 | 92 + libjava/classpath/m4/ac_prog_antlr.m4 | 46 + libjava/classpath/m4/ac_prog_java.m4 | 17 + libjava/classpath/m4/ac_prog_java_works.m4 | 109 + libjava/classpath/m4/ac_prog_javac.m4 | 14 +- libjava/classpath/m4/ac_prog_javac_works.m4 | 8 +- libjava/classpath/m4/acinclude.m4 | 80 +- libjava/classpath/native/Makefile.in | 25 +- libjava/classpath/native/fdlibm/Makefile.in | 25 +- libjava/classpath/native/jawt/Makefile.in | 25 +- libjava/classpath/native/jni/Makefile.am | 8 +- libjava/classpath/native/jni/Makefile.in | 30 +- libjava/classpath/native/jni/classpath/Makefile.in | 25 +- .../native/jni/gconf-peer/GConfNativePeer.c | 140 +- .../classpath/native/jni/gconf-peer/Makefile.in | 25 +- .../native/jni/gstreamer-peer/Makefile.in | 25 +- .../jni/gstreamer-peer/gst_native_pipeline.c | 2 +- libjava/classpath/native/jni/gtk-peer/Makefile.in | 25 +- libjava/classpath/native/jni/java-io/Makefile.in | 25 +- .../classpath/native/jni/java-io/java_io_VMFile.c | 106 +- libjava/classpath/native/jni/java-lang/Makefile.in | 25 +- libjava/classpath/native/jni/java-math/Makefile.am | 11 + libjava/classpath/native/jni/java-math/Makefile.in | 646 ++ .../native/jni/java-math/gnu_java_math_GMP.c | 1396 +++ libjava/classpath/native/jni/java-net/Makefile.in | 25 +- .../jni/java-net/java_net_VMNetworkInterface.c | 147 +- libjava/classpath/native/jni/java-net/local.c | 13 +- libjava/classpath/native/jni/java-nio/Makefile.in | 25 +- libjava/classpath/native/jni/java-util/Makefile.in | 25 +- libjava/classpath/native/jni/midi-alsa/Makefile.am | 2 +- libjava/classpath/native/jni/midi-alsa/Makefile.in | 27 +- libjava/classpath/native/jni/midi-dssi/Makefile.in | 25 +- .../classpath/native/jni/native-lib/Makefile.in | 25 +- libjava/classpath/native/jni/qt-peer/Makefile.in | 25 +- libjava/classpath/native/jni/xmlj/Makefile.in | 25 +- libjava/classpath/native/plugin/Makefile.in | 25 +- libjava/classpath/org/ietf/jgss/Oid.java | 4 +- .../classpath/org/omg/CORBA/portable/Delegate.java | 4 +- .../classpath/resource/META-INF/mailcap.default | 8 + .../classpath/resource/META-INF/mimetypes.default | 28 + libjava/classpath/resource/Makefile.in | 25 +- .../gnu/java/locale/LocaleInformation.properties | 35 +- .../java/locale/LocaleInformation_aa.properties | 26 +- .../java/locale/LocaleInformation_aa_DJ.properties | 4 +- .../java/locale/LocaleInformation_aa_ER.properties | 4 +- .../LocaleInformation_aa_ER_SAAHO.properties | 4 +- .../java/locale/LocaleInformation_af.properties | 395 +- .../java/locale/LocaleInformation_af_NA.properties | 16 + .../java/locale/LocaleInformation_ak.properties | 23 + .../java/locale/LocaleInformation_am.properties | 224 +- .../java/locale/LocaleInformation_ar.properties | 1046 +- .../java/locale/LocaleInformation_ar_JO.properties | 20 +- .../java/locale/LocaleInformation_ar_LB.properties | 21 +- .../java/locale/LocaleInformation_ar_QA.properties | 2 +- .../java/locale/LocaleInformation_ar_SA.properties | 2 +- .../java/locale/LocaleInformation_ar_SY.properties | 23 +- .../java/locale/LocaleInformation_ar_TN.properties | 3 +- .../java/locale/LocaleInformation_ar_YE.properties | 2 +- .../java/locale/LocaleInformation_as.properties | 61 +- .../java/locale/LocaleInformation_az.properties | 1071 +- .../locale/LocaleInformation_az_Cyrl.properties | 44 +- .../java/locale/LocaleInformation_be.properties | 493 +- .../java/locale/LocaleInformation_bg.properties | 717 +- .../java/locale/LocaleInformation_bn.properties | 1201 ++- .../java/locale/LocaleInformation_bn_IN.properties | 107 +- .../java/locale/LocaleInformation_bo.properties | 242 + .../java/locale/LocaleInformation_bs.properties | 135 +- .../java/locale/LocaleInformation_byn.properties | 63 +- .../java/locale/LocaleInformation_ca.properties | 679 +- .../java/locale/LocaleInformation_cch.properties | 23 + .../java/locale/LocaleInformation_cop.properties | 21 + .../java/locale/LocaleInformation_cs.properties | 552 +- .../java/locale/LocaleInformation_cy.properties | 156 +- .../java/locale/LocaleInformation_da.properties | 2224 ++-- .../java/locale/LocaleInformation_de.properties | 845 +- .../java/locale/LocaleInformation_de_AT.properties | 6 +- .../java/locale/LocaleInformation_de_BE.properties | 6 +- .../java/locale/LocaleInformation_de_CH.properties | 4 +- .../java/locale/LocaleInformation_de_LI.properties | 1 + .../java/locale/LocaleInformation_de_LU.properties | 1 - .../java/locale/LocaleInformation_dv.properties | 16 +- .../java/locale/LocaleInformation_dz.properties | 46 +- .../java/locale/LocaleInformation_ee.properties | 25 + .../java/locale/LocaleInformation_el.properties | 1071 +- .../java/locale/LocaleInformation_en.properties | 936 +- .../java/locale/LocaleInformation_en_AU.properties | 3 +- .../java/locale/LocaleInformation_en_BE.properties | 8 +- .../java/locale/LocaleInformation_en_BW.properties | 5 +- .../java/locale/LocaleInformation_en_BZ.properties | 6 +- .../java/locale/LocaleInformation_en_CA.properties | 7 +- .../locale/LocaleInformation_en_Dsrt.properties | 418 + .../java/locale/LocaleInformation_en_GB.properties | 3 +- .../java/locale/LocaleInformation_en_HK.properties | 2 +- .../java/locale/LocaleInformation_en_IE.properties | 5 +- .../java/locale/LocaleInformation_en_IN.properties | 5 +- .../java/locale/LocaleInformation_en_JM.properties | 8 + .../java/locale/LocaleInformation_en_MT.properties | 2 +- .../java/locale/LocaleInformation_en_NA.properties | 8 + .../java/locale/LocaleInformation_en_NZ.properties | 4 +- .../java/locale/LocaleInformation_en_PH.properties | 2 - .../java/locale/LocaleInformation_en_PK.properties | 4 +- .../java/locale/LocaleInformation_en_SG.properties | 17 +- .../locale/LocaleInformation_en_Shaw.properties | 13 + .../java/locale/LocaleInformation_en_TT.properties | 8 + .../LocaleInformation_en_US_POSIX.properties | 3 +- .../java/locale/LocaleInformation_en_ZA.properties | 5 +- .../java/locale/LocaleInformation_en_ZW.properties | 5 +- .../java/locale/LocaleInformation_eo.properties | 185 +- .../java/locale/LocaleInformation_es.properties | 681 +- .../java/locale/LocaleInformation_es_AR.properties | 11 +- .../java/locale/LocaleInformation_es_CL.properties | 11 +- .../java/locale/LocaleInformation_es_CO.properties | 2 +- .../java/locale/LocaleInformation_es_CR.properties | 7 +- .../java/locale/LocaleInformation_es_DO.properties | 6 - .../java/locale/LocaleInformation_es_EC.properties | 4 - .../java/locale/LocaleInformation_es_ES.properties | 14 +- .../java/locale/LocaleInformation_es_GT.properties | 5 +- .../java/locale/LocaleInformation_es_HN.properties | 10 +- .../java/locale/LocaleInformation_es_MX.properties | 8 - .../java/locale/LocaleInformation_es_NI.properties | 6 - .../java/locale/LocaleInformation_es_PA.properties | 4 - .../java/locale/LocaleInformation_es_PE.properties | 9 +- .../java/locale/LocaleInformation_es_PR.properties | 5 - .../java/locale/LocaleInformation_es_PY.properties | 8 +- .../java/locale/LocaleInformation_es_SV.properties | 6 - .../java/locale/LocaleInformation_es_US.properties | 1 - .../java/locale/LocaleInformation_es_UY.properties | 10 +- .../java/locale/LocaleInformation_es_VE.properties | 8 +- .../java/locale/LocaleInformation_et.properties | 814 +- .../java/locale/LocaleInformation_eu.properties | 336 +- .../java/locale/LocaleInformation_fa.properties | 511 +- .../java/locale/LocaleInformation_fa_AF.properties | 36 +- .../java/locale/LocaleInformation_fi.properties | 1044 +- .../java/locale/LocaleInformation_fil.properties | 455 + .../java/locale/LocaleInformation_fo.properties | 366 +- .../java/locale/LocaleInformation_fr.properties | 1222 ++- .../java/locale/LocaleInformation_fr_BE.properties | 3 +- .../java/locale/LocaleInformation_fr_CA.properties | 7 +- .../java/locale/LocaleInformation_fr_CH.properties | 4 +- .../java/locale/LocaleInformation_fur.properties | 518 + .../java/locale/LocaleInformation_ga.properties | 400 +- .../java/locale/LocaleInformation_gaa.properties | 23 + .../java/locale/LocaleInformation_gez.properties | 67 +- .../locale/LocaleInformation_gez_ET.properties | 13 +- .../java/locale/LocaleInformation_gl.properties | 544 +- .../java/locale/LocaleInformation_gu.properties | 127 +- .../java/locale/LocaleInformation_gv.properties | 21 +- .../java/locale/LocaleInformation_ha.properties | 136 + .../locale/LocaleInformation_ha_Arab.properties | 14 + .../java/locale/LocaleInformation_haw.properties | 21 +- .../java/locale/LocaleInformation_he.properties | 790 +- .../java/locale/LocaleInformation_hi.properties | 636 +- .../java/locale/LocaleInformation_hr.properties | 614 +- .../java/locale/LocaleInformation_hu.properties | 948 +- .../java/locale/LocaleInformation_hy.properties | 156 +- .../LocaleInformation_hy_AM_REVISED.properties | 6 +- .../java/locale/LocaleInformation_ia.properties | 318 + .../java/locale/LocaleInformation_id.properties | 641 +- .../java/locale/LocaleInformation_ig.properties | 23 + .../java/locale/LocaleInformation_ii.properties | 43 + .../java/locale/LocaleInformation_is.properties | 1219 ++- .../java/locale/LocaleInformation_it.properties | 846 +- .../java/locale/LocaleInformation_it_CH.properties | 6 +- .../java/locale/LocaleInformation_iu.properties | 34 +- .../java/locale/LocaleInformation_ja.properties | 546 +- .../java/locale/LocaleInformation_ka.properties | 482 +- .../java/locale/LocaleInformation_kaj.properties | 23 + .../java/locale/LocaleInformation_kam.properties | 23 + .../java/locale/LocaleInformation_kcg.properties | 23 + .../java/locale/LocaleInformation_kfo.properties | 23 + .../java/locale/LocaleInformation_kk.properties | 152 +- .../java/locale/LocaleInformation_kl.properties | 19 +- .../java/locale/LocaleInformation_km.properties | 83 +- .../java/locale/LocaleInformation_kn.properties | 190 +- .../java/locale/LocaleInformation_ko.properties | 537 +- .../java/locale/LocaleInformation_kok.properties | 38 +- .../java/locale/LocaleInformation_kpe.properties | 21 + .../java/locale/LocaleInformation_ku.properties | 111 + .../locale/LocaleInformation_ku_Arab.properties | 110 + .../locale/LocaleInformation_ku_Latn.properties | 20 + .../java/locale/LocaleInformation_kw.properties | 21 +- .../java/locale/LocaleInformation_ky.properties | 93 + .../java/locale/LocaleInformation_ln.properties | 261 + .../java/locale/LocaleInformation_lo.properties | 281 +- .../java/locale/LocaleInformation_lt.properties | 557 +- .../java/locale/LocaleInformation_lv.properties | 659 +- .../java/locale/LocaleInformation_mk.properties | 238 +- .../java/locale/LocaleInformation_ml.properties | 1202 ++- .../java/locale/LocaleInformation_mn.properties | 157 +- .../java/locale/LocaleInformation_mr.properties | 173 +- .../java/locale/LocaleInformation_ms.properties | 132 +- .../java/locale/LocaleInformation_ms_BN.properties | 10 +- .../java/locale/LocaleInformation_mt.properties | 169 +- .../java/locale/LocaleInformation_my.properties | 480 + .../java/locale/LocaleInformation_nb.properties | 1004 +- .../java/locale/LocaleInformation_ne.properties | 421 + .../java/locale/LocaleInformation_nl.properties | 530 +- .../java/locale/LocaleInformation_nl_BE.properties | 18 +- .../java/locale/LocaleInformation_nn.properties | 733 +- .../java/locale/LocaleInformation_nr.properties | 27 + .../java/locale/LocaleInformation_nso.properties | 27 + .../java/locale/LocaleInformation_ny.properties | 23 + .../java/locale/LocaleInformation_om.properties | 123 +- .../java/locale/LocaleInformation_om_KE.properties | 11 +- .../java/locale/LocaleInformation_or.properties | 42 +- .../java/locale/LocaleInformation_pa.properties | 88 +- .../locale/LocaleInformation_pa_Arab.properties | 16 + .../java/locale/LocaleInformation_pl.properties | 878 +- .../java/locale/LocaleInformation_ps.properties | 153 +- .../java/locale/LocaleInformation_pt.properties | 1069 +- .../java/locale/LocaleInformation_pt_PT.properties | 273 +- .../java/locale/LocaleInformation_ro.properties | 643 +- .../java/locale/LocaleInformation_ru.properties | 646 +- .../java/locale/LocaleInformation_ru_UA.properties | 9 +- .../java/locale/LocaleInformation_rw.properties | 130 + .../java/locale/LocaleInformation_sa.properties | 41 +- .../java/locale/LocaleInformation_se.properties | 370 + .../java/locale/LocaleInformation_se_FI.properties | 116 + .../java/locale/LocaleInformation_si.properties | 28 + .../java/locale/LocaleInformation_sid.properties | 21 +- .../java/locale/LocaleInformation_sk.properties | 367 +- .../java/locale/LocaleInformation_sl.properties | 320 +- .../java/locale/LocaleInformation_so.properties | 180 +- .../java/locale/LocaleInformation_so_DJ.properties | 3 +- .../java/locale/LocaleInformation_so_ET.properties | 3 +- .../java/locale/LocaleInformation_so_KE.properties | 2 +- .../java/locale/LocaleInformation_sq.properties | 159 +- .../java/locale/LocaleInformation_sr.properties | 377 +- .../locale/LocaleInformation_sr_BA_Cyrl.properties | 15 +- .../locale/LocaleInformation_sr_Latn.properties | 271 +- .../locale/LocaleInformation_sr_ME_Latn.properties | 10 + .../locale/LocaleInformation_sr_RS_Latn.properties | 10 + .../java/locale/LocaleInformation_ss.properties | 27 + .../java/locale/LocaleInformation_ssy.properties | 9 + .../java/locale/LocaleInformation_st.properties | 119 + .../java/locale/LocaleInformation_sv.properties | 1182 ++- .../java/locale/LocaleInformation_sv_FI.properties | 10 +- .../java/locale/LocaleInformation_sw.properties | 150 +- .../java/locale/LocaleInformation_syr.properties | 16 +- .../java/locale/LocaleInformation_ta.properties | 225 +- .../java/locale/LocaleInformation_te.properties | 74 +- .../java/locale/LocaleInformation_tg.properties | 82 + .../java/locale/LocaleInformation_th.properties | 1071 +- .../java/locale/LocaleInformation_ti.properties | 119 +- .../java/locale/LocaleInformation_ti_ER.properties | 36 +- .../java/locale/LocaleInformation_tig.properties | 63 +- .../java/locale/LocaleInformation_tn.properties | 106 + .../java/locale/LocaleInformation_to.properties | 212 + .../java/locale/LocaleInformation_tr.properties | 901 +- .../java/locale/LocaleInformation_trv.properties | 80 + .../java/locale/LocaleInformation_ts.properties | 51 + .../java/locale/LocaleInformation_tt.properties | 15 + .../java/locale/LocaleInformation_ug.properties | 22 + .../java/locale/LocaleInformation_uk.properties | 1052 +- .../java/locale/LocaleInformation_ur.properties | 385 +- .../java/locale/LocaleInformation_ur_IN.properties | 9 + .../java/locale/LocaleInformation_uz.properties | 25 +- .../locale/LocaleInformation_uz_Arab.properties | 67 +- .../locale/LocaleInformation_uz_Latn.properties | 40 +- .../java/locale/LocaleInformation_ve.properties | 27 + .../java/locale/LocaleInformation_vi.properties | 340 +- .../java/locale/LocaleInformation_wal.properties | 49 +- .../java/locale/LocaleInformation_wo.properties | 33 + .../java/locale/LocaleInformation_xh.properties | 131 + .../java/locale/LocaleInformation_yo.properties | 130 + .../java/locale/LocaleInformation_zh.properties | 701 +- .../locale/LocaleInformation_zh_HK_Hant.properties | 34 +- .../locale/LocaleInformation_zh_Hant.properties | 630 +- .../locale/LocaleInformation_zh_MO_Hant.properties | 28 +- .../locale/LocaleInformation_zh_SG_Hans.properties | 35 +- .../java/locale/LocaleInformation_zu.properties | 131 + .../resource/java/text/metazones.properties | 323 + .../resource/java/util/iso4217.properties | 292 +- .../classpath/resource/java/util/weeks.properties | 80 + libjava/classpath/scripts/Makefile.in | 25 +- libjava/classpath/scripts/check_jni_methods.sh.in | 10 +- libjava/classpath/tools/Makefile.am | 209 +- libjava/classpath/tools/Makefile.in | 251 +- .../tools/classes/com/sun/tools/javadoc/Main.class | Bin 0 -> 453 bytes .../FileSystemClassLoader$FileStreamInfo.class | Bin 0 -> 1086 bytes .../FileSystemClassLoader$JarStreamInfo.class | Bin 0 -> 1741 bytes .../tools/FileSystemClassLoader$StreamInfo.class | Bin 0 -> 446 bytes .../classpath/tools/FileSystemClassLoader.class | Bin 0 -> 6253 bytes .../classes/gnu/classpath/tools/IOToolkit.class | Bin 0 -> 3753 bytes .../gnu/classpath/tools/MalformedInputEvent.class | Bin 0 -> 1267 bytes .../classpath/tools/MalformedInputListener.class | Bin 0 -> 228 bytes .../tools/NotifyingInputStreamReader.class | Bin 0 -> 5878 bytes .../gnu/classpath/tools/StringToolkit.class | Bin 0 -> 1124 bytes .../tools/common/ClasspathToolParser.class | Bin 4028 -> 4032 bytes .../doclets/AbstractDoclet$DocletOptionGroup.class | Bin 0 -> 2075 bytes .../doclets/AbstractDoclet$DocletOptionTag.class | Bin 0 -> 3296 bytes .../AbstractDoclet$DocletOptionTaglet.class | Bin 0 -> 4359 bytes .../AbstractDoclet$DocletOptionTagletPath.class | Bin 0 -> 955 bytes .../tools/doclets/AbstractDoclet$IndexKey.class | Bin 0 -> 1129 bytes .../doclets/AbstractDoclet$InterfaceRelation.class | Bin 0 -> 663 bytes .../tools/doclets/AbstractDoclet$UsageType.class | Bin 0 -> 1848 bytes .../classpath/tools/doclets/AbstractDoclet.class | Bin 0 -> 27211 bytes .../doclets/DocletConfigurationException.class | Bin 0 -> 432 bytes .../gnu/classpath/tools/doclets/DocletOption.class | Bin 0 -> 575 bytes .../tools/doclets/DocletOptionColonSeparated.class | Bin 0 -> 1139 bytes .../classpath/tools/doclets/DocletOptionFile.class | Bin 0 -> 962 bytes .../classpath/tools/doclets/DocletOptionFlag.class | Bin 0 -> 755 bytes .../doclets/DocletOptionPackageWildcard.class | Bin 0 -> 2108 bytes .../tools/doclets/DocletOptionString.class | Bin 0 -> 776 bytes .../tools/doclets/InlineTagRenderer.class | Bin 0 -> 258 bytes .../doclets/InvalidPackageWildcardException.class | Bin 0 -> 437 bytes .../gnu/classpath/tools/doclets/PackageGroup.class | Bin 0 -> 698 bytes .../classpath/tools/doclets/PackageMatcher.class | Bin 0 -> 2907 bytes .../classpath/tools/doclets/StandardTaglet.class | Bin 0 -> 1341 bytes .../classpath/tools/doclets/TagletPrinter.class | Bin 0 -> 187 bytes .../tools/doclets/debugdoclet/DebugDoclet.class | Bin 0 -> 4081 bytes .../tools/doclets/htmldoclet/CssClass.class | Bin 0 -> 14612 bytes .../tools/doclets/htmldoclet/ExternalDocSet.class | Bin 0 -> 3836 bytes .../tools/doclets/htmldoclet/HtmlDoclet$1.class | Bin 0 -> 1205 bytes .../tools/doclets/htmldoclet/HtmlDoclet$2.class | Bin 0 -> 1207 bytes .../tools/doclets/htmldoclet/HtmlDoclet$3.class | Bin 0 -> 1401 bytes .../doclets/htmldoclet/HtmlDoclet$TreeNode.class | Bin 0 -> 1088 bytes .../tools/doclets/htmldoclet/HtmlDoclet.class | Bin 0 -> 80179 bytes .../tools/doclets/htmldoclet/HtmlPage.class | Bin 0 -> 12297 bytes .../doclets/htmldoclet/HtmlTagletContext.class | Bin 0 -> 876 bytes .../tools/doclets/xmldoclet/Driver$1.class | Bin 0 -> 935 bytes .../xmldoclet/Driver$NullErrorReporter.class | Bin 0 -> 793 bytes .../tools/doclets/xmldoclet/Driver$UsageType.class | Bin 0 -> 1537 bytes .../classpath/tools/doclets/xmldoclet/Driver.class | Bin 0 -> 51864 bytes .../tools/doclets/xmldoclet/Driver1_4.class | Bin 0 -> 955 bytes .../doclets/xmldoclet/HtmlRepairer$TagInfo.class | Bin 0 -> 1043 bytes .../tools/doclets/xmldoclet/HtmlRepairer.class | Bin 0 -> 10463 bytes .../tools/doclets/xmldoclet/TargetContext.class | Bin 0 -> 1172 bytes .../DocTranslet$DocErrorReporterOutputStream.class | Bin 0 -> 1093 bytes .../xmldoclet/doctranslet/DocTranslet.class | Bin 0 -> 14435 bytes .../DocTransletConfigurationException.class | Bin 0 -> 774 bytes .../doctranslet/DocTransletException.class | Bin 0 -> 1218 bytes .../xmldoclet/doctranslet/DocTransletOptions.class | Bin 0 -> 865 bytes .../xmldoclet/doctranslet/JarClassLoader.class | Bin 0 -> 2127 bytes .../xmldoclet/doctranslet/OutputFileInfo.class | Bin 0 -> 1467 bytes .../gnu/classpath/tools/getopt/Parser$1.class | Bin 1061 -> 1061 bytes .../gnu/classpath/tools/getopt/Parser$2.class | Bin 1119 -> 1119 bytes .../gnu/classpath/tools/getopt/Parser$3.class | Bin 904 -> 904 bytes .../gnu/classpath/tools/getopt/Parser.class | Bin 8099 -> 8255 bytes .../classpath/tools/gjdoc/AbstractTagImpl.class | Bin 0 -> 2825 bytes .../tools/gjdoc/ArrayCharacterIterator.class | Bin 0 -> 1762 bytes .../tools/gjdoc/BlockSourceComponent.class | Bin 0 -> 629 bytes .../gnu/classpath/tools/gjdoc/BracketClose.class | Bin 0 -> 862 bytes .../gnu/classpath/tools/gjdoc/ClassComponent.class | Bin 0 -> 2610 bytes .../gnu/classpath/tools/gjdoc/ClassDocImpl.class | Bin 0 -> 25782 bytes .../gnu/classpath/tools/gjdoc/ClassDocProxy.class | Bin 0 -> 7577 bytes .../tools/gjdoc/ClassDocReflectedImpl.class | Bin 0 -> 8685 bytes .../classpath/tools/gjdoc/CommentComponent.class | Bin 0 -> 1517 bytes .../classpath/tools/gjdoc/ConstructorDocImpl.class | Bin 0 -> 757 bytes .../classes/gnu/classpath/tools/gjdoc/Debug.class | Bin 0 -> 1447 bytes .../tools/gjdoc/DirectoryTree$FileNode.class | Bin 0 -> 943 bytes .../gnu/classpath/tools/gjdoc/DirectoryTree.class | Bin 0 -> 1226 bytes .../gnu/classpath/tools/gjdoc/DocImpl.class | Bin 0 -> 19116 bytes .../tools/gjdoc/EmptyStatementComponent.class | Bin 0 -> 612 bytes .../gnu/classpath/tools/gjdoc/ErrorReporter.class | Bin 0 -> 1660 bytes .../tools/gjdoc/ExecutableMemberDocImpl.class | Bin 0 -> 9289 bytes .../gnu/classpath/tools/gjdoc/FieldComponent.class | Bin 0 -> 3110 bytes .../gnu/classpath/tools/gjdoc/FieldDocImpl.class | Bin 0 -> 8266 bytes .../classpath/tools/gjdoc/FunctionComponent.class | Bin 0 -> 2992 bytes .../classpath/tools/gjdoc/GjdocPackageDoc.class | Bin 0 -> 217 bytes .../gnu/classpath/tools/gjdoc/GjdocRootDoc.class | Bin 0 -> 184 bytes .../tools/gjdoc/IgnoredFileParseException.class | Bin 0 -> 357 bytes .../classpath/tools/gjdoc/ImportComponent.class | Bin 0 -> 1226 bytes .../classpath/tools/gjdoc/InheritDocTagImpl.class | Bin 0 -> 1838 bytes .../gnu/classpath/tools/gjdoc/JavadocWrapper.class | Bin 0 -> 960 bytes .../gnu/classpath/tools/gjdoc/LinkTagImpl.class | Bin 0 -> 918 bytes .../classes/gnu/classpath/tools/gjdoc/Main$1.class | Bin 0 -> 825 bytes .../gnu/classpath/tools/gjdoc/Main$10.class | Bin 0 -> 1221 bytes .../gnu/classpath/tools/gjdoc/Main$11.class | Bin 0 -> 1728 bytes .../gnu/classpath/tools/gjdoc/Main$12.class | Bin 0 -> 1799 bytes .../gnu/classpath/tools/gjdoc/Main$13.class | Bin 0 -> 1800 bytes .../gnu/classpath/tools/gjdoc/Main$14.class | Bin 0 -> 1002 bytes .../gnu/classpath/tools/gjdoc/Main$15.class | Bin 0 -> 924 bytes .../gnu/classpath/tools/gjdoc/Main$16.class | Bin 0 -> 1715 bytes .../gnu/classpath/tools/gjdoc/Main$17.class | Bin 0 -> 828 bytes .../gnu/classpath/tools/gjdoc/Main$18.class | Bin 0 -> 809 bytes .../gnu/classpath/tools/gjdoc/Main$19.class | Bin 0 -> 809 bytes .../classes/gnu/classpath/tools/gjdoc/Main$2.class | Bin 0 -> 767 bytes .../gnu/classpath/tools/gjdoc/Main$20.class | Bin 0 -> 1382 bytes .../gnu/classpath/tools/gjdoc/Main$21.class | Bin 0 -> 1401 bytes .../gnu/classpath/tools/gjdoc/Main$22.class | Bin 0 -> 809 bytes .../gnu/classpath/tools/gjdoc/Main$23.class | Bin 0 -> 809 bytes .../gnu/classpath/tools/gjdoc/Main$24.class | Bin 0 -> 809 bytes .../gnu/classpath/tools/gjdoc/Main$25.class | Bin 0 -> 809 bytes .../classes/gnu/classpath/tools/gjdoc/Main$3.class | Bin 0 -> 767 bytes .../classes/gnu/classpath/tools/gjdoc/Main$4.class | Bin 0 -> 767 bytes .../classes/gnu/classpath/tools/gjdoc/Main$5.class | Bin 0 -> 767 bytes .../classes/gnu/classpath/tools/gjdoc/Main$6.class | Bin 0 -> 806 bytes .../classes/gnu/classpath/tools/gjdoc/Main$7.class | Bin 0 -> 825 bytes .../classes/gnu/classpath/tools/gjdoc/Main$8.class | Bin 0 -> 825 bytes .../classes/gnu/classpath/tools/gjdoc/Main$9.class | Bin 0 -> 806 bytes .../tools/gjdoc/Main$OptionProcessor.class | Bin 0 -> 727 bytes .../classes/gnu/classpath/tools/gjdoc/Main.class | Bin 0 -> 29565 bytes .../gnu/classpath/tools/gjdoc/MemberDocImpl.class | Bin 0 -> 5337 bytes .../gnu/classpath/tools/gjdoc/MethodDocImpl.class | Bin 0 -> 1247 bytes .../classpath/tools/gjdoc/PackageComponent.class | Bin 0 -> 1142 bytes .../gnu/classpath/tools/gjdoc/PackageDocImpl.class | Bin 0 -> 5798 bytes .../gnu/classpath/tools/gjdoc/ParamTagImpl.class | Bin 0 -> 1368 bytes .../gnu/classpath/tools/gjdoc/ParameterImpl.class | Bin 0 -> 1682 bytes .../gnu/classpath/tools/gjdoc/ParseException.class | Bin 0 -> 463 bytes .../gnu/classpath/tools/gjdoc/Parser$1.class | Bin 0 -> 1669 bytes .../gnu/classpath/tools/gjdoc/Parser$Context.class | Bin 0 -> 1209 bytes .../classes/gnu/classpath/tools/gjdoc/Parser.class | Bin 0 -> 13190 bytes .../tools/gjdoc/ProgramElementDocImpl.class | Bin 0 -> 3566 bytes .../tools/gjdoc/RootDocImpl$ResolvedImport.class | Bin 0 -> 403 bytes .../RootDocImpl$ResolvedImportClassFile.class | Bin 0 -> 3100 bytes .../gjdoc/RootDocImpl$ResolvedImportNotFound.class | Bin 0 -> 1664 bytes .../RootDocImpl$ResolvedImportPackageFile.class | Bin 0 -> 3932 bytes ...RootDocImpl$ResolvedImportReflectionClass.class | Bin 0 -> 1980 bytes ...otDocImpl$ResolvedImportReflectionPackage.class | Bin 0 -> 2039 bytes .../tools/gjdoc/RootDocImpl$ScheduledClass.class | Bin 0 -> 1036 bytes .../gnu/classpath/tools/gjdoc/RootDocImpl.class | Bin 0 -> 20655 bytes .../gnu/classpath/tools/gjdoc/SeeTagImpl.class | Bin 0 -> 4114 bytes .../classpath/tools/gjdoc/SerialFieldTagImpl.class | Bin 0 -> 2862 bytes .../tools/gjdoc/SlashSlashCommentComponent.class | Bin 0 -> 556 bytes .../classpath/tools/gjdoc/SourceComponent.class | Bin 0 -> 787 bytes .../classpath/tools/gjdoc/SourcePositionImpl.class | Bin 0 -> 1095 bytes .../tools/gjdoc/StaticBlockComponent.class | Bin 0 -> 1030 bytes .../gnu/classpath/tools/gjdoc/TagContainer.class | Bin 0 -> 247 bytes .../gnu/classpath/tools/gjdoc/TagImpl.class | Bin 0 -> 1350 bytes .../gnu/classpath/tools/gjdoc/TemporaryStore.class | Bin 0 -> 548 bytes .../gnu/classpath/tools/gjdoc/TextTagImpl.class | Bin 0 -> 1026 bytes .../gnu/classpath/tools/gjdoc/ThrowsTagImpl.class | Bin 0 -> 2479 bytes .../classes/gnu/classpath/tools/gjdoc/Timer.class | Bin 0 -> 2568 bytes .../gnu/classpath/tools/gjdoc/TimerDoclet$1.class | Bin 0 -> 900 bytes .../gnu/classpath/tools/gjdoc/TimerDoclet.class | Bin 0 -> 2637 bytes .../gnu/classpath/tools/gjdoc/TypeImpl.class | Bin 0 -> 2694 bytes .../classpath/tools/gjdoc/TypeVariableImpl.class | Bin 0 -> 1292 bytes .../gnu/classpath/tools/gjdoc/ValueTagImpl.class | Bin 0 -> 1032 bytes .../gnu/classpath/tools/gjdoc/Whitespace.class | Bin 0 -> 591 bytes .../gnu/classpath/tools/gjdoc/WritableType.class | Bin 0 -> 309 bytes .../tools/gjdoc/expr/AdditionExpression.class | Bin 0 -> 2306 bytes .../classpath/tools/gjdoc/expr/AndExpression.class | Bin 0 -> 756 bytes .../tools/gjdoc/expr/BinaryBitwiseExpression.class | Bin 0 -> 1711 bytes .../gjdoc/expr/BinaryComputationExpression.class | Bin 0 -> 2769 bytes .../gjdoc/expr/BinaryEqualityExpression.class | Bin 0 -> 2071 bytes .../tools/gjdoc/expr/BinaryExpression.class | Bin 0 -> 615 bytes .../tools/gjdoc/expr/BinaryLogicalExpression.class | Bin 0 -> 1593 bytes .../gjdoc/expr/BinaryRelationExpression.class | Bin 0 -> 1928 bytes .../tools/gjdoc/expr/BinaryShiftExpression.class | Bin 0 -> 1691 bytes .../tools/gjdoc/expr/BitShiftRightExpression.class | Bin 0 -> 784 bytes .../gjdoc/expr/CircularExpressionException.class | Bin 0 -> 618 bytes .../tools/gjdoc/expr/ConditionalExpression.class | Bin 0 -> 1670 bytes .../tools/gjdoc/expr/ConstantBoolean.class | Bin 0 -> 1371 bytes .../classpath/tools/gjdoc/expr/ConstantByte.class | Bin 0 -> 1082 bytes .../classpath/tools/gjdoc/expr/ConstantChar.class | Bin 0 -> 1634 bytes .../tools/gjdoc/expr/ConstantDouble.class | Bin 0 -> 1288 bytes .../tools/gjdoc/expr/ConstantExpression.class | Bin 0 -> 787 bytes .../classpath/tools/gjdoc/expr/ConstantFloat.class | Bin 0 -> 1448 bytes .../tools/gjdoc/expr/ConstantInteger.class | Bin 0 -> 1378 bytes .../classpath/tools/gjdoc/expr/ConstantLong.class | Bin 0 -> 1599 bytes .../classpath/tools/gjdoc/expr/ConstantNull.class | Bin 0 -> 829 bytes .../classpath/tools/gjdoc/expr/ConstantShort.class | Bin 0 -> 1088 bytes .../tools/gjdoc/expr/ConstantString.class | Bin 0 -> 1025 bytes .../gnu/classpath/tools/gjdoc/expr/Context.class | Bin 0 -> 818 bytes .../tools/gjdoc/expr/DivisionExpression.class | Bin 0 -> 959 bytes .../tools/gjdoc/expr/EqualExpression.class | Bin 0 -> 1067 bytes .../gnu/classpath/tools/gjdoc/expr/Evaluator.class | Bin 0 -> 3343 bytes .../tools/gjdoc/expr/EvaluatorEnvironment.class | Bin 0 -> 378 bytes .../tools/gjdoc/expr/ExclusiveOrExpression.class | Bin 0 -> 780 bytes .../classpath/tools/gjdoc/expr/Expression.class | Bin 0 -> 333 bytes .../tools/gjdoc/expr/GreaterThanExpression.class | Bin 0 -> 988 bytes .../gjdoc/expr/GreaterThanOrEqualExpression.class | Bin 0 -> 1009 bytes .../tools/gjdoc/expr/IdentifierExpression.class | Bin 0 -> 2874 bytes .../gjdoc/expr/IllegalExpressionException.class | Bin 0 -> 577 bytes .../tools/gjdoc/expr/InclusiveOrExpression.class | Bin 0 -> 773 bytes .../gnu/classpath/tools/gjdoc/expr/JavaLexer.class | Bin 0 -> 27024 bytes .../tools/gjdoc/expr/JavaRecognizer.class | Bin 0 -> 22370 bytes .../tools/gjdoc/expr/JavaTokenTypes.class | Bin 0 -> 3902 bytes .../tools/gjdoc/expr/LessThanExpression.class | Bin 0 -> 979 bytes .../gjdoc/expr/LessThanOrEqualExpression.class | Bin 0 -> 1000 bytes .../tools/gjdoc/expr/LogicalAndExpression.class | Bin 0 -> 693 bytes .../tools/gjdoc/expr/LogicalNotExpression.class | Bin 0 -> 1557 bytes .../tools/gjdoc/expr/LogicalOrExpression.class | Bin 0 -> 683 bytes .../tools/gjdoc/expr/ModuloExpression.class | Bin 0 -> 953 bytes .../gjdoc/expr/MultiplicationExpression.class | Bin 0 -> 977 bytes .../tools/gjdoc/expr/NegateExpression.class | Bin 0 -> 1696 bytes .../tools/gjdoc/expr/NotEqualExpression.class | Bin 0 -> 1071 bytes .../classpath/tools/gjdoc/expr/NotExpression.class | Bin 0 -> 1467 bytes .../tools/gjdoc/expr/ShiftLeftExpression.class | Bin 0 -> 772 bytes .../tools/gjdoc/expr/ShiftRightExpression.class | Bin 0 -> 775 bytes .../tools/gjdoc/expr/SubtractionExpression.class | Bin 0 -> 968 bytes .../gnu/classpath/tools/gjdoc/expr/Type.class | Bin 0 -> 1204 bytes .../tools/gjdoc/expr/TypeCastExpression.class | Bin 0 -> 2687 bytes .../tools/gjdoc/expr/UnaryExpression.class | Bin 0 -> 524 bytes .../gjdoc/expr/UnknownIdentifierException.class | Bin 0 -> 473 bytes .../classes/gnu/classpath/tools/jar/Creator.class | Bin 6679 -> 7304 bytes .../classes/gnu/classpath/tools/jar/Indexer.class | Bin 4234 -> 4240 bytes .../classes/gnu/classpath/tools/jar/Updater.class | Bin 2403 -> 2785 bytes .../tools/java2xhtml/Java2xhtml$State.class | Bin 0 -> 900 bytes .../classpath/tools/java2xhtml/Java2xhtml.class | Bin 0 -> 26685 bytes .../gnu/classpath/tools/javah/ClassWrapper.class | Bin 8524 -> 8529 bytes .../gnu/classpath/tools/javah/JniHelper.class | Bin 2997 -> 2909 bytes .../tools/native2ascii/Native2ASCII.class | Bin 4201 -> 4205 bytes .../classpath/tools/orbd/PersistentMap$Entry.class | Bin 2453 -> 2457 bytes .../classpath/tools/rmic/ClassRmicCompiler.class | Bin 30611 -> 30522 bytes .../gnu/classpath/tools/rmic/Generator.class | Bin 2992 -> 2904 bytes .../gnu/classpath/tools/rmic/MethodGenerator.class | Bin 5369 -> 5280 bytes .../classpath/tools/rmic/RmiMethodGenerator.class | Bin 5210 -> 5116 bytes .../tools/rmic/SourceGiopRmicCompiler.class | Bin 12415 -> 12269 bytes .../classpath/tools/rmic/SourceRmicCompiler.class | Bin 3890 -> 3894 bytes .../taglets/AuthorTaglet$EmailReplacement.class | Bin 0 -> 714 bytes .../gnu/classpath/tools/taglets/AuthorTaglet.class | Bin 0 -> 4878 bytes .../gnu/classpath/tools/taglets/CodeTaglet.class | Bin 0 -> 1529 bytes .../classpath/tools/taglets/CopyrightTaglet.class | Bin 0 -> 2366 bytes .../classpath/tools/taglets/DeprecatedTaglet.class | Bin 0 -> 2371 bytes .../classpath/tools/taglets/GenericTaglet.class | Bin 0 -> 2708 bytes .../tools/taglets/GnuExtendedTaglet.class | Bin 0 -> 381 bytes .../gnu/classpath/tools/taglets/SinceTaglet.class | Bin 0 -> 2962 bytes .../classpath/tools/taglets/TagletContext.class | Bin 0 -> 858 bytes .../gnu/classpath/tools/taglets/ValueTaglet.class | Bin 0 -> 2695 bytes .../classpath/tools/taglets/VersionTaglet.class | Bin 0 -> 2580 bytes .../tools/com/sun/tools/javadoc/Main.java | 9 + libjava/classpath/tools/gappletviewer.in | 2 +- .../gnu/classpath/tools/gjdoc/expr/JavaLexer.java | 1962 ++++ .../gnu/classpath/tools/gjdoc/expr/JavaLexer.smap | 1280 +++ .../classpath/tools/gjdoc/expr/JavaRecognizer.java | 1406 +++ .../classpath/tools/gjdoc/expr/JavaRecognizer.smap | 987 ++ .../classpath/tools/gjdoc/expr/JavaTokenTypes.java | 122 + .../classpath/tools/gjdoc/expr/JavaTokenTypes.txt | 116 + libjava/classpath/tools/gjar.in | 2 +- libjava/classpath/tools/gjarsigner.in | 2 +- libjava/classpath/tools/gjavah.in | 2 +- libjava/classpath/tools/gjdoc.in | 49 + libjava/classpath/tools/gkeytool.in | 2 +- libjava/classpath/tools/gnative2ascii.in | 2 +- .../gnu/classpath/tools/FileSystemClassLoader.java | 296 + .../tools/gnu/classpath/tools/IOToolkit.java | 199 + .../gnu/classpath/tools/MalformedInputEvent.java | 93 + .../classpath/tools/MalformedInputListener.java | 39 + .../tools/NotifyingInputStreamReader.java | 406 + .../tools/gnu/classpath/tools/StringToolkit.java | 67 + .../classpath/tools/doclets/AbstractDoclet.java | 1369 +++ .../doclets/DocletConfigurationException.java | 37 + .../gnu/classpath/tools/doclets/DocletOption.java | 39 + .../tools/doclets/DocletOptionColonSeparated.java | 60 + .../classpath/tools/doclets/DocletOptionFile.java | 60 + .../classpath/tools/doclets/DocletOptionFlag.java | 52 + .../tools/doclets/DocletOptionPackageWildcard.java | 108 + .../tools/doclets/DocletOptionString.java | 51 + .../classpath/tools/doclets/InlineTagRenderer.java | 29 + .../doclets/InvalidPackageWildcardException.java | 35 + .../gnu/classpath/tools/doclets/PackageGroup.java | 41 + .../classpath/tools/doclets/PackageMatcher.java | 135 + .../classpath/tools/doclets/StandardTaglet.java | 83 + .../gnu/classpath/tools/doclets/TagletPrinter.java | 30 + .../tools/doclets/debugdoclet/DebugDoclet.java | 137 + .../tools/doclets/htmldoclet/CssClass.java | 283 + .../tools/doclets/htmldoclet/ExternalDocSet.java | 170 + .../tools/doclets/htmldoclet/HtmlDoclet.java | 3883 +++++++ .../tools/doclets/htmldoclet/HtmlPage.java | 518 + .../doclets/htmldoclet/HtmlTagletContext.java | 48 + .../classpath/tools/doclets/xmldoclet/Driver.java | 2434 +++++ .../tools/doclets/xmldoclet/Driver1_4.java | 67 + .../tools/doclets/xmldoclet/HtmlRepairer.java | 674 ++ .../tools/doclets/xmldoclet/TargetContext.java | 86 + .../doclets/xmldoclet/doctranslet/DocTranslet.java | 443 + .../DocTransletConfigurationException.java | 36 + .../doctranslet/DocTransletException.java | 46 + .../xmldoclet/doctranslet/DocTransletOptions.java | 45 + .../xmldoclet/doctranslet/JarClassLoader.java | 74 + .../xmldoclet/doctranslet/OutputFileInfo.java | 49 + .../tools/gnu/classpath/tools/getopt/Parser.java | 32 +- .../gnu/classpath/tools/gjdoc/AbstractTagImpl.java | 90 + .../tools/gjdoc/ArrayCharacterIterator.java | 104 + .../gnu/classpath/tools/gjdoc/ClassDocImpl.java | 1244 +++ .../gnu/classpath/tools/gjdoc/ClassDocProxy.java | 152 + .../tools/gjdoc/ClassDocReflectedImpl.java | 202 + .../classpath/tools/gjdoc/ConstructorDocImpl.java | 42 + .../tools/gnu/classpath/tools/gjdoc/Debug.java | 50 + .../gnu/classpath/tools/gjdoc/DirectoryTree.java | 57 + .../tools/gnu/classpath/tools/gjdoc/DocImpl.java | 1074 ++ .../gnu/classpath/tools/gjdoc/ErrorReporter.java | 104 + .../tools/gjdoc/ExecutableMemberDocImpl.java | 411 + .../gnu/classpath/tools/gjdoc/FieldDocImpl.java | 392 + .../gnu/classpath/tools/gjdoc/GjdocPackageDoc.java | 39 + .../gnu/classpath/tools/gjdoc/GjdocRootDoc.java | 39 + .../classpath/tools/gjdoc/InheritDocTagImpl.java | 86 + .../gnu/classpath/tools/gjdoc/JavadocWrapper.java | 36 + .../gnu/classpath/tools/gjdoc/LinkTagImpl.java | 46 + .../tools/gnu/classpath/tools/gjdoc/Main.java | 1846 ++++ .../gnu/classpath/tools/gjdoc/MemberDocImpl.java | 218 + .../gnu/classpath/tools/gjdoc/MethodDocImpl.java | 47 + .../gnu/classpath/tools/gjdoc/PackageDocImpl.java | 206 + .../gnu/classpath/tools/gjdoc/ParamTagImpl.java | 64 + .../gnu/classpath/tools/gjdoc/ParameterImpl.java | 52 + .../gnu/classpath/tools/gjdoc/ParseException.java | 35 + .../tools/gnu/classpath/tools/gjdoc/Parser.java | 1047 ++ .../tools/gjdoc/ProgramElementDocImpl.java | 161 + .../gnu/classpath/tools/gjdoc/RootDocImpl.java | 1317 +++ .../gnu/classpath/tools/gjdoc/SeeTagImpl.java | 198 + .../classpath/tools/gjdoc/SerialFieldTagImpl.java | 111 + .../classpath/tools/gjdoc/SourcePositionImpl.java | 60 + .../gnu/classpath/tools/gjdoc/TagContainer.java | 35 + .../tools/gnu/classpath/tools/gjdoc/TagImpl.java | 43 + .../gnu/classpath/tools/gjdoc/TemporaryStore.java | 115 + .../gnu/classpath/tools/gjdoc/TextTagImpl.java | 39 + .../gnu/classpath/tools/gjdoc/ThrowsTagImpl.java | 88 + .../tools/gnu/classpath/tools/gjdoc/Timer.java | 71 + .../gnu/classpath/tools/gjdoc/TimerDoclet.java | 87 + .../tools/gnu/classpath/tools/gjdoc/TypeImpl.java | 92 + .../classpath/tools/gjdoc/TypeVariableImpl.java | 91 + .../gnu/classpath/tools/gjdoc/ValueTagImpl.java | 48 + .../gnu/classpath/tools/gjdoc/WritableType.java | 27 + .../tools/gjdoc/expr/AdditionExpression.java | 69 + .../classpath/tools/gjdoc/expr/AndExpression.java | 40 + .../tools/gjdoc/expr/BinaryBitwiseExpression.java | 51 + .../gjdoc/expr/BinaryComputationExpression.java | 75 + .../tools/gjdoc/expr/BinaryEqualityExpression.java | 72 + .../tools/gjdoc/expr/BinaryExpression.java | 34 + .../tools/gjdoc/expr/BinaryLogicalExpression.java | 47 + .../tools/gjdoc/expr/BinaryRelationExpression.java | 65 + .../tools/gjdoc/expr/BinaryShiftExpression.java | 49 + .../tools/gjdoc/expr/BitShiftRightExpression.java | 40 + .../gjdoc/expr/CircularExpressionException.java | 35 + .../tools/gjdoc/expr/ConditionalExpression.java | 57 + .../tools/gjdoc/expr/ConstantBoolean.java | 67 + .../classpath/tools/gjdoc/expr/ConstantByte.java | 57 + .../classpath/tools/gjdoc/expr/ConstantChar.java | 81 + .../classpath/tools/gjdoc/expr/ConstantDouble.java | 62 + .../tools/gjdoc/expr/ConstantExpression.java | 35 + .../classpath/tools/gjdoc/expr/ConstantFloat.java | 62 + .../tools/gjdoc/expr/ConstantInteger.java | 62 + .../classpath/tools/gjdoc/expr/ConstantLong.java | 67 + .../classpath/tools/gjdoc/expr/ConstantNull.java | 49 + .../classpath/tools/gjdoc/expr/ConstantShort.java | 57 + .../classpath/tools/gjdoc/expr/ConstantString.java | 58 + .../gnu/classpath/tools/gjdoc/expr/Context.java | 45 + .../tools/gjdoc/expr/DivisionExpression.java | 50 + .../tools/gjdoc/expr/EqualExpression.java | 55 + .../gnu/classpath/tools/gjdoc/expr/Evaluator.java | 131 + .../tools/gjdoc/expr/EvaluatorEnvironment.java | 29 + .../tools/gjdoc/expr/ExclusiveOrExpression.java | 40 + .../gnu/classpath/tools/gjdoc/expr/Expression.java | 27 + .../tools/gjdoc/expr/GreaterThanExpression.java | 50 + .../gjdoc/expr/GreaterThanOrEqualExpression.java | 50 + .../tools/gjdoc/expr/IdentifierExpression.java | 72 + .../gjdoc/expr/IllegalExpressionException.java | 35 + .../tools/gjdoc/expr/InclusiveOrExpression.java | 40 + .../tools/gjdoc/expr/LessThanExpression.java | 50 + .../gjdoc/expr/LessThanOrEqualExpression.java | 50 + .../tools/gjdoc/expr/LogicalAndExpression.java | 35 + .../tools/gjdoc/expr/LogicalNotExpression.java | 43 + .../tools/gjdoc/expr/LogicalOrExpression.java | 35 + .../tools/gjdoc/expr/ModuloExpression.java | 50 + .../tools/gjdoc/expr/MultiplicationExpression.java | 50 + .../tools/gjdoc/expr/NegateExpression.java | 49 + .../tools/gjdoc/expr/NotEqualExpression.java | 55 + .../classpath/tools/gjdoc/expr/NotExpression.java | 43 + .../tools/gjdoc/expr/ShiftLeftExpression.java | 40 + .../tools/gjdoc/expr/ShiftRightExpression.java | 40 + .../tools/gjdoc/expr/SubtractionExpression.java | 50 + .../tools/gnu/classpath/tools/gjdoc/expr/Type.java | 43 + .../tools/gjdoc/expr/TypeCastExpression.java | 70 + .../tools/gjdoc/expr/UnaryExpression.java | 32 + .../gjdoc/expr/UnknownIdentifierException.java | 30 + .../classpath/tools/gjdoc/expr/java-expression.g | 471 + .../tools/gnu/classpath/tools/jar/Creator.java | 11 +- .../tools/gnu/classpath/tools/jar/Indexer.java | 4 +- .../tools/gnu/classpath/tools/jar/Updater.java | 11 +- .../gnu/classpath/tools/java2xhtml/Java2xhtml.java | 1337 +++ .../gnu/classpath/tools/javah/ClassWrapper.java | 26 +- .../tools/gnu/classpath/tools/javah/JniHelper.java | 2 +- .../classpath/tools/native2ascii/Native2ASCII.java | 2 +- .../gnu/classpath/tools/orbd/PersistentMap.java | 4 +- .../classpath/tools/rmic/ClassRmicCompiler.java | 4 +- .../tools/gnu/classpath/tools/rmic/Generator.java | 4 +- .../gnu/classpath/tools/rmic/MethodGenerator.java | 10 +- .../classpath/tools/rmic/RmiMethodGenerator.java | 12 +- .../tools/rmic/SourceGiopRmicCompiler.java | 16 +- .../classpath/tools/rmic/SourceRmicCompiler.java | 6 +- .../gnu/classpath/tools/taglets/AuthorTaglet.java | 276 + .../gnu/classpath/tools/taglets/CodeTaglet.java | 84 + .../classpath/tools/taglets/CopyrightTaglet.java | 106 + .../classpath/tools/taglets/DeprecatedTaglet.java | 115 + .../gnu/classpath/tools/taglets/GenericTaglet.java | 140 + .../classpath/tools/taglets/GnuExtendedTaglet.java | 31 + .../gnu/classpath/tools/taglets/SinceTaglet.java | 144 + .../gnu/classpath/tools/taglets/TagletContext.java | 23 + .../gnu/classpath/tools/taglets/ValueTaglet.java | 113 + .../gnu/classpath/tools/taglets/VersionTaglet.java | 136 + libjava/classpath/tools/gorbd.in | 2 +- libjava/classpath/tools/grmic.in | 2 +- libjava/classpath/tools/grmid.in | 2 +- libjava/classpath/tools/grmiregistry.in | 2 +- libjava/classpath/tools/gserialver.in | 2 +- libjava/classpath/tools/gtnameserv.in | 2 +- .../gnu/classpath/tools/common/Messages.properties | 4 +- .../tools/gjdoc/doctranslets/gjdoc_common.xsl | 54 + .../tools/gjdoc/doctranslets/html/about.xsl | 83 + .../tools/gjdoc/doctranslets/html/allclasses.xsl | 63 + .../tools/gjdoc/doctranslets/html/allpackages.xsl | 78 + .../tools/gjdoc/doctranslets/html/alphaindex.xsl | 107 + .../gjdoc/doctranslets/html/alphaindex_chunked.xsl | 112 + .../gjdoc/doctranslets/html/classdoc-source.xsl | 61 + .../gjdoc/doctranslets/html/classdoc-uses.xsl | 169 + .../tools/gjdoc/doctranslets/html/classdoc.xsl | 1070 ++ .../tools/gjdoc/doctranslets/html/deprecated.xsl | 261 + .../tools/gjdoc/doctranslets/html/descriptor.xsl | 58 + .../tools/gjdoc/doctranslets/html/doctranslet.xsl | 115 + .../tools/gjdoc/doctranslets/html/fulltree.xsl | 201 + .../tools/gjdoc/doctranslets/html/gjdoc.xsl | 240 + .../tools/gjdoc/doctranslets/html/help.xsl | 93 + .../tools/gjdoc/doctranslets/html/html_common.xsl | 584 + .../tools/gjdoc/doctranslets/html/index.xsl | 66 + .../gjdoc/doctranslets/html/index_noframes.xsl | 146 + .../gjdoc/doctranslets/html/packageclasses.xsl | 90 + .../tools/gjdoc/doctranslets/html/packagedoc.xsl | 153 + .../doctranslets/html/res/default_help_en.html | 7 + .../tools/gjdoc/doctranslets/html/res/gjdoc.js | 108 + .../doctranslets/html/res/gjdochtml-clean.css | 382 + .../doctranslets/html/res/gjdochtml-fixed.css | 286 + .../doctranslets/html/res/gjdochtml-sclara.css | 266 + .../gjdoc/doctranslets/html/res/gjdochtml.css | 29 + .../gnu/classpath/tools/gjdoc/dtd/dbcentx.mod | 204 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-amsa.ent | 98 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-amsb.ent | 84 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-amsc.ent | 52 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-amsn.ent | 101 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-amso.ent | 68 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-amsr.ent | 126 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-box.ent | 82 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-cyr1.ent | 109 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-cyr2.ent | 68 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-dia.ent | 56 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-grk1.ent | 91 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-grk2.ent | 62 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-grk3.ent | 85 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-grk4.ent | 85 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-lat1.ent | 104 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-lat2.ent | 163 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-num.ent | 118 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-pub.ent | 127 + .../gnu/classpath/tools/gjdoc/dtd/ent/iso-tech.ent | 104 + .../classpath/tools/gjdoc/dtd/gjdoc-alphaindex.dtd | 35 + .../gnu/classpath/tools/gjdoc/dtd/gjdoc.dtd | 35 + .../tools/gjdoc/htmldoclet/HtmlDoclet.properties | 32 + .../gnu/classpath/tools/gjdoc/htmldoclet/gjdoc.js | 115 + .../gjdoc/htmldoclet/gjdochtml-clean-color1.css | 80 + .../gjdoc/htmldoclet/gjdochtml-clean-layout.css | 460 + .../tools/gjdoc/htmldoclet/gjdochtml-vanilla.css | 21 + .../classpath/tools/gjdoc/htmldoclet/help.xhtml | 25 + .../classpath/tools/gjdoc/htmldoclet/inherit.png | Bin 0 -> 199 bytes .../tools/gjdoc/htmldoclet/xhtml11-target10.dtd | 54 + .../tools/gjdoc/java.lang-classes-1.2.txt | 78 + .../tools/gjdoc/java.lang-classes-1.3.txt | 79 + .../tools/gjdoc/java.lang-classes-1.4.txt | 82 + .../tools/gjdoc/java.lang-classes-1.5.txt | 90 + .../classpath/tools/gjdoc/rng/gjdoc-classdoc.rng | 649 ++ .../gnu/classpath/tools/gjdoc/rng/gjdoc-common.rng | 264 + .../gnu/classpath/tools/gjdoc/rng/gjdoc-index.rng | 176 + .../reference/gnu/java/lang/VMCPStringBuilder.java | 112 + libjava/classpath/vm/reference/java/io/VMFile.java | 26 +- .../reference/java/lang/reflect/Constructor.java | 420 - .../vm/reference/java/lang/reflect/Field.java | 661 -- .../vm/reference/java/lang/reflect/Method.java | 489 - .../reference/java/lang/reflect/VMConstructor.java | 169 + .../vm/reference/java/lang/reflect/VMField.java | 549 + .../vm/reference/java/lang/reflect/VMMethod.java | 209 + .../vm/reference/java/net/VMNetworkInterface.java | 17 +- libjava/configure | 266 +- libjava/configure.ac | 69 +- libjava/gcj/Makefile.in | 3 + libjava/gcj/javaprims.h | 14 +- libjava/gnu/CORBA/NamingService/NameTransformer.h | 9 +- libjava/gnu/classpath/Configuration.h | 1 + libjava/gnu/classpath/Configuration.java | 13 +- libjava/gnu/classpath/jdwp/util/Signature.h | 9 +- libjava/gnu/gcj/util/natDebug.cc | 22 +- libjava/gnu/gcj/xlib/natColormap.cc | 2 +- libjava/gnu/gcj/xlib/natDisplay.cc | 4 +- libjava/gnu/gcj/xlib/natDrawable.cc | 4 +- libjava/gnu/gcj/xlib/natFont.cc | 2 +- libjava/gnu/gcj/xlib/natWMSizeHints.cc | 2 +- libjava/gnu/gcj/xlib/natWindow.cc | 2 +- libjava/gnu/gcj/xlib/natXImage.cc | 2 +- libjava/gnu/java/awt/java2d/AbstractGraphics2D.h | 10 +- libjava/gnu/java/awt/java2d/RasterGraphics.h | 5 + libjava/gnu/java/lang/CPStringBuilder.h | 100 + libjava/gnu/java/lang/VMCPStringBuilder.h | 39 + libjava/gnu/java/lang/VMCPStringBuilder.java | 112 + libjava/gnu/java/math/GMP.h | 125 + libjava/gnu/java/text/AttributedFormatBuffer.h | 10 +- libjava/gnu/java/util/EmptyEnumeration.h | 2 +- libjava/gnu/java/util/prefs/EventDispatcher.h | 41 - .../gnu/java/util/prefs/gconf/GConfNativePeer.h | 22 +- libjava/gnu/java/util/regex/RE.h | 12 +- libjava/gnu/java/util/regex/REMatchEnumeration.h | 8 +- libjava/gnu/java/util/regex/REToken.h | 8 +- libjava/gnu/java/util/regex/RETokenAny.h | 6 +- libjava/gnu/java/util/regex/RETokenBackRef.h | 6 +- libjava/gnu/java/util/regex/RETokenChar.h | 6 +- libjava/gnu/java/util/regex/RETokenEnd.h | 6 +- .../java/util/regex/RETokenEndOfPreviousMatch.h | 6 +- libjava/gnu/java/util/regex/RETokenEndSub.h | 6 +- libjava/gnu/java/util/regex/RETokenIndependent.h | 6 +- libjava/gnu/java/util/regex/RETokenLookAhead.h | 6 +- .../regex/RETokenLookBehind$RETokenMatchHereOnly.h | 6 +- libjava/gnu/java/util/regex/RETokenLookBehind.h | 6 +- libjava/gnu/java/util/regex/RETokenNamedProperty.h | 6 +- libjava/gnu/java/util/regex/RETokenOneOf.h | 14 +- libjava/gnu/java/util/regex/RETokenPOSIX.h | 6 +- libjava/gnu/java/util/regex/RETokenRange.h | 6 +- .../regex/RETokenRepeated$FindMatchControlStack.h | 44 - libjava/gnu/java/util/regex/RETokenRepeated.h | 9 +- libjava/gnu/java/util/regex/RETokenStart.h | 8 +- libjava/gnu/java/util/regex/RETokenWordBoundary.h | 6 +- libjava/gnu/javax/activation/viewers/ImageViewer.h | 58 + libjava/gnu/javax/activation/viewers/TextEditor.h | 59 + libjava/gnu/javax/activation/viewers/TextViewer.h | 51 + .../javax/management/Server$LazyListenersHolder.h | 36 + libjava/gnu/javax/management/Server.h | 3 +- .../security/auth/login/ConfigFileTokenizer.h | 9 +- libjava/gnu/xml/dom/DomAttr.h | 1 + libjava/gnu/xml/dom/DomElement.h | 1 + libjava/gnu/xml/dom/DomNsNode.h | 2 +- libjava/gnu/xml/dom/ls/SAXEventSink.h | 3 +- libjava/gnu/xml/stream/XMLParser.h | 17 +- libjava/gnu/xml/transform/AbstractNumberNode.h | 9 +- libjava/gnu/xml/transform/ParameterNode.h | 8 +- libjava/gnu/xml/transform/SortKey.h | 4 + libjava/gnu/xml/transform/Stylesheet.h | 1 + libjava/gnu/xml/transform/TemplatesImpl.h | 1 + libjava/gnu/xml/transform/XSLComparator.h | 11 + libjava/gnu/xml/util/XMLWriter.h | 9 +- libjava/gnu/xml/xpath/DocumentOrderComparator.h | 11 + libjava/include/Makefile.in | 3 + libjava/java/awt/AlphaComposite.h | 2 + libjava/java/awt/MouseInfo.h | 2 +- libjava/java/awt/image/ColorModel.h | 2 +- ...ntextServicesSupport$BCSSProxyServiceProvider.h | 4 +- libjava/java/io/CharArrayWriter.h | 6 +- libjava/java/lang/AbstractStringBuffer.h | 85 + libjava/java/lang/AbstractStringBuffer.java | 1027 ++ libjava/java/lang/ClassLoader.java | 2 +- libjava/java/lang/Double.h | 2 + libjava/java/lang/Float.h | 2 + libjava/java/lang/Integer.h | 3 + libjava/java/lang/Long.h | 8 + libjava/java/lang/String.h | 1 + libjava/java/lang/String.java | 8 + libjava/java/lang/StringBuffer.h | 97 +- libjava/java/lang/StringBuffer.java | 434 +- libjava/java/lang/StringBuilder.h | 183 +- libjava/java/lang/StringBuilder.java | 500 +- libjava/java/lang/Thread.h | 11 +- libjava/java/lang/Thread.java | 17 +- libjava/java/lang/ThreadLocal.h | 7 +- libjava/java/lang/ThreadLocal.java | 35 +- libjava/java/lang/ThreadLocalMap$Entry.h | 21 + libjava/java/lang/ThreadLocalMap.h | 41 + libjava/java/lang/Throwable.h | 15 +- libjava/java/lang/natAbstractStringBuffer.cc | 41 + libjava/java/lang/natStringBuffer.cc | 42 - libjava/java/lang/natStringBuilder.cc | 29 - libjava/java/math/BigInteger.h | 22 +- libjava/java/net/URI.h | 12 +- libjava/java/nio/Buffer.h | 4 +- libjava/java/nio/Buffer.java | 18 +- libjava/java/nio/ByteBuffer.h | 11 +- libjava/java/nio/CharBuffer.h | 9 +- libjava/java/nio/DirectByteBufferImpl.java | 10 +- libjava/java/nio/DoubleBuffer.h | 9 +- libjava/java/nio/FloatBuffer.h | 9 +- libjava/java/nio/IntBuffer.h | 9 +- libjava/java/nio/LongBuffer.h | 9 +- libjava/java/nio/MappedByteBuffer.h | 9 +- libjava/java/nio/MappedByteBufferImpl.h | 1 + libjava/java/nio/MappedByteBufferImpl.java | 5 +- libjava/java/nio/ShortBuffer.h | 9 +- libjava/java/rmi/activation/Activatable.h | 2 +- libjava/java/sql/Timestamp.h | 2 +- libjava/java/text/ChoiceFormat.h | 12 +- libjava/java/text/DateFormat$Field.h | 6 - libjava/java/text/DateFormat.h | 6 - libjava/java/text/DateFormatSymbols.h | 1 + libjava/java/text/DecimalFormat.h | 12 +- libjava/java/text/Format.h | 3 +- libjava/java/text/MessageFormat.h | 6 +- libjava/java/text/NumberFormat.h | 2 + libjava/java/text/SimpleDateFormat.h | 1 + libjava/java/util/ArrayList.h | 1 + libjava/java/util/Arrays.h | 15 +- libjava/java/util/Calendar.h | 1 + libjava/java/util/Formatter.h | 16 +- libjava/java/util/Properties.h | 16 +- libjava/java/util/PropertyResourceBundle.h | 1 + libjava/java/util/ResourceBundle$BundleKey.h | 1 + libjava/java/util/ResourceBundle.h | 4 + libjava/java/util/Scanner.h | 178 + libjava/java/util/Vector.h | 1 + libjava/java/util/logging/XMLFormatter.h | 14 +- libjava/java/util/prefs/AbstractPreferences$1.h | 2 +- libjava/java/util/prefs/AbstractPreferences$2.h | 2 +- libjava/java/util/regex/Matcher.h | 14 + libjava/java/util/zip/ZipEntry.h | 22 +- libjava/javax/activation/ActivationDataFlavor.h | 55 + libjava/javax/activation/CommandInfo.h | 37 + libjava/javax/activation/CommandMap.h | 48 + libjava/javax/activation/CommandObject.h | 30 + libjava/javax/activation/DataContentHandler.h | 45 + .../javax/activation/DataContentHandlerFactory.h | 30 + .../DataHandler$DataContentHandlerWriter.h | 38 + libjava/javax/activation/DataHandler.h | 85 + libjava/javax/activation/DataHandlerDataSource.h | 38 + libjava/javax/activation/DataSource.h | 32 + .../activation/DataSourceDataContentHandler.h | 52 + libjava/javax/activation/FileDataSource.h | 41 + libjava/javax/activation/FileTypeMap.h | 36 + libjava/javax/activation/MailcapCommandMap.h | 64 + libjava/javax/activation/MimeType.h | 57 + .../MimeTypeParameterList$IteratorEnumeration.h | 36 + libjava/javax/activation/MimeTypeParameterList.h | 46 + libjava/javax/activation/MimeTypeParseException.h | 33 + libjava/javax/activation/MimetypesFileTypeMap.h | 54 + .../javax/activation/ObjectDataContentHandler.h | 54 + libjava/javax/activation/URLDataSource.h | 46 + .../activation/UnsupportedDataTypeException.h | 30 + libjava/javax/management/MBeanPermission.h | 2 - ...onCollection$MBeanServerPermissionEnumeration.h | 8 + .../management/openmbean/TabularDataSupport.h | 6 +- libjava/javax/swing/text/html/CSSParser.h | 1 - .../javax/swing/text/html/StyleSheet$CSSStyle.h | 1 + libjava/javax/tools/FileObject.h | 4 +- libjava/jni.cc | 4 +- libjava/scripts/makemake.tcl | 2 + libjava/sources.am | 130 +- libjava/testsuite/Makefile.in | 3 + 2330 files changed, 127467 insertions(+), 29703 deletions(-) create mode 100644 libjava/classpath/gnu/java/lang/CPStringBuilder.java create mode 100644 libjava/classpath/gnu/java/math/GMP.java delete mode 100644 libjava/classpath/gnu/java/util/prefs/EventDispatcher.java rewrite libjava/classpath/gnu/java/util/regex/CharIndexedInputStream.java (65%) rewrite libjava/classpath/gnu/java/util/regex/RE.java (64%) rewrite libjava/classpath/gnu/java/util/regex/RETokenNamedProperty.java (72%) rewrite libjava/classpath/gnu/java/util/regex/RETokenOneOf.java (64%) rewrite libjava/classpath/gnu/java/util/regex/RETokenRepeated.java (81%) create mode 100644 libjava/classpath/gnu/javax/activation/viewers/ImageViewer.java create mode 100644 libjava/classpath/gnu/javax/activation/viewers/TextEditor.java create mode 100644 libjava/classpath/gnu/javax/activation/viewers/TextViewer.java create mode 100644 libjava/classpath/include/gnu_java_math_GMP.h create mode 100644 libjava/classpath/java/lang/AbstractStringBuffer.java create mode 100644 libjava/classpath/java/lang/ThreadLocalMap.java create mode 100644 libjava/classpath/java/lang/reflect/Constructor.java create mode 100644 libjava/classpath/java/lang/reflect/Field.java create mode 100644 libjava/classpath/java/lang/reflect/Method.java create mode 100644 libjava/classpath/java/util/Scanner.java create mode 100644 libjava/classpath/javax/activation/ActivationDataFlavor.java create mode 100644 libjava/classpath/javax/activation/CommandInfo.java create mode 100644 libjava/classpath/javax/activation/CommandMap.java create mode 100644 libjava/classpath/javax/activation/CommandObject.java create mode 100644 libjava/classpath/javax/activation/DataContentHandler.java create mode 100644 libjava/classpath/javax/activation/DataContentHandlerFactory.java create mode 100644 libjava/classpath/javax/activation/DataHandler.java create mode 100644 libjava/classpath/javax/activation/DataHandlerDataSource.java create mode 100644 libjava/classpath/javax/activation/DataSource.java create mode 100644 libjava/classpath/javax/activation/DataSourceDataContentHandler.java create mode 100644 libjava/classpath/javax/activation/FileDataSource.java create mode 100644 libjava/classpath/javax/activation/FileTypeMap.java create mode 100644 libjava/classpath/javax/activation/MailcapCommandMap.java create mode 100644 libjava/classpath/javax/activation/MimeType.java create mode 100644 libjava/classpath/javax/activation/MimeTypeParameterList.java create mode 100644 libjava/classpath/javax/activation/MimeTypeParseException.java create mode 100644 libjava/classpath/javax/activation/MimetypesFileTypeMap.java create mode 100644 libjava/classpath/javax/activation/ObjectDataContentHandler.java create mode 100644 libjava/classpath/javax/activation/URLDataSource.java create mode 100644 libjava/classpath/javax/activation/UnsupportedDataTypeException.java create mode 100644 libjava/classpath/javax/activation/package.html rewrite libjava/classpath/lib/gnu/classpath/Configuration.class (89%) rewrite libjava/classpath/lib/gnu/java/awt/java2d/AbstractGraphics2D.class (88%) rewrite libjava/classpath/lib/gnu/java/awt/java2d/RasterGraphics.class (68%) create mode 100644 libjava/classpath/lib/gnu/java/lang/CPStringBuilder.class create mode 100644 libjava/classpath/lib/gnu/java/lang/VMCPStringBuilder.class rewrite libjava/classpath/lib/gnu/java/locale/LocaleData.class (60%) create mode 100644 libjava/classpath/lib/gnu/java/math/GMP.class rewrite libjava/classpath/lib/gnu/java/security/Engine.class (69%) rewrite libjava/classpath/lib/gnu/java/text/AttributedFormatBuffer.class (90%) rewrite libjava/classpath/lib/gnu/java/util/EmptyEnumeration.class (86%) delete mode 100644 libjava/classpath/lib/gnu/java/util/prefs/EventDispatcher.class rewrite libjava/classpath/lib/gnu/java/util/prefs/gconf/GConfNativePeer.class (93%) rewrite libjava/classpath/lib/gnu/java/util/regex/RE.class (84%) rewrite libjava/classpath/lib/gnu/java/util/regex/REMatchEnumeration.class (61%) rewrite libjava/classpath/lib/gnu/java/util/regex/RETokenOneOf.class (89%) delete mode 100644 libjava/classpath/lib/gnu/java/util/regex/RETokenRepeated$FindMatchControlStack.class create mode 100644 libjava/classpath/lib/gnu/javax/activation/viewers/ImageViewer.class create mode 100644 libjava/classpath/lib/gnu/javax/activation/viewers/TextEditor.class create mode 100644 libjava/classpath/lib/gnu/javax/activation/viewers/TextViewer.class create mode 100644 libjava/classpath/lib/gnu/javax/management/Server$LazyListenersHolder.class rewrite libjava/classpath/lib/gnu/javax/management/Server.class (83%) rewrite libjava/classpath/lib/gnu/xml/dom/DomAttr.class (83%) rewrite libjava/classpath/lib/gnu/xml/dom/DomElement.class (87%) rewrite libjava/classpath/lib/gnu/xml/dom/DomNsNode.class (82%) rewrite libjava/classpath/lib/gnu/xml/dom/ls/SAXEventSink.class (77%) rewrite libjava/classpath/lib/gnu/xml/stream/XMLParser.class (75%) rewrite libjava/classpath/lib/gnu/xml/transform/CallTemplateNode.class (62%) rewrite libjava/classpath/lib/gnu/xml/transform/ForEachNode.class (88%) rewrite libjava/classpath/lib/gnu/xml/transform/ParameterNode.class (76%) rewrite libjava/classpath/lib/gnu/xml/transform/Stylesheet.class (89%) rewrite libjava/classpath/lib/gnu/xml/transform/TemplateNode.class (85%) rewrite libjava/classpath/lib/gnu/xml/transform/UnparsedEntityUriFunction.class (84%) rewrite libjava/classpath/lib/gnu/xml/transform/XSLComparator.class (96%) rewrite libjava/classpath/lib/gnu/xml/transform/XSLURIResolver.class (78%) rewrite libjava/classpath/lib/gnu/xml/xpath/BooleanFunction.class (84%) rewrite libjava/classpath/lib/gnu/xml/xpath/CeilingFunction.class (82%) rewrite libjava/classpath/lib/gnu/xml/xpath/ConcatFunction.class (96%) rewrite libjava/classpath/lib/gnu/xml/xpath/ContainsFunction.class (79%) rewrite libjava/classpath/lib/gnu/xml/xpath/CountFunction.class (83%) rewrite libjava/classpath/lib/gnu/xml/xpath/DocumentOrderComparator.class (82%) rewrite libjava/classpath/lib/gnu/xml/xpath/Expr$ExprNodeSet.class (93%) rewrite libjava/classpath/lib/gnu/xml/xpath/Expr.class (88%) rewrite libjava/classpath/lib/gnu/xml/xpath/FloorFunction.class (82%) rewrite libjava/classpath/lib/gnu/xml/xpath/FunctionCall.class (87%) rewrite libjava/classpath/lib/gnu/xml/xpath/IdFunction.class (82%) rewrite libjava/classpath/lib/gnu/xml/xpath/LangFunction.class (85%) rewrite libjava/classpath/lib/gnu/xml/xpath/LocalNameFunction.class (86%) rewrite libjava/classpath/lib/gnu/xml/xpath/NameFunction.class (85%) rewrite libjava/classpath/lib/gnu/xml/xpath/NamespaceUriFunction.class (82%) rewrite libjava/classpath/lib/gnu/xml/xpath/NormalizeSpaceFunction.class (85%) rewrite libjava/classpath/lib/gnu/xml/xpath/NotFunction.class (87%) rewrite libjava/classpath/lib/gnu/xml/xpath/NumberFunction.class (83%) rewrite libjava/classpath/lib/gnu/xml/xpath/Root.class (70%) rewrite libjava/classpath/lib/gnu/xml/xpath/RoundFunction.class (82%) rewrite libjava/classpath/lib/gnu/xml/xpath/Selector.class (91%) rewrite libjava/classpath/lib/gnu/xml/xpath/StartsWithFunction.class (78%) rewrite libjava/classpath/lib/gnu/xml/xpath/Steps.class (98%) rewrite libjava/classpath/lib/gnu/xml/xpath/StringFunction.class (79%) rewrite libjava/classpath/lib/gnu/xml/xpath/StringLengthFunction.class (80%) rewrite libjava/classpath/lib/gnu/xml/xpath/SubstringAfterFunction.class (78%) rewrite libjava/classpath/lib/gnu/xml/xpath/SubstringBeforeFunction.class (78%) rewrite libjava/classpath/lib/gnu/xml/xpath/SubstringFunction.class (79%) rewrite libjava/classpath/lib/gnu/xml/xpath/SumFunction.class (93%) rewrite libjava/classpath/lib/gnu/xml/xpath/TranslateFunction.class (88%) rewrite libjava/classpath/lib/gnu/xml/xpath/XPathParser.class (74%) rewrite libjava/classpath/lib/gnu/xml/xpath/XPathTokenizer.class (79%) rewrite libjava/classpath/lib/java/awt/image/WritableRaster.class (73%) rewrite libjava/classpath/lib/java/beans/beancontext/BeanContextServicesSupport$BCSSProxyServiceProvider.class (65%) rewrite libjava/classpath/lib/java/io/DataInputStream.class (70%) create mode 100644 libjava/classpath/lib/java/lang/AbstractStringBuffer.class rewrite libjava/classpath/lib/java/lang/Byte.class (71%) rewrite libjava/classpath/lib/java/lang/Double.class (86%) rewrite libjava/classpath/lib/java/lang/Float.class (85%) rewrite libjava/classpath/lib/java/lang/InheritableThreadLocal.class (64%) rewrite libjava/classpath/lib/java/lang/Integer.class (85%) rewrite libjava/classpath/lib/java/lang/Long.class (86%) rewrite libjava/classpath/lib/java/lang/Short.class (68%) rewrite libjava/classpath/lib/java/lang/StringBuffer.class (98%) rewrite libjava/classpath/lib/java/lang/StringBuilder.class (97%) rewrite libjava/classpath/lib/java/lang/Thread.class (69%) rewrite libjava/classpath/lib/java/lang/ThreadLocal.class (93%) create mode 100644 libjava/classpath/lib/java/lang/ThreadLocalMap$Entry.class create mode 100644 libjava/classpath/lib/java/lang/ThreadLocalMap.class rewrite libjava/classpath/lib/java/lang/Throwable.class (65%) rewrite libjava/classpath/lib/java/lang/reflect/Proxy$ClassFactory.class (64%) rewrite libjava/classpath/lib/java/math/BigDecimal.class (74%) rewrite libjava/classpath/lib/java/math/BigInteger.class (93%) rewrite libjava/classpath/lib/java/net/URI.class (62%) rewrite libjava/classpath/lib/java/nio/Buffer.class (98%) rewrite libjava/classpath/lib/java/nio/ByteBuffer.class (78%) rewrite libjava/classpath/lib/java/nio/ByteBufferImpl.class (64%) rewrite libjava/classpath/lib/java/nio/CharBuffer.class (88%) rewrite libjava/classpath/lib/java/nio/CharBufferImpl.class (70%) rewrite libjava/classpath/lib/java/nio/CharSequenceBuffer.class (91%) rewrite libjava/classpath/lib/java/nio/CharViewBufferImpl.class (90%) rewrite libjava/classpath/lib/java/nio/DirectByteBufferImpl.class (63%) rewrite libjava/classpath/lib/java/nio/DoubleBuffer.class (88%) rewrite libjava/classpath/lib/java/nio/DoubleBufferImpl.class (71%) rewrite libjava/classpath/lib/java/nio/DoubleViewBufferImpl.class (89%) rewrite libjava/classpath/lib/java/nio/FloatBuffer.class (88%) rewrite libjava/classpath/lib/java/nio/FloatBufferImpl.class (71%) rewrite libjava/classpath/lib/java/nio/FloatViewBufferImpl.class (90%) rewrite libjava/classpath/lib/java/nio/IntBuffer.class (87%) rewrite libjava/classpath/lib/java/nio/IntBufferImpl.class (71%) rewrite libjava/classpath/lib/java/nio/IntViewBufferImpl.class (90%) rewrite libjava/classpath/lib/java/nio/LongBuffer.class (86%) rewrite libjava/classpath/lib/java/nio/LongBufferImpl.class (71%) rewrite libjava/classpath/lib/java/nio/LongViewBufferImpl.class (90%) rewrite libjava/classpath/lib/java/nio/MappedByteBuffer.class (99%) rewrite libjava/classpath/lib/java/nio/ShortBuffer.class (88%) rewrite libjava/classpath/lib/java/nio/ShortBufferImpl.class (71%) rewrite libjava/classpath/lib/java/nio/ShortViewBufferImpl.class (90%) rewrite libjava/classpath/lib/java/text/DateFormat$Field.class (85%) rewrite libjava/classpath/lib/java/text/DateFormat.class (78%) rewrite libjava/classpath/lib/java/text/DateFormatSymbols.class (90%) rewrite libjava/classpath/lib/java/text/DecimalFormat.class (73%) rewrite libjava/classpath/lib/java/text/DecimalFormatSymbols.class (61%) rewrite libjava/classpath/lib/java/text/SimpleDateFormat.class (87%) rewrite libjava/classpath/lib/java/util/Calendar.class (83%) rewrite libjava/classpath/lib/java/util/Currency.class (76%) rewrite libjava/classpath/lib/java/util/Formatter.class (75%) rewrite libjava/classpath/lib/java/util/Hashtable.class (61%) rewrite libjava/classpath/lib/java/util/Properties.class (85%) rewrite libjava/classpath/lib/java/util/PropertyResourceBundle.class (61%) rewrite libjava/classpath/lib/java/util/ResourceBundle$1.class (77%) rewrite libjava/classpath/lib/java/util/ResourceBundle.class (83%) create mode 100644 libjava/classpath/lib/java/util/Scanner.class rewrite libjava/classpath/lib/java/util/Vector.class (88%) rewrite libjava/classpath/lib/java/util/regex/Matcher.class (91%) rewrite libjava/classpath/lib/java/util/zip/ZipEntry.class (93%) create mode 100644 libjava/classpath/lib/javax/activation/ActivationDataFlavor.class create mode 100644 libjava/classpath/lib/javax/activation/CommandInfo.class create mode 100644 libjava/classpath/lib/javax/activation/CommandMap.class create mode 100644 libjava/classpath/lib/javax/activation/CommandObject.class create mode 100644 libjava/classpath/lib/javax/activation/DataContentHandler.class create mode 100644 libjava/classpath/lib/javax/activation/DataContentHandlerFactory.class create mode 100644 libjava/classpath/lib/javax/activation/DataHandler$DataContentHandlerWriter.class create mode 100644 libjava/classpath/lib/javax/activation/DataHandler.class create mode 100644 libjava/classpath/lib/javax/activation/DataHandlerDataSource.class create mode 100644 libjava/classpath/lib/javax/activation/DataSource.class create mode 100644 libjava/classpath/lib/javax/activation/DataSourceDataContentHandler.class create mode 100644 libjava/classpath/lib/javax/activation/FileDataSource.class create mode 100644 libjava/classpath/lib/javax/activation/FileTypeMap.class create mode 100644 libjava/classpath/lib/javax/activation/MailcapCommandMap.class create mode 100644 libjava/classpath/lib/javax/activation/MimeType.class create mode 100644 libjava/classpath/lib/javax/activation/MimeTypeParameterList$IteratorEnumeration.class create mode 100644 libjava/classpath/lib/javax/activation/MimeTypeParameterList.class create mode 100644 libjava/classpath/lib/javax/activation/MimeTypeParseException.class create mode 100644 libjava/classpath/lib/javax/activation/MimetypesFileTypeMap.class create mode 100644 libjava/classpath/lib/javax/activation/ObjectDataContentHandler.class create mode 100644 libjava/classpath/lib/javax/activation/URLDataSource.class create mode 100644 libjava/classpath/lib/javax/activation/UnsupportedDataTypeException.class rewrite libjava/classpath/lib/javax/management/MBeanPermission.class (89%) rewrite libjava/classpath/lib/javax/management/MBeanServerDelegate.class (81%) rewrite libjava/classpath/lib/javax/management/ObjectName.class (62%) rewrite libjava/classpath/lib/javax/management/openmbean/TabularDataSupport.class (75%) rewrite libjava/classpath/lib/javax/swing/text/html/CSSParser.class (83%) rewrite libjava/classpath/lib/javax/swing/text/html/StyleSheet.class (84%) rewrite libjava/classpath/lib/javax/swing/tree/DefaultMutableTreeNode.class (83%) create mode 100644 libjava/classpath/ltgcc.m4 create mode 100644 libjava/classpath/ltoptions.m4 create mode 100644 libjava/classpath/ltsugar.m4 create mode 100644 libjava/classpath/ltversion.m4 create mode 100644 libjava/classpath/lt~obsolete.m4 create mode 100644 libjava/classpath/m4/ac_prog_antlr.m4 create mode 100644 libjava/classpath/m4/ac_prog_java.m4 create mode 100644 libjava/classpath/m4/ac_prog_java_works.m4 create mode 100644 libjava/classpath/native/jni/java-math/Makefile.am create mode 100644 libjava/classpath/native/jni/java-math/Makefile.in create mode 100644 libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c create mode 100644 libjava/classpath/resource/META-INF/mailcap.default create mode 100644 libjava/classpath/resource/META-INF/mimetypes.default create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_af_NA.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ak.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_ar_JO.properties (74%) rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_ar_LB.properties (74%) rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_ar_SY.properties (73%) rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_as.properties (85%) rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_az_Cyrl.properties (60%) rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_bn.properties (69%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_bo.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_cch.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_cop.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_da.properties (62%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ee.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_el.properties (73%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_en_Dsrt.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_en_JM.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_en_NA.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_en_Shaw.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_en_TT.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_fil.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_fur.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_gaa.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ha.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ha_Arab.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ia.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ig.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ii.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_iu.properties (78%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_kaj.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_kam.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_kcg.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_kfo.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_kk.properties (70%) rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_kn.properties (65%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_kpe.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ku.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ku_Arab.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ku_Latn.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ln.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_ml.properties (75%) rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_mn.properties (72%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_my.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ne.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_nr.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_nso.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ny.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_or.properties (76%) rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_pa.properties (72%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_pa_Arab.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_rw.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_se.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_se_FI.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_si.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_sr_ME_Latn.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_sr_RS_Latn.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ss.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ssy.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_st.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_tg.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_ti_ER.properties (71%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_tn.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_to.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_trv.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ts.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ug.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ur_IN.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_uz_Arab.properties (61%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_ve.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_wo.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_xh.properties create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_yo.properties rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_zh_MO_Hant.properties (60%) rewrite libjava/classpath/resource/gnu/java/locale/LocaleInformation_zh_SG_Hans.properties (66%) create mode 100644 libjava/classpath/resource/gnu/java/locale/LocaleInformation_zu.properties create mode 100644 libjava/classpath/resource/java/text/metazones.properties create mode 100644 libjava/classpath/resource/java/util/weeks.properties create mode 100644 libjava/classpath/tools/classes/com/sun/tools/javadoc/Main.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$FileStreamInfo.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$JarStreamInfo.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader$StreamInfo.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/FileSystemClassLoader.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/IOToolkit.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/MalformedInputEvent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/MalformedInputListener.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/NotifyingInputStreamReader.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/StringToolkit.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionGroup.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTag.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$DocletOptionTagletPath.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$IndexKey.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$InterfaceRelation.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet$UsageType.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/AbstractDoclet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletConfigurationException.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOption.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionColonSeparated.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFile.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionFlag.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/DocletOptionString.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/InlineTagRenderer.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/InvalidPackageWildcardException.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageGroup.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/PackageMatcher.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/StandardTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/TagletPrinter.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/CssClass.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$1.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$2.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$3.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet$TreeNode.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$1.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$NullErrorReporter.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver$UsageType.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer$TagInfo.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/TargetContext.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet$DocErrorReporterOutputStream.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.class rewrite libjava/classpath/tools/classes/gnu/classpath/tools/getopt/Parser.class (72%) create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/AbstractTagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BlockSourceComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/BracketClose.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocProxy.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/CommentComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ConstructorDocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Debug.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree$FileNode.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DirectoryTree.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/DocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/EmptyStatementComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ErrorReporter.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FieldDocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/FunctionComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/GjdocPackageDoc.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/GjdocRootDoc.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/IgnoredFileParseException.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ImportComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/InheritDocTagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/JavadocWrapper.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/LinkTagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$1.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$10.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$11.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$12.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$13.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$14.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$15.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$16.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$17.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$18.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$19.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$2.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$20.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$21.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$22.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$23.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$24.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$25.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$3.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$4.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$5.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$6.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$7.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$8.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$9.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main$OptionProcessor.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Main.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MemberDocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/MethodDocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/PackageDocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParamTagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParameterImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ParseException.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$1.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser$Context.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Parser.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImport.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportClassFile.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportNotFound.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportPackageFile.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionClass.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ResolvedImportReflectionPackage.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl$ScheduledClass.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/RootDocImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SeeTagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SlashSlashCommentComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourceComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/SourcePositionImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/StaticBlockComponent.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TagContainer.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TemporaryStore.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TextTagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ThrowsTagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Timer.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet$1.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TimerDoclet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/TypeVariableImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/ValueTagImpl.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/Whitespace.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/WritableType.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AdditionExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/AndExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantByte.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantChar.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantDouble.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantFloat.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantInteger.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantLong.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantNull.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantShort.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ConstantString.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Context.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/DivisionExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/EqualExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Evaluator.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Expression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/JavaLexer.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/JavaRecognizer.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/JavaTokenTypes.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ModuloExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NegateExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/NotExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/Type.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnaryExpression.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.class rewrite libjava/classpath/tools/classes/gnu/classpath/tools/jar/Updater.class (63%) create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml$State.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/java2xhtml/Java2xhtml.class rewrite libjava/classpath/tools/classes/gnu/classpath/tools/rmic/MethodGenerator.class (69%) rewrite libjava/classpath/tools/classes/gnu/classpath/tools/rmic/RmiMethodGenerator.class (78%) create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet$EmailReplacement.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/AuthorTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CodeTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/CopyrightTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/DeprecatedTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/GenericTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/GnuExtendedTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/SinceTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/TagletContext.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/ValueTaglet.class create mode 100644 libjava/classpath/tools/classes/gnu/classpath/tools/taglets/VersionTaglet.class create mode 100644 libjava/classpath/tools/com/sun/tools/javadoc/Main.java create mode 100644 libjava/classpath/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaLexer.java create mode 100644 libjava/classpath/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaLexer.smap create mode 100644 libjava/classpath/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaRecognizer.java create mode 100644 libjava/classpath/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaRecognizer.smap create mode 100644 libjava/classpath/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaTokenTypes.java create mode 100644 libjava/classpath/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaTokenTypes.txt create mode 100644 libjava/classpath/tools/gjdoc.in create mode 100644 libjava/classpath/tools/gnu/classpath/tools/FileSystemClassLoader.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/IOToolkit.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/MalformedInputEvent.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/MalformedInputListener.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/NotifyingInputStreamReader.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/StringToolkit.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/AbstractDoclet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/DocletConfigurationException.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/DocletOption.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/DocletOptionColonSeparated.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/DocletOptionFile.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/DocletOptionFlag.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/DocletOptionString.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/InlineTagRenderer.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/InvalidPackageWildcardException.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/PackageGroup.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/PackageMatcher.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/StandardTaglet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/TagletPrinter.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/CssClass.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/AbstractTagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ClassDocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ClassDocProxy.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ConstructorDocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/Debug.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/DirectoryTree.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/DocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ErrorReporter.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/FieldDocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/GjdocPackageDoc.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/GjdocRootDoc.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/InheritDocTagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/JavadocWrapper.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/LinkTagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/Main.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/MemberDocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/MethodDocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/PackageDocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ParamTagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ParameterImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ParseException.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/Parser.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/RootDocImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/SeeTagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/SourcePositionImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/TagContainer.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/TagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/TemporaryStore.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/TextTagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ThrowsTagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/Timer.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/TimerDoclet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/TypeImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/TypeVariableImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/ValueTagImpl.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/WritableType.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/AdditionExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/AndExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/BinaryExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantByte.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantChar.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantDouble.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantFloat.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantInteger.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantLong.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantNull.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantShort.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ConstantString.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/Context.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/DivisionExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/EqualExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/Evaluator.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/Expression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/LessThanExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ModuloExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/NegateExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/NotExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/Type.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/UnaryExpression.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/gjdoc/expr/java-expression.g create mode 100644 libjava/classpath/tools/gnu/classpath/tools/java2xhtml/Java2xhtml.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/AuthorTaglet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/CodeTaglet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/CopyrightTaglet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/GenericTaglet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/GnuExtendedTaglet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/SinceTaglet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/TagletContext.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/ValueTaglet.java create mode 100644 libjava/classpath/tools/gnu/classpath/tools/taglets/VersionTaglet.java create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/gjdoc_common.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/about.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/allclasses.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/allpackages.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/alphaindex.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/alphaindex_chunked.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/classdoc-source.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/classdoc-uses.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/classdoc.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/deprecated.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/descriptor.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/doctranslet.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/fulltree.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/gjdoc.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/help.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/html_common.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/index.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/index_noframes.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/packageclasses.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/packagedoc.xsl create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/default_help_en.html create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdoc.js create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdochtml-clean.css create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdochtml-fixed.css create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdochtml-sclara.css create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdochtml.css create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/dbcentx.mod create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsa.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsb.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsc.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsn.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amso.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsr.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-box.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-cyr1.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-cyr2.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-dia.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-grk1.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-grk2.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-grk3.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-grk4.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-lat1.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-lat2.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-num.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-pub.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-tech.ent create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/gjdoc-alphaindex.dtd create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/dtd/gjdoc.dtd create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/HtmlDoclet.properties create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/gjdoc.js create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/gjdochtml-clean-color1.css create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/gjdochtml-clean-layout.css create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/gjdochtml-vanilla.css create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/help.xhtml create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/inherit.png create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/xhtml11-target10.dtd create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/java.lang-classes-1.2.txt create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/java.lang-classes-1.3.txt create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/java.lang-classes-1.4.txt create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/java.lang-classes-1.5.txt create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/rng/gjdoc-classdoc.rng create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/rng/gjdoc-common.rng create mode 100644 libjava/classpath/tools/resource/gnu/classpath/tools/gjdoc/rng/gjdoc-index.rng create mode 100644 libjava/classpath/vm/reference/gnu/java/lang/VMCPStringBuilder.java delete mode 100644 libjava/classpath/vm/reference/java/lang/reflect/Constructor.java delete mode 100644 libjava/classpath/vm/reference/java/lang/reflect/Field.java delete mode 100644 libjava/classpath/vm/reference/java/lang/reflect/Method.java create mode 100644 libjava/classpath/vm/reference/java/lang/reflect/VMConstructor.java create mode 100644 libjava/classpath/vm/reference/java/lang/reflect/VMField.java create mode 100644 libjava/classpath/vm/reference/java/lang/reflect/VMMethod.java create mode 100644 libjava/gnu/java/lang/CPStringBuilder.h create mode 100644 libjava/gnu/java/lang/VMCPStringBuilder.h create mode 100644 libjava/gnu/java/lang/VMCPStringBuilder.java create mode 100644 libjava/gnu/java/math/GMP.h delete mode 100644 libjava/gnu/java/util/prefs/EventDispatcher.h delete mode 100644 libjava/gnu/java/util/regex/RETokenRepeated$FindMatchControlStack.h create mode 100644 libjava/gnu/javax/activation/viewers/ImageViewer.h create mode 100644 libjava/gnu/javax/activation/viewers/TextEditor.h create mode 100644 libjava/gnu/javax/activation/viewers/TextViewer.h create mode 100644 libjava/gnu/javax/management/Server$LazyListenersHolder.h create mode 100644 libjava/java/lang/AbstractStringBuffer.h create mode 100644 libjava/java/lang/AbstractStringBuffer.java rewrite libjava/java/lang/StringBuilder.h (67%) create mode 100644 libjava/java/lang/ThreadLocalMap$Entry.h create mode 100644 libjava/java/lang/ThreadLocalMap.h create mode 100644 libjava/java/lang/natAbstractStringBuffer.cc delete mode 100644 libjava/java/lang/natStringBuffer.cc delete mode 100644 libjava/java/lang/natStringBuilder.cc create mode 100644 libjava/java/util/Scanner.h create mode 100644 libjava/javax/activation/ActivationDataFlavor.h create mode 100644 libjava/javax/activation/CommandInfo.h create mode 100644 libjava/javax/activation/CommandMap.h create mode 100644 libjava/javax/activation/CommandObject.h create mode 100644 libjava/javax/activation/DataContentHandler.h create mode 100644 libjava/javax/activation/DataContentHandlerFactory.h create mode 100644 libjava/javax/activation/DataHandler$DataContentHandlerWriter.h create mode 100644 libjava/javax/activation/DataHandler.h create mode 100644 libjava/javax/activation/DataHandlerDataSource.h create mode 100644 libjava/javax/activation/DataSource.h create mode 100644 libjava/javax/activation/DataSourceDataContentHandler.h create mode 100644 libjava/javax/activation/FileDataSource.h create mode 100644 libjava/javax/activation/FileTypeMap.h create mode 100644 libjava/javax/activation/MailcapCommandMap.h create mode 100644 libjava/javax/activation/MimeType.h create mode 100644 libjava/javax/activation/MimeTypeParameterList$IteratorEnumeration.h create mode 100644 libjava/javax/activation/MimeTypeParameterList.h create mode 100644 libjava/javax/activation/MimeTypeParseException.h create mode 100644 libjava/javax/activation/MimetypesFileTypeMap.h create mode 100644 libjava/javax/activation/ObjectDataContentHandler.h create mode 100644 libjava/javax/activation/URLDataSource.h create mode 100644 libjava/javax/activation/UnsupportedDataTypeException.h diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d07b70e1fc0..7e0bf0bc48c 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,221 @@ +2008-10-21 Andrew John Hughes + + * sources.am, Makfile.in: Regenerate. + +2008-10-17 Matthias Klose + + * configure.ac: Fix bashisms. + * configure: Regenerate. + +2008-10-15 Matthias Klose + + * configure.ac: Disable build of gjdoc, if configured without + --with-antlr-jar or if no antlr.jar found. + * configure: Regenerate. + +2008-10-09 Andrew John Hughes + + * classpath/configure.ac, + * classpath/m4/ac_prog_antlr.m4, + * classpath/m4/ac_prog_java.m4, + * classpath/tools/Makefile.am: + Ported --regen-gjdoc-parser patch and + cantlr support from GNU Classpath. + +2008-10-06 Andrew Haley + + * java/lang/Thread.java (Thread): Always create the ThreadLocalMap + when creating a thread. + (getThreadLocals) Don't lazily create the ThreadLocalMap. + +2008-09-28 Andrew John Hughes + + * classpath/java/lang/ThreadLocalMap.java, + * java/lang/ThreadLocalMap$Entry.h, + * java/lang/ThreadLocalMap.h, + * lib/java/lang/ThreadLocalMap.class, + * lib/java/lang/ThreadLocalMap$Entry.class: + Add the new files for the ThreadLocal patch. + +2008-09-28 Andrew John Hughes + + * classpath/ChangeLog, + * classpath/java/lang/InheritableThreadLocal.java, + * classpath/java/lang/Thread.java, + * classpath/java/lang/ThreadLocal.java: + Merge Daniel Frampton's ThreadLocal patch. + * gcj/javaprims.h: Updated. + * java/lang/Thread.h: Regenerated. + * java/lang/Thread.java: + Replace WeakIdentityHashMap with ThreadLocalMap. + (getThreadLocals()): Likewise. + * java/lang/ThreadLocal.h: Regenerated. + * java/lang/ThreadLocal.java: + (computeNextHash()): New method. + (ThreadLocal()): Initialise fastHash. + (internalGet()): Updated to match Classpath's get(). + (internalSet(Object)): Likewise for set(Object). + (internalRemove()): Likewise for remove(). + +2008-09-25 Andrew John Hughes + + * classpath/configure, + * classpath/configure.ac: + Resynchronise with Classpath's configure. + * classpath/examples/Makefile.in: + Add equivalent support for building as in + tools/Makefile.in. + * classpath/java/nio/Buffer.java, + * classpath/java/nio/ByteBuffer.java, + * classpath/java/nio/ByteBufferImpl.java, + * classpath/java/nio/CharBuffer.java, + * classpath/java/nio/CharBufferImpl.java, + * classpath/java/nio/CharSequenceBuffer.java, + * classpath/java/nio/CharViewBufferImpl.java, + * classpath/java/nio/DirectByteBufferImpl.java, + * classpath/java/nio/DoubleBuffer.java, + * classpath/java/nio/DoubleBufferImpl.java, + * classpath/java/nio/DoubleViewBufferImpl.java, + * classpath/java/nio/FloatBuffer.java, + * classpath/java/nio/FloatBufferImpl.java, + * classpath/java/nio/FloatViewBufferImpl.java, + * classpath/java/nio/IntBuffer.java, + * classpath/java/nio/IntBufferImpl.java, + * classpath/java/nio/IntViewBufferImpl.java, + * classpath/java/nio/LongBuffer.java, + * classpath/java/nio/LongBufferImpl.java, + * classpath/java/nio/LongViewBufferImpl.java, + * classpath/java/nio/MappedByteBuffer.java, + * classpath/java/nio/MappedByteBufferImpl.java, + * classpath/java/nio/ShortBuffer.java, + * classpath/java/nio/ShortBufferImpl.java, + * classpath/java/nio/ShortViewBufferImpl.java: + Replace use of gnu.classpath.Pointer with gnu.gcj.RawData, + and fix some formatting issues. + * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaLexer.java, + * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaLexer.smap, + * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaRecognizer.java, + * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaRecognizer.smap, + * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaTokenTypes.java, + * classpath/tools/gnu/classpath/tools/gjdoc/expr/JavaTokenTypes.txt: + Regenerated (later version of antlr). + * java/nio/Buffer.h: Regenerated. + * java/nio/Buffer.java: Ported changes from Classpath. + * java/nio/ByteBuffer.h, + * java/nio/CharBuffer.h: Regenerated. + * java/nio/DirectByteBufferImpl.java: Ported changes from + Classpath. + * java/nio/DoubleBuffer.h, + * java/nio/FloatBuffer.h, + * java/nio/IntBuffer.h, + * java/nio/LongBuffer.h, + * java/nio/MappedByteBuffer.h, + * java/nio/MappedByteBufferImpl.h: Regenerated. + * java/nio/MappedByteBufferImpl.java: Ported changes from + Classpath. + * java/nio/ShortBuffer.h: Regenerated. + +2008-09-24 Matthias Klose + + * configure.ac: Search for antlr.jar, if not configured. + * configure: Regenerate. + +2008-09-24 Matthias Klose + + * Makefile.am: Build a gjdoc binary, if enabled. + * configure.ac: Add options --disable-gjdoc, --with-antlr-jar=file. + * Makefile.in, */Makefile.in, configure: Regenerate. + +2008-09-22 Andrew Haley + + * java/lang/String.java (toString(char[], int, int)): New method. + +2008-09-14 Matthias Klose + + Import GNU Classpath (libgcj-import-20080914). + + * Regenerate class and header files. + * Regenerate auto* files. + * configure.ac: Don't pass --disable-gjdoc to classpath. + * sources.am: Regenerated. + * HACKING: Mention to build gjdoc in maintainer builds. + * gnu/classpath/Configuration.java: Update classpath version. + * gcj/javaprims.h: Update. + +2008-09-08 Andrew John Hughes + + * Makefile.am: Replace natStringBuffer.cc + and natStringBuilder.cc with natAbstractStringBuffer.cc. + * Makefile.in: Regenerated. + * java/lang/AbstractStringBuffer.java: + (append(int)): Made native. + (regionMatches(int,String)): Likewise. + * java/lang/StringBuffer.h: Regenerated. + * java/lang/StringBuffer.java: Remerged with GNU Classpath. + * java/lang/StringBuilder.h: Regenerated. + * java/lang/StringBuilder.java: Remerged with GNU Classpath. + * java/lang/natAbstractStringBuffer.cc: Provide common + native methods for StringBuffer and StringBuilder. + * java/lang/natStringBuffer.cc, + * java/lang/natStringBuilder.cc: Removed. + +2008-09-04 Andrew John Hughes + + * Makefile.in, + * classpath/configure: Regenerated. + * gnu/gcj/util/natDebug.cc, + * gnu/gcj/xlib/natColormap.cc, + * gnu/gcj/xlib/natDisplay.cc, + * gnu/gcj/xlib/natDrawable.cc, + * gnu/gcj/xlib/natFont.cc, + * gnu/gcj/xlib/natWMSizeHints.cc, + * gnu/gcj/xlib/natWindow.cc, + * gnu/gcj/xlib/natXImage.cc: + Add :: prefix to namespaces. + * java/io/CharArrayWriter.h, + * java/lang/StringBuffer.h: + Regenerated using patched gjavah. + * java/lang/natStringBuffer.cc: + Fix naming of append(jint). + * java/sql/Timestamp.h: Regenerated + using patched gjavah. + * jni.cc: Rename p to functions + to match change in GNU Classpath. + * scripts/makemake.tcl: Switch + gnu.java.math to BC compilation. + * sources.am: Regenerated. + +2008-08-21 Andrew John Hughes + + * Makefile.in: Updated location of Configuration.java. + * classpath/lib/gnu/java/locale/LocaleData.class: Regenerated. + +2008-08-18 Andrew John Hughes + + * Makefile.in: Updated with new Java files. + * classpath/configure: Regenerated. + * classpath/tools/Makefile.am: Add missing + use of GJDOC_EX so --disable-gjdoc works. + * classpath/tools/Makefile.in: Regenerated. + +2008-08-15 Matthias Klose + + Import GNU Classpath (libgcj-import-20080811). + + * Regenerate class and header files. + * Regenerate auto* files. + * configure.ac: Don't pass --with-fastjar to classpath, substitute new + dummy value in classpath/gnu/classpath/Configuration.java.in, pass + --disable-gjdoc to classpath. + * scripts/makemake.tcl: + * sources.am: Regenerated. + * java/lang/AbstractStringBuffer.java, gnu/java/lang/VMCPStringBuilder.java: + New, copied from classpath, use System instead of VMSystem. + * java/lang/StringBuffer.java: Merge from classpath. + * java/lang/ClassLoader.java: Merge from classpath. + * gcj/javaprims.h: Update class definitions, + remove _Jv_jobjectRefType, jobjectRefType definitions. + 2008-09-30 Andreas Tobler * testsuite/lib/libjava.exp (libjava_arguments): Do not append diff --git a/libjava/HACKING b/libjava/HACKING index e6a0f4c48f5..ba85b697be2 100644 --- a/libjava/HACKING +++ b/libjava/HACKING @@ -111,7 +111,8 @@ To import a new release: | xargs -r rm -f - Build, fix, till everything works. Be sure to build all peers (--enable-java-awt=gtk,xlib,qt - --enable-gconf-peer --enable-gstreamer-peer) + --enable-gconf-peer --enable-gstreamer-peer). + Be sure to build gjdoc (--enable-gjdoc). Be sure to update gnu/classpath/Configuration.java to reflect the new version Possibly update the gcj/javaprims.h file with scripts/classes.pl diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 9b778f543b2..82cc63e3a81 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -82,6 +82,9 @@ if NATIVE bin_PROGRAMS = jv-convert gij grmic grmiregistry gcj-dbtool \ gappletviewer gjarsigner gkeytool gjar gcjh gjavah gnative2ascii \ gorbd grmid gserialver gtnameserv gc-analyze +if CREATE_GJDOC +bin_PROGRAMS += gjdoc +endif ## It is convenient to actually build and install the default database ## when gcj-dbtool is available. @@ -1013,6 +1016,16 @@ grmiregistry_LINK = $(GCJLINK) grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la grmiregistry_DEPENDENCIES = libgcj-tools.la +## This is a dummy definition. +gjdoc_SOURCES = +gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \ + -Djava.class.path=$(ANTLR_JAR) \ + -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) +gjdoc_LINK = $(GCJLINK) +## See jv_convert_LDADD. +gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la +gjdoc_DEPENDENCIES = libgcj-tools.la + ## ################################################################ if INTERPRETER nat_jdwp_source_files = \ @@ -1082,8 +1095,7 @@ java/lang/natMath.cc \ java/lang/natObject.cc \ java/lang/natRuntime.cc \ java/lang/natString.cc \ -java/lang/natStringBuffer.cc \ -java/lang/natStringBuilder.cc \ +java/lang/natAbstractStringBuffer.cc \ java/lang/natSystem.cc \ java/lang/natThread.cc \ java/lang/natThreadLocal.cc \ diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 92ae4865af1..a803fedb590 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -51,20 +51,22 @@ target_triplet = @target@ @NATIVE_TRUE@ gjar$(EXEEXT) gcjh$(EXEEXT) gjavah$(EXEEXT) \ @NATIVE_TRUE@ gnative2ascii$(EXEEXT) gorbd$(EXEEXT) \ @NATIVE_TRUE@ grmid$(EXEEXT) gserialver$(EXEEXT) \ -@NATIVE_TRUE@ gtnameserv$(EXEEXT) gc-analyze$(EXEEXT) -@INSTALL_AOT_RPM_TRUE@am__append_5 = contrib/aot-compile-rpm +@NATIVE_TRUE@ gtnameserv$(EXEEXT) gc-analyze$(EXEEXT) \ +@NATIVE_TRUE@ $(am__EXEEXT_1) +@CREATE_GJDOC_TRUE@@NATIVE_TRUE@am__append_5 = gjdoc +@INSTALL_AOT_RPM_TRUE@am__append_6 = contrib/aot-compile-rpm @BUILD_ECJ1_TRUE@libexecsub_PROGRAMS = ecjx$(EXEEXT) -@ANONVERSCRIPT_TRUE@am__append_6 = -Wl,--version-script=$(srcdir)/libgcj.ver -@USING_GCC_TRUE@am__append_7 = $(WARNINGS) -@USING_BOEHMGC_TRUE@am__append_8 = boehm.cc -@USING_NOGC_TRUE@am__append_9 = nogc.cc -@USING_POSIX_PLATFORM_TRUE@am__append_10 = posix.cc -@USING_WIN32_PLATFORM_TRUE@am__append_11 = win32.cc -@USING_DARWIN_CRT_TRUE@am__append_12 = darwin.cc -@USING_POSIX_THREADS_TRUE@am__append_13 = posix-threads.cc -@USING_WIN32_THREADS_TRUE@am__append_14 = win32-threads.cc -@USING_NO_THREADS_TRUE@am__append_15 = no-threads.cc -@ANONVERSCRIPT_TRUE@am__append_16 = $(srcdir)/libgcj.ver +@ANONVERSCRIPT_TRUE@am__append_7 = -Wl,--version-script=$(srcdir)/libgcj.ver +@USING_GCC_TRUE@am__append_8 = $(WARNINGS) +@USING_BOEHMGC_TRUE@am__append_9 = boehm.cc +@USING_NOGC_TRUE@am__append_10 = nogc.cc +@USING_POSIX_PLATFORM_TRUE@am__append_11 = posix.cc +@USING_WIN32_PLATFORM_TRUE@am__append_12 = win32.cc +@USING_DARWIN_CRT_TRUE@am__append_13 = darwin.cc +@USING_POSIX_THREADS_TRUE@am__append_14 = posix-threads.cc +@USING_WIN32_THREADS_TRUE@am__append_15 = win32-threads.cc +@USING_NO_THREADS_TRUE@am__append_16 = no-threads.cc +@ANONVERSCRIPT_TRUE@am__append_17 = $(srcdir)/libgcj.ver DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \ $(srcdir)/../config.guess $(srcdir)/../config.sub \ $(srcdir)/../depcomp $(srcdir)/../install-sh \ @@ -80,8 +82,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \ $(top_srcdir)/scripts/jar.in COPYING ChangeLog NEWS THANKS @MAINTAINER_MODE_TRUE@@NATIVE_TRUE@noinst_PROGRAMS = \ @MAINTAINER_MODE_TRUE@@NATIVE_TRUE@ gen-from-JIS$(EXEEXT) -@NATIVE_TRUE@@USE_LIBGCJ_BC_TRUE@am__append_17 = libgcj_bc.la -@XLIB_AWT_TRUE@am__append_18 = $(xlib_nat_headers) +@NATIVE_TRUE@@USE_LIBGCJ_BC_TRUE@am__append_18 = libgcj_bc.la +@XLIB_AWT_TRUE@am__append_19 = $(xlib_nat_headers) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \ @@ -183,14 +185,14 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \ gnu/java/awt/java2d.lo gnu/java/awt/peer.lo \ gnu/java/awt/peer/headless.lo gnu/java/awt/print.lo \ gnu/java/io.lo gnu/java/lang.lo gnu/java/lang/reflect.lo \ - gnu/java/locale.lo gnu/java/math.lo gnu/java/net.lo \ - gnu/java/net/loader.lo gnu/java/net/local.lo \ - gnu/java/net/protocol/core.lo gnu/java/net/protocol/file.lo \ - gnu/java/net/protocol/ftp.lo gnu/java/net/protocol/gcjlib.lo \ - gnu/java/net/protocol/http.lo gnu/java/net/protocol/https.lo \ - gnu/java/net/protocol/jar.lo gnu/java/nio.lo \ - gnu/java/nio/channels.lo gnu/java/nio/charset.lo \ - gnu/java/rmi.lo gnu/java/rmi/activation.lo gnu/java/rmi/dgc.lo \ + gnu/java/locale.lo gnu/java/net.lo gnu/java/net/loader.lo \ + gnu/java/net/local.lo gnu/java/net/protocol/core.lo \ + gnu/java/net/protocol/file.lo gnu/java/net/protocol/ftp.lo \ + gnu/java/net/protocol/gcjlib.lo gnu/java/net/protocol/http.lo \ + gnu/java/net/protocol/https.lo gnu/java/net/protocol/jar.lo \ + gnu/java/nio.lo gnu/java/nio/channels.lo \ + gnu/java/nio/charset.lo gnu/java/rmi.lo \ + gnu/java/rmi/activation.lo gnu/java/rmi/dgc.lo \ gnu/java/rmi/registry.lo gnu/java/rmi/server.lo \ gnu/java/security.lo gnu/java/security/action.lo \ gnu/java/security/ber.lo gnu/java/security/der.lo \ @@ -204,18 +206,18 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \ gnu/java/security/x509.lo gnu/java/security/x509/ext.lo \ gnu/java/text.lo gnu/java/util.lo gnu/java/util/jar.lo \ gnu/java/util/prefs.lo gnu/java/util/regex.lo \ - gnu/javax/crypto.lo gnu/javax/crypto/assembly.lo \ - gnu/javax/crypto/cipher.lo gnu/javax/crypto/jce.lo \ - gnu/javax/crypto/jce/cipher.lo gnu/javax/crypto/jce/key.lo \ - gnu/javax/crypto/jce/keyring.lo gnu/javax/crypto/jce/mac.lo \ - gnu/javax/crypto/jce/params.lo gnu/javax/crypto/jce/prng.lo \ - gnu/javax/crypto/jce/sig.lo gnu/javax/crypto/jce/spec.lo \ - gnu/javax/crypto/key.lo gnu/javax/crypto/key/dh.lo \ - gnu/javax/crypto/key/srp6.lo gnu/javax/crypto/keyring.lo \ - gnu/javax/crypto/kwa.lo gnu/javax/crypto/mac.lo \ - gnu/javax/crypto/mode.lo gnu/javax/crypto/pad.lo \ - gnu/javax/crypto/prng.lo gnu/javax/crypto/sasl.lo \ - gnu/javax/crypto/sasl/anonymous.lo \ + gnu/javax/activation/viewers.lo gnu/javax/crypto.lo \ + gnu/javax/crypto/assembly.lo gnu/javax/crypto/cipher.lo \ + gnu/javax/crypto/jce.lo gnu/javax/crypto/jce/cipher.lo \ + gnu/javax/crypto/jce/key.lo gnu/javax/crypto/jce/keyring.lo \ + gnu/javax/crypto/jce/mac.lo gnu/javax/crypto/jce/params.lo \ + gnu/javax/crypto/jce/prng.lo gnu/javax/crypto/jce/sig.lo \ + gnu/javax/crypto/jce/spec.lo gnu/javax/crypto/key.lo \ + gnu/javax/crypto/key/dh.lo gnu/javax/crypto/key/srp6.lo \ + gnu/javax/crypto/keyring.lo gnu/javax/crypto/kwa.lo \ + gnu/javax/crypto/mac.lo gnu/javax/crypto/mode.lo \ + gnu/javax/crypto/pad.lo gnu/javax/crypto/prng.lo \ + gnu/javax/crypto/sasl.lo gnu/javax/crypto/sasl/anonymous.lo \ gnu/javax/crypto/sasl/crammd5.lo \ gnu/javax/crypto/sasl/plain.lo gnu/javax/crypto/sasl/srp.lo \ gnu/javax/imageio.lo gnu/javax/imageio/bmp.lo \ @@ -263,16 +265,17 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \ java/util/concurrent/atomic.lo java/util/concurrent/locks.lo \ java/util/jar.lo java/util/logging.lo java/util/prefs.lo \ java/util/regex.lo java/util/spi.lo java/util/zip.lo \ - javax/accessibility.lo javax/activity.lo javax/crypto.lo \ - javax/crypto/interfaces.lo javax/crypto/spec.lo \ - javax/management.lo javax/management/loading.lo \ - javax/management/openmbean.lo javax/management/remote.lo \ - javax/management/remote/rmi.lo javax/naming.lo \ - javax/naming/directory.lo javax/naming/event.lo \ - javax/naming/ldap.lo javax/naming/spi.lo javax/net.lo \ - javax/net/ssl.lo javax/print.lo javax/print/attribute.lo \ - javax/print/attribute/standard.lo javax/print/event.lo \ - javax/security/auth.lo javax/security/auth/callback.lo \ + javax/accessibility.lo javax/activation.lo javax/activity.lo \ + javax/crypto.lo javax/crypto/interfaces.lo \ + javax/crypto/spec.lo javax/management.lo \ + javax/management/loading.lo javax/management/openmbean.lo \ + javax/management/remote.lo javax/management/remote/rmi.lo \ + javax/naming.lo javax/naming/directory.lo \ + javax/naming/event.lo javax/naming/ldap.lo javax/naming/spi.lo \ + javax/net.lo javax/net/ssl.lo javax/print.lo \ + javax/print/attribute.lo javax/print/attribute/standard.lo \ + javax/print/event.lo javax/security/auth.lo \ + javax/security/auth/callback.lo \ javax/security/auth/kerberos.lo javax/security/auth/login.lo \ javax/security/auth/spi.lo javax/security/auth/x500.lo \ javax/security/cert.lo javax/security/sasl.lo \ @@ -292,7 +295,7 @@ am__DEPENDENCIES_2 = gnu/awt.lo gnu/awt/j2d.lo gnu/classpath.lo \ sun/reflect/misc.lo $(am__DEPENDENCIES_1) am__DEPENDENCIES_3 = gnu-CORBA.lo gnu-java-awt-dnd-peer-gtk.lo \ gnu-java-awt-peer-gtk.lo gnu-java-awt-peer-swing.lo \ - gnu-java-beans.lo gnu-java-lang-management.lo \ + gnu-java-beans.lo gnu-java-lang-management.lo gnu-java-math.lo \ gnu-java-util-prefs-gconf.lo gnu-javax-management.lo \ gnu-javax-rmi.lo gnu-javax-sound-midi.lo gnu-xml-aelfred2.lo \ gnu-xml-dom.lo gnu-xml-libxmlj.lo gnu-xml-pipeline.lo \ @@ -352,12 +355,11 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc \ java/lang/natConcreteProcess.cc java/lang/natVMDouble.cc \ java/lang/natVMFloat.cc java/lang/natMath.cc \ java/lang/natObject.cc java/lang/natRuntime.cc \ - java/lang/natString.cc java/lang/natStringBuffer.cc \ - java/lang/natStringBuilder.cc java/lang/natSystem.cc \ - java/lang/natThread.cc java/lang/natThreadLocal.cc \ - java/lang/natVMClassLoader.cc java/lang/natVMProcess.cc \ - java/lang/natVMThrowable.cc java/lang/ref/natReference.cc \ - java/lang/reflect/natArray.cc \ + java/lang/natString.cc java/lang/natAbstractStringBuffer.cc \ + java/lang/natSystem.cc java/lang/natThread.cc \ + java/lang/natThreadLocal.cc java/lang/natVMClassLoader.cc \ + java/lang/natVMProcess.cc java/lang/natVMThrowable.cc \ + java/lang/ref/natReference.cc java/lang/reflect/natArray.cc \ java/lang/reflect/natConstructor.cc \ java/lang/reflect/natField.cc java/lang/reflect/natMethod.cc \ java/lang/reflect/natVMProxy.cc java/net/natVMInetAddress.cc \ @@ -417,12 +419,11 @@ am__objects_5 = $(am__objects_3) gnu/classpath/natConfiguration.lo \ java/lang/natConcreteProcess.lo java/lang/natVMDouble.lo \ java/lang/natVMFloat.lo java/lang/natMath.lo \ java/lang/natObject.lo java/lang/natRuntime.lo \ - java/lang/natString.lo java/lang/natStringBuffer.lo \ - java/lang/natStringBuilder.lo java/lang/natSystem.lo \ - java/lang/natThread.lo java/lang/natThreadLocal.lo \ - java/lang/natVMClassLoader.lo java/lang/natVMProcess.lo \ - java/lang/natVMThrowable.lo java/lang/ref/natReference.lo \ - java/lang/reflect/natArray.lo \ + java/lang/natString.lo java/lang/natAbstractStringBuffer.lo \ + java/lang/natSystem.lo java/lang/natThread.lo \ + java/lang/natThreadLocal.lo java/lang/natVMClassLoader.lo \ + java/lang/natVMProcess.lo java/lang/natVMThrowable.lo \ + java/lang/ref/natReference.lo java/lang/reflect/natArray.lo \ java/lang/reflect/natConstructor.lo \ java/lang/reflect/natField.lo java/lang/reflect/natMethod.lo \ java/lang/reflect/natVMProxy.lo java/net/natVMInetAddress.lo \ @@ -457,6 +458,7 @@ am_libgij_la_OBJECTS = gij.lo libgij_la_OBJECTS = $(am_libgij_la_OBJECTS) am_libjvm_la_OBJECTS = jni-libjvm.lo libjvm_la_OBJECTS = $(am_libjvm_la_OBJECTS) +@CREATE_GJDOC_TRUE@@NATIVE_TRUE@am__EXEEXT_1 = gjdoc$(EXEEXT) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) libexecsubPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) $(libexecsub_PROGRAMS) $(noinst_PROGRAMS) @@ -484,6 +486,8 @@ am_gjarsigner_OBJECTS = gjarsigner_OBJECTS = $(am_gjarsigner_OBJECTS) am_gjavah_OBJECTS = gjavah_OBJECTS = $(am_gjavah_OBJECTS) +am_gjdoc_OBJECTS = +gjdoc_OBJECTS = $(am_gjdoc_OBJECTS) am_gkeytool_OBJECTS = gkeytool_OBJECTS = $(am_gkeytool_OBJECTS) am_gnative2ascii_OBJECTS = @@ -533,10 +537,11 @@ SOURCES = $(lib_gnu_awt_xlib_la_SOURCES) $(libgcj_tools_la_SOURCES) \ $(libjvm_la_SOURCES) $(ecjx_SOURCES) $(gappletviewer_SOURCES) \ $(gc_analyze_SOURCES) $(gcj_dbtool_SOURCES) $(gcjh_SOURCES) \ $(gen_from_JIS_SOURCES) $(gij_SOURCES) $(gjar_SOURCES) \ - $(gjarsigner_SOURCES) $(gjavah_SOURCES) $(gkeytool_SOURCES) \ - $(gnative2ascii_SOURCES) $(gorbd_SOURCES) $(grmic_SOURCES) \ - $(grmid_SOURCES) $(grmiregistry_SOURCES) $(gserialver_SOURCES) \ - $(gtnameserv_SOURCES) $(jv_convert_SOURCES) + $(gjarsigner_SOURCES) $(gjavah_SOURCES) $(gjdoc_SOURCES) \ + $(gkeytool_SOURCES) $(gnative2ascii_SOURCES) $(gorbd_SOURCES) \ + $(grmic_SOURCES) $(grmid_SOURCES) $(grmiregistry_SOURCES) \ + $(gserialver_SOURCES) $(gtnameserv_SOURCES) \ + $(jv_convert_SOURCES) DIST_SOURCES = $(lib_gnu_awt_xlib_la_SOURCES) \ $(libgcj_tools_la_SOURCES) $(am__libgcj_la_SOURCES_DIST) \ $(EXTRA_libgcj_la_SOURCES) $(libgcj_bc_la_SOURCES) \ @@ -545,10 +550,10 @@ DIST_SOURCES = $(lib_gnu_awt_xlib_la_SOURCES) \ $(gcj_dbtool_SOURCES) $(gcjh_SOURCES) \ $(am__gen_from_JIS_SOURCES_DIST) $(gij_SOURCES) \ $(gjar_SOURCES) $(gjarsigner_SOURCES) $(gjavah_SOURCES) \ - $(gkeytool_SOURCES) $(gnative2ascii_SOURCES) $(gorbd_SOURCES) \ - $(grmic_SOURCES) $(grmid_SOURCES) $(grmiregistry_SOURCES) \ - $(gserialver_SOURCES) $(gtnameserv_SOURCES) \ - $(jv_convert_SOURCES) + $(gjdoc_SOURCES) $(gkeytool_SOURCES) $(gnative2ascii_SOURCES) \ + $(gorbd_SOURCES) $(grmic_SOURCES) $(grmid_SOURCES) \ + $(grmiregistry_SOURCES) $(gserialver_SOURCES) \ + $(gtnameserv_SOURCES) $(jv_convert_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ @@ -579,6 +584,7 @@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ ANONVERSCRIPT_FALSE = @ANONVERSCRIPT_FALSE@ ANONVERSCRIPT_TRUE = @ANONVERSCRIPT_TRUE@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ @@ -599,6 +605,8 @@ CLASSPATH_SEPARATOR = @CLASSPATH_SEPARATOR@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPU = @CPU@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ CREATE_JAVA_HOME_FALSE = @CREATE_JAVA_HOME_FALSE@ CREATE_JAVA_HOME_TRUE = @CREATE_JAVA_HOME_TRUE@ CXX = @CXX@ @@ -821,7 +829,7 @@ dbexecdir = @dbexecdir@ exec_prefix = @exec_prefix@ extra_gij_ldflags = @extra_gij_ldflags@ extra_ldflags = @extra_ldflags@ -extra_ldflags_libjava = @extra_ldflags_libjava@ $(am__append_6) +extra_ldflags_libjava = @extra_ldflags_libjava@ $(am__append_7) gcc_suffix = @gcc_suffix@ gcjsubdir = @gcjsubdir@ gxx_include_dir = @gxx_include_dir@ @@ -909,7 +917,7 @@ db_name = classmap.db db_pathtail = $(gcjsubdir)/$(db_name) @NATIVE_TRUE@dbexec_DATA = $(db_name) bin_SCRIPTS = addr2name.awk contrib/rebuild-gcj-db contrib/aot-compile \ - $(am__append_5) + $(am__append_6) GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated GCJLINK = $(LIBTOOL) --tag=GCJ --mode=link $(GCJ) -L$(here) $(JC1FLAGS) \ $(LDFLAGS) -o $@ @@ -947,7 +955,7 @@ AM_GCJFLAGS = \ --encoding=UTF-8 \ -Wno-deprecated -fbootstrap-classes -AM_CFLAGS = @LIBGCJ_CFLAGS@ $(am__append_7) +AM_CFLAGS = @LIBGCJ_CFLAGS@ $(am__append_8) @SUPPRESS_LIBGCJ_BC_FALSE@LIBGCJ_BC_FLAGS = -findirect-dispatch -fno-indirect-classes @SUPPRESS_LIBGCJ_BC_TRUE@LIBGCJ_BC_FLAGS = @BUILD_LIBGCJ_REDUCED_REFLECTION_FALSE@LIBGCJ_REDUCED_REFLECTION_FLAGS = @@ -974,9 +982,9 @@ libgij_la_LDFLAGS = -rpath $(toolexeclibdir) \ @INTERPRETER_TRUE@libgcj_interpret_source_files = jvmti.cc interpret.cc libgcj_la_SOURCES = prims.cc jni.cc exception.cc stacktrace.cc link.cc \ defineclass.cc verify.cc $(libgcj_interpret_source_files) \ - $(nat_source_files) $(am__append_8) $(am__append_9) \ - $(am__append_10) $(am__append_11) $(am__append_12) \ - $(am__append_13) $(am__append_14) $(am__append_15) + $(nat_source_files) $(am__append_9) $(am__append_10) \ + $(am__append_11) $(am__append_12) $(am__append_13) \ + $(am__append_14) $(am__append_15) $(am__append_16) nat_files = $(nat_source_files:.cc=.lo) xlib_nat_files = $(xlib_nat_source_files:.cc=.lo) @@ -1000,7 +1008,7 @@ libgcj_la_LIBADD = \ libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar java/lang/Object.lo \ java/lang/Class.lo java/process-$(PLATFORM).lo \ $(all_packages_source_files:.list=.lo) $(LIBLTDL) \ - $(libgcj_la_LIBADD) $(am__append_16) + $(libgcj_la_LIBADD) $(am__append_17) libgcj_la_LINK = $(LIBLINK) EXTRA_libgcj_la_SOURCES = java/lang/Object.java libgcj_tools_la_SOURCES = classpath/tools/tools.zip @@ -1239,7 +1247,7 @@ gnu/awt/xlib/XToolkit.java gnu_awt_xlib_header_files = $(patsubst %.java,%.h,$(gnu_awt_xlib_source_files)) gnu_classpath_source_files = \ -gnu/classpath/Configuration.java \ +classpath/gnu/classpath/Configuration.java \ classpath/gnu/classpath/NotImplementedException.java \ classpath/gnu/classpath/Pair.java \ classpath/gnu/classpath/Pointer.java \ @@ -1870,10 +1878,12 @@ classpath/gnu/java/io/PlatformHelper.java gnu_java_io_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_io_source_files))) gnu_java_lang_source_files = \ classpath/gnu/java/lang/ArrayHelper.java \ +classpath/gnu/java/lang/CPStringBuilder.java \ classpath/gnu/java/lang/CharData.java \ classpath/gnu/java/lang/ClassHelper.java \ classpath/gnu/java/lang/InstrumentationImpl.java \ gnu/java/lang/MainThread.java \ +gnu/java/lang/VMCPStringBuilder.java \ gnu/java/lang/VMInstrumentationImpl.java gnu_java_lang_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_lang_source_files))) @@ -1915,9 +1925,9 @@ classpath/gnu/java/locale/LocaleHelper.java gnu_java_locale_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_locale_source_files))) gnu_java_math_source_files = \ classpath/gnu/java/math/Fixed.java \ +classpath/gnu/java/math/GMP.java \ classpath/gnu/java/math/MPN.java -gnu_java_math_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_math_source_files))) gnu_java_net_source_files = \ classpath/gnu/java/net/CRLFInputStream.java \ classpath/gnu/java/net/CRLFOutputStream.java \ @@ -2420,7 +2430,6 @@ classpath/gnu/java/util/jar/JarUtils.java gnu_java_util_jar_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_util_jar_source_files))) gnu_java_util_prefs_source_files = \ -classpath/gnu/java/util/prefs/EventDispatcher.java \ classpath/gnu/java/util/prefs/FileBasedFactory.java \ classpath/gnu/java/util/prefs/FileBasedPreferences.java \ classpath/gnu/java/util/prefs/GConfBasedFactory.java \ @@ -2468,6 +2477,12 @@ classpath/gnu/java/util/regex/RETokenWordBoundary.java \ classpath/gnu/java/util/regex/UncheckedRE.java gnu_java_util_regex_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_java_util_regex_source_files))) +gnu_javax_activation_viewers_source_files = \ +classpath/gnu/javax/activation/viewers/ImageViewer.java \ +classpath/gnu/javax/activation/viewers/TextEditor.java \ +classpath/gnu/javax/activation/viewers/TextViewer.java + +gnu_javax_activation_viewers_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(gnu_javax_activation_viewers_source_files))) gnu_javax_crypto_source_files = \ classpath/gnu/javax/crypto/RSACipherImpl.java @@ -4228,6 +4243,7 @@ classpath/java/io/Writer.java java_io_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(java_io_source_files))) java_lang_source_files = \ classpath/java/lang/AbstractMethodError.java \ +java/lang/AbstractStringBuffer.java \ classpath/java/lang/Appendable.java \ classpath/java/lang/ArithmeticException.java \ classpath/java/lang/ArrayIndexOutOfBoundsException.java \ @@ -4311,6 +4327,7 @@ java/lang/Thread.java \ classpath/java/lang/ThreadDeath.java \ classpath/java/lang/ThreadGroup.java \ java/lang/ThreadLocal.java \ +classpath/java/lang/ThreadLocalMap.java \ classpath/java/lang/Throwable.java \ classpath/java/lang/TypeNotPresentException.java \ classpath/java/lang/UnknownError.java \ @@ -4949,6 +4966,7 @@ classpath/external/jsr166/java/util/Queue.java \ classpath/java/util/Random.java \ classpath/java/util/RandomAccess.java \ classpath/java/util/ResourceBundle.java \ +classpath/java/util/Scanner.java \ classpath/java/util/ServiceConfigurationError.java \ classpath/java/util/ServiceLoader.java \ classpath/java/util/Set.java \ @@ -5152,6 +5170,29 @@ classpath/javax/accessibility/AccessibleTextSequence.java \ classpath/javax/accessibility/AccessibleValue.java javax_accessibility_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_accessibility_source_files))) +javax_activation_source_files = \ +classpath/javax/activation/ActivationDataFlavor.java \ +classpath/javax/activation/CommandInfo.java \ +classpath/javax/activation/CommandMap.java \ +classpath/javax/activation/CommandObject.java \ +classpath/javax/activation/DataContentHandler.java \ +classpath/javax/activation/DataContentHandlerFactory.java \ +classpath/javax/activation/DataHandler.java \ +classpath/javax/activation/DataHandlerDataSource.java \ +classpath/javax/activation/DataSource.java \ +classpath/javax/activation/DataSourceDataContentHandler.java \ +classpath/javax/activation/FileDataSource.java \ +classpath/javax/activation/FileTypeMap.java \ +classpath/javax/activation/MailcapCommandMap.java \ +classpath/javax/activation/MimeType.java \ +classpath/javax/activation/MimeTypeParameterList.java \ +classpath/javax/activation/MimeTypeParseException.java \ +classpath/javax/activation/MimetypesFileTypeMap.java \ +classpath/javax/activation/ObjectDataContentHandler.java \ +classpath/javax/activation/URLDataSource.java \ +classpath/javax/activation/UnsupportedDataTypeException.java + +javax_activation_header_files = $(patsubst classpath/%,%,$(patsubst %.java,%.h,$(javax_activation_source_files))) javax_activity_source_files = \ classpath/javax/activity/ActivityCompletedException.java \ classpath/javax/activity/ActivityRequiredException.java \ @@ -7362,7 +7403,6 @@ all_packages_source_files = \ gnu/java/lang.list \ gnu/java/lang/reflect.list \ gnu/java/locale.list \ - gnu/java/math.list \ gnu/java/net.list \ gnu/java/net/loader.list \ gnu/java/net/local.list \ @@ -7406,6 +7446,7 @@ all_packages_source_files = \ gnu/java/util/jar.list \ gnu/java/util/prefs.list \ gnu/java/util/regex.list \ + gnu/javax/activation/viewers.list \ gnu/javax/crypto.list \ gnu/javax/crypto/assembly.list \ gnu/javax/crypto/cipher.list \ @@ -7524,6 +7565,7 @@ all_packages_source_files = \ java/util/spi.list \ java/util/zip.list \ javax/accessibility.list \ + javax/activation.list \ javax/activity.list \ javax/crypto.list \ javax/crypto/interfaces.list \ @@ -7614,7 +7656,6 @@ ordinary_header_files = \ $(gnu_java_lang_management_header_files) \ $(gnu_java_lang_reflect_header_files) \ $(gnu_java_locale_header_files) \ - $(gnu_java_math_header_files) \ $(gnu_java_net_header_files) \ $(gnu_java_net_loader_header_files) \ $(gnu_java_net_local_header_files) \ @@ -7658,6 +7699,7 @@ ordinary_header_files = \ $(gnu_java_util_jar_header_files) \ $(gnu_java_util_prefs_header_files) \ $(gnu_java_util_regex_header_files) \ + $(gnu_javax_activation_viewers_header_files) \ $(gnu_javax_crypto_header_files) \ $(gnu_javax_crypto_assembly_header_files) \ $(gnu_javax_crypto_cipher_header_files) \ @@ -7771,6 +7813,7 @@ ordinary_header_files = \ $(java_util_spi_header_files) \ $(java_util_zip_header_files) \ $(javax_accessibility_header_files) \ + $(javax_activation_header_files) \ $(javax_activity_header_files) \ $(javax_crypto_header_files) \ $(javax_crypto_interfaces_header_files) \ @@ -7839,6 +7882,7 @@ bc_objects = \ gnu-java-awt-peer-swing.lo \ gnu-java-beans.lo \ gnu-java-lang-management.lo \ + gnu-java-math.lo \ gnu-java-util-prefs-gconf.lo \ gnu-javax-management.lo \ gnu-javax-rmi.lo \ @@ -7883,7 +7927,9 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_aa_ER_SAAHO.properties \ classpath/resource/gnu/java/locale/LocaleInformation_aa_ET.properties \ classpath/resource/gnu/java/locale/LocaleInformation_af.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_af_NA.properties \ classpath/resource/gnu/java/locale/LocaleInformation_af_ZA.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ak.properties \ classpath/resource/gnu/java/locale/LocaleInformation_am.properties \ classpath/resource/gnu/java/locale/LocaleInformation_am_ET.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ar.properties \ @@ -7906,11 +7952,14 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_bg_BG.properties \ classpath/resource/gnu/java/locale/LocaleInformation_bn.properties \ classpath/resource/gnu/java/locale/LocaleInformation_bn_IN.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_bo.properties \ classpath/resource/gnu/java/locale/LocaleInformation_bs.properties \ classpath/resource/gnu/java/locale/LocaleInformation_byn.properties \ classpath/resource/gnu/java/locale/LocaleInformation_byn_ER.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ca.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ca_ES.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_cch.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_cop.properties \ classpath/resource/gnu/java/locale/LocaleInformation_cs.properties \ classpath/resource/gnu/java/locale/LocaleInformation_cs_CZ.properties \ classpath/resource/gnu/java/locale/LocaleInformation_cy.properties \ @@ -7928,6 +7977,7 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_dv_MV.properties \ classpath/resource/gnu/java/locale/LocaleInformation_dz.properties \ classpath/resource/gnu/java/locale/LocaleInformation_dz_BT.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ee.properties \ classpath/resource/gnu/java/locale/LocaleInformation_el.properties \ classpath/resource/gnu/java/locale/LocaleInformation_el_CY.properties \ classpath/resource/gnu/java/locale/LocaleInformation_el_GR.properties \ @@ -7938,18 +7988,23 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_en_BW.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_BZ.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_CA.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_en_Dsrt.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_GB.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_GU.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_HK.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_IE.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_IN.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_en_JM.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_MH.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_MP.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_MT.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_en_NA.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_NZ.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_PH.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_PK.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_SG.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_en_Shaw.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_en_TT.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_UM.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_US.properties \ classpath/resource/gnu/java/locale/LocaleInformation_en_US_POSIX.properties \ @@ -7987,6 +8042,7 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_fa_IR.properties \ classpath/resource/gnu/java/locale/LocaleInformation_fi.properties \ classpath/resource/gnu/java/locale/LocaleInformation_fi_FI.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_fil.properties \ classpath/resource/gnu/java/locale/LocaleInformation_fo.properties \ classpath/resource/gnu/java/locale/LocaleInformation_fo_FO.properties \ classpath/resource/gnu/java/locale/LocaleInformation_fr.properties \ @@ -7994,8 +8050,10 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_fr_CA.properties \ classpath/resource/gnu/java/locale/LocaleInformation_fr_CH.properties \ classpath/resource/gnu/java/locale/LocaleInformation_fr_LU.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_fur.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ga.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ga_IE.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_gaa.properties \ classpath/resource/gnu/java/locale/LocaleInformation_gez.properties \ classpath/resource/gnu/java/locale/LocaleInformation_gez_ER.properties \ classpath/resource/gnu/java/locale/LocaleInformation_gez_ET.properties \ @@ -8005,6 +8063,8 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_gu_IN.properties \ classpath/resource/gnu/java/locale/LocaleInformation_gv.properties \ classpath/resource/gnu/java/locale/LocaleInformation_gv_GB.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ha.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ha_Arab.properties \ classpath/resource/gnu/java/locale/LocaleInformation_haw.properties \ classpath/resource/gnu/java/locale/LocaleInformation_haw_US.properties \ classpath/resource/gnu/java/locale/LocaleInformation_he.properties \ @@ -8017,8 +8077,11 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_hy.properties \ classpath/resource/gnu/java/locale/LocaleInformation_hy_AM.properties \ classpath/resource/gnu/java/locale/LocaleInformation_hy_AM_REVISED.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ia.properties \ classpath/resource/gnu/java/locale/LocaleInformation_id.properties \ classpath/resource/gnu/java/locale/LocaleInformation_id_ID.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ig.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ii.properties \ classpath/resource/gnu/java/locale/LocaleInformation_is.properties \ classpath/resource/gnu/java/locale/LocaleInformation_is_IS.properties \ classpath/resource/gnu/java/locale/LocaleInformation_it.properties \ @@ -8028,6 +8091,10 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_ja.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ja_JP.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ka.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_kaj.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_kam.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_kcg.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_kfo.properties \ classpath/resource/gnu/java/locale/LocaleInformation_kk.properties \ classpath/resource/gnu/java/locale/LocaleInformation_kk_KZ.properties \ classpath/resource/gnu/java/locale/LocaleInformation_kl.properties \ @@ -8040,9 +8107,14 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_ko_KR.properties \ classpath/resource/gnu/java/locale/LocaleInformation_kok.properties \ classpath/resource/gnu/java/locale/LocaleInformation_kok_IN.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_kpe.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ku.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ku_Arab.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ku_Latn.properties \ classpath/resource/gnu/java/locale/LocaleInformation_kw.properties \ classpath/resource/gnu/java/locale/LocaleInformation_kw_GB.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ky.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ln.properties \ classpath/resource/gnu/java/locale/LocaleInformation_lo.properties \ classpath/resource/gnu/java/locale/LocaleInformation_lo_LA.properties \ classpath/resource/gnu/java/locale/LocaleInformation_lt.properties \ @@ -8060,19 +8132,25 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_ms_MY.properties \ classpath/resource/gnu/java/locale/LocaleInformation_mt.properties \ classpath/resource/gnu/java/locale/LocaleInformation_mt_MT.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_my.properties \ classpath/resource/gnu/java/locale/LocaleInformation_nb.properties \ classpath/resource/gnu/java/locale/LocaleInformation_nb_NO.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ne.properties \ classpath/resource/gnu/java/locale/LocaleInformation_nl.properties \ classpath/resource/gnu/java/locale/LocaleInformation_nl_BE.properties \ classpath/resource/gnu/java/locale/LocaleInformation_nl_NL.properties \ classpath/resource/gnu/java/locale/LocaleInformation_nn.properties \ classpath/resource/gnu/java/locale/LocaleInformation_nn_NO.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_nr.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_nso.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ny.properties \ classpath/resource/gnu/java/locale/LocaleInformation_om.properties \ classpath/resource/gnu/java/locale/LocaleInformation_om_ET.properties \ classpath/resource/gnu/java/locale/LocaleInformation_om_KE.properties \ classpath/resource/gnu/java/locale/LocaleInformation_or.properties \ classpath/resource/gnu/java/locale/LocaleInformation_or_IN.properties \ classpath/resource/gnu/java/locale/LocaleInformation_pa.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_pa_Arab.properties \ classpath/resource/gnu/java/locale/LocaleInformation_pa_IN.properties \ classpath/resource/gnu/java/locale/LocaleInformation_pl.properties \ classpath/resource/gnu/java/locale/LocaleInformation_pl_PL.properties \ @@ -8086,8 +8164,12 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_ru.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ru_RU.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ru_UA.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_rw.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sa.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sa_IN.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_se.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_se_FI.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_si.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sid.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sid_ET.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sk.properties \ @@ -8106,6 +8188,11 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_sr_BA_Latn.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sr_Cyrl.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sr_Latn.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_sr_ME_Latn.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_sr_RS_Latn.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ss.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ssy.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_st.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sv.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sv_FI.properties \ classpath/resource/gnu/java/locale/LocaleInformation_sv_SE.properties \ @@ -8118,6 +8205,7 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_ta_IN.properties \ classpath/resource/gnu/java/locale/LocaleInformation_te.properties \ classpath/resource/gnu/java/locale/LocaleInformation_te_IN.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_tg.properties \ classpath/resource/gnu/java/locale/LocaleInformation_th.properties \ classpath/resource/gnu/java/locale/LocaleInformation_th_TH.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ti.properties \ @@ -8125,20 +8213,30 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_ti_ET.properties \ classpath/resource/gnu/java/locale/LocaleInformation_tig.properties \ classpath/resource/gnu/java/locale/LocaleInformation_tig_ER.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_tn.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_to.properties \ classpath/resource/gnu/java/locale/LocaleInformation_tr.properties \ classpath/resource/gnu/java/locale/LocaleInformation_tr_TR.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_trv.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ts.properties \ classpath/resource/gnu/java/locale/LocaleInformation_tt.properties \ classpath/resource/gnu/java/locale/LocaleInformation_tt_RU.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ug.properties \ classpath/resource/gnu/java/locale/LocaleInformation_uk.properties \ classpath/resource/gnu/java/locale/LocaleInformation_uk_UA.properties \ classpath/resource/gnu/java/locale/LocaleInformation_ur.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ur_IN.properties \ classpath/resource/gnu/java/locale/LocaleInformation_uz.properties \ classpath/resource/gnu/java/locale/LocaleInformation_uz_AF_Arab.properties \ classpath/resource/gnu/java/locale/LocaleInformation_uz_Arab.properties \ classpath/resource/gnu/java/locale/LocaleInformation_uz_Latn.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_ve.properties \ classpath/resource/gnu/java/locale/LocaleInformation_vi.properties \ classpath/resource/gnu/java/locale/LocaleInformation_wal.properties \ classpath/resource/gnu/java/locale/LocaleInformation_wal_ET.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_wo.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_xh.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_yo.properties \ classpath/resource/gnu/java/locale/LocaleInformation_zh.properties \ classpath/resource/gnu/java/locale/LocaleInformation_zh_CN_Hans.properties \ classpath/resource/gnu/java/locale/LocaleInformation_zh_HK_Hant.properties \ @@ -8146,13 +8244,16 @@ property_files = \ classpath/resource/gnu/java/locale/LocaleInformation_zh_MO_Hant.properties \ classpath/resource/gnu/java/locale/LocaleInformation_zh_SG_Hans.properties \ classpath/resource/gnu/java/locale/LocaleInformation_zh_TW_Hant.properties \ + classpath/resource/gnu/java/locale/LocaleInformation_zu.properties \ classpath/resource/gnu/java/util/regex/MessagesBundle.properties \ classpath/resource/gnu/java/util/regex/MessagesBundle_fr.properties \ classpath/resource/gnu/java/util/regex/MessagesBundle_it.properties \ classpath/resource/gnu/javax/print/PrinterDialog.properties \ classpath/resource/gnu/javax/print/PrinterDialog_de.properties \ classpath/resource/gnu/javax/security/auth/callback/MessagesBundle.properties \ + classpath/resource/java/text/metazones.properties \ classpath/resource/java/util/iso4217.properties \ + classpath/resource/java/util/weeks.properties \ classpath/resource/javax/imageio/plugins/jpeg/MessagesBundle.properties \ classpath/resource/javax/swing/text/html/default.css \ classpath/resource/org/ietf/jgss/MessagesBundle.properties \ @@ -8244,7 +8345,7 @@ ECJX_BASE_FLAGS = -findirect-dispatch \ @NATIVE_TRUE@ecjx_LDADD = -L$(here)/.libs libgcj.la @NATIVE_FALSE@ecjx_DEPENDENCIES = @NATIVE_TRUE@ecjx_DEPENDENCIES = libgcj.la libgcj.spec \ -@NATIVE_TRUE@ $(am__append_17) +@NATIVE_TRUE@ $(am__append_18) gappletviewer_SOURCES = gappletviewer_LDFLAGS = --main=gnu.classpath.tools.appletviewer.Main \ -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) @@ -8336,6 +8437,14 @@ grmiregistry_LDFLAGS = --main=gnu.classpath.tools.rmiregistry.Main \ grmiregistry_LINK = $(GCJLINK) grmiregistry_LDADD = -L$(here)/.libs libgcj-tools.la grmiregistry_DEPENDENCIES = libgcj-tools.la +gjdoc_SOURCES = +gjdoc_LDFLAGS = --main=gnu.classpath.tools.gjdoc.Main \ + -Djava.class.path=$(ANTLR_JAR) \ + -rpath $(toolexeclibdir) -shared-libgcc $(THREADLDFLAGS) $(extra_ldflags) + +gjdoc_LINK = $(GCJLINK) +gjdoc_LDADD = -L$(here)/.libs libgcj-tools.la +gjdoc_DEPENDENCIES = libgcj-tools.la @INTERPRETER_FALSE@nat_jdwp_source_files = @INTERPRETER_TRUE@nat_jdwp_source_files = \ @INTERPRETER_TRUE@gnu/classpath/jdwp/natVMFrame.cc \ @@ -8401,8 +8510,7 @@ java/lang/natMath.cc \ java/lang/natObject.cc \ java/lang/natRuntime.cc \ java/lang/natString.cc \ -java/lang/natStringBuffer.cc \ -java/lang/natStringBuilder.cc \ +java/lang/natAbstractStringBuffer.cc \ java/lang/natSystem.cc \ java/lang/natThread.cc \ java/lang/natThreadLocal.cc \ @@ -8453,7 +8561,7 @@ gnu/gcj/xlib/natXImage.cc \ gnu/gcj/xlib/natXUnmapEvent.cc sourcesdir = $(jardir) -headers_to_make = $(nat_headers) $(am__append_18) +headers_to_make = $(nat_headers) $(am__append_19) # Work around what appears to be a GNU make bug handling MAKEFLAGS # values defined in terms of make variables, as is the case for CC and @@ -8919,9 +9027,7 @@ java/lang/natRuntime.lo: java/lang/$(am__dirstamp) \ java/lang/$(DEPDIR)/$(am__dirstamp) java/lang/natString.lo: java/lang/$(am__dirstamp) \ java/lang/$(DEPDIR)/$(am__dirstamp) -java/lang/natStringBuffer.lo: java/lang/$(am__dirstamp) \ - java/lang/$(DEPDIR)/$(am__dirstamp) -java/lang/natStringBuilder.lo: java/lang/$(am__dirstamp) \ +java/lang/natAbstractStringBuffer.lo: java/lang/$(am__dirstamp) \ java/lang/$(DEPDIR)/$(am__dirstamp) java/lang/natSystem.lo: java/lang/$(am__dirstamp) \ java/lang/$(DEPDIR)/$(am__dirstamp) @@ -9165,6 +9271,9 @@ gjarsigner$(EXEEXT): $(gjarsigner_OBJECTS) $(gjarsigner_DEPENDENCIES) gjavah$(EXEEXT): $(gjavah_OBJECTS) $(gjavah_DEPENDENCIES) @rm -f gjavah$(EXEEXT) $(gjavah_LINK) $(gjavah_LDFLAGS) $(gjavah_OBJECTS) $(gjavah_LDADD) $(LIBS) +gjdoc$(EXEEXT): $(gjdoc_OBJECTS) $(gjdoc_DEPENDENCIES) + @rm -f gjdoc$(EXEEXT) + $(gjdoc_LINK) $(gjdoc_LDFLAGS) $(gjdoc_OBJECTS) $(gjdoc_LDADD) $(LIBS) gkeytool$(EXEEXT): $(gkeytool_OBJECTS) $(gkeytool_DEPENDENCIES) @rm -f gkeytool$(EXEEXT) $(gkeytool_LINK) $(gkeytool_LDFLAGS) $(gkeytool_OBJECTS) $(gkeytool_LDADD) $(LIBS) @@ -9353,6 +9462,8 @@ mostlyclean-compile: -rm -f java/io/natVMObjectStreamClass.lo -rm -f java/lang/Object.$(OBJEXT) -rm -f java/lang/Object.lo + -rm -f java/lang/natAbstractStringBuffer.$(OBJEXT) + -rm -f java/lang/natAbstractStringBuffer.lo -rm -f java/lang/natCharacter.$(OBJEXT) -rm -f java/lang/natCharacter.lo -rm -f java/lang/natClass.$(OBJEXT) @@ -9369,10 +9480,6 @@ mostlyclean-compile: -rm -f java/lang/natRuntime.lo -rm -f java/lang/natString.$(OBJEXT) -rm -f java/lang/natString.lo - -rm -f java/lang/natStringBuffer.$(OBJEXT) - -rm -f java/lang/natStringBuffer.lo - -rm -f java/lang/natStringBuilder.$(OBJEXT) - -rm -f java/lang/natStringBuilder.lo -rm -f java/lang/natSystem.$(OBJEXT) -rm -f java/lang/natSystem.lo -rm -f java/lang/natThread.$(OBJEXT) @@ -9524,6 +9631,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@java/io/$(DEPDIR)/natVMObjectInputStream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/io/$(DEPDIR)/natVMObjectStreamClass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/Object.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natAbstractStringBuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natCharacter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natClass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natClassLoader.Plo@am__quote@ @@ -9532,8 +9640,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natRuntime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natString.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natStringBuffer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natStringBuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natSystem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@java/lang/$(DEPDIR)/natThreadLocal.Plo@am__quote@ @@ -10696,11 +10802,10 @@ gnu/java/locale.list: $(gnu_java_locale_source_files) -include gnu/java/locale.deps -gnu/java/math.list: $(gnu_java_math_source_files) - @$(mkinstalldirs) $(dir $@) - echo $(srcdir)/classpath/lib/gnu/java/math/*.class > gnu/java/math.list - --include gnu/java/math.deps +gnu-java-math.lo: $(gnu_java_math_source_files) + @find $(srcdir)/classpath/lib/gnu/java/math -name '*.class' > gnu-java-math.list + $(LTGCJCOMPILE) -fsource-filename=$(here)/classpath/lib/classes -fjni $(LIBGCJ_BC_FLAGS) -c -o gnu-java-math.lo @gnu-java-math.list + @rm -f gnu-java-math.list gnu/java/net.list: $(gnu_java_net_source_files) @$(mkinstalldirs) $(dir $@) @@ -10965,6 +11070,12 @@ gnu/java/util/regex.list: $(gnu_java_util_regex_source_files) -include gnu/java/util/regex.deps +gnu/javax/activation/viewers.list: $(gnu_javax_activation_viewers_source_files) + @$(mkinstalldirs) $(dir $@) + echo $(srcdir)/classpath/lib/gnu/javax/activation/viewers/*.class > gnu/javax/activation/viewers.list + +-include gnu/javax/activation/viewers.deps + gnu/javax/crypto.list: $(gnu_javax_crypto_source_files) @$(mkinstalldirs) $(dir $@) echo $(srcdir)/classpath/lib/gnu/javax/crypto/*.class > gnu/javax/crypto.list @@ -11738,6 +11849,12 @@ javax/accessibility.list: $(javax_accessibility_source_files) -include javax/accessibility.deps +javax/activation.list: $(javax_activation_source_files) + @$(mkinstalldirs) $(dir $@) + echo $(srcdir)/classpath/lib/javax/activation/*.class > javax/activation.list + +-include javax/activation.deps + javax/activity.list: $(javax_activity_source_files) @$(mkinstalldirs) $(dir $@) echo $(srcdir)/classpath/lib/javax/activity/*.class > javax/activity.list diff --git a/libjava/classpath/AUTHORS b/libjava/classpath/AUTHORS index be17176a6f0..19a2658b7e1 100644 --- a/libjava/classpath/AUTHORS +++ b/libjava/classpath/AUTHORS @@ -22,6 +22,7 @@ Thomas Fitzsimmons (fitzsim@redhat.com) Jeroen Frijters (jeroen@frijters.net) David Gilbert (david.gilbert@object-refinery.com) Anthony Green (green@redhat.com) +Laszlo Andras Hernadi (e0327023@student.tuwien.ac.at) Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.de) Andrew John Hughes (gnu_andrew@member.fsf.org) Kazumitsu Ito (kaz@maczuka.gcd.org) @@ -42,6 +43,7 @@ Aaron M. Renn (arenn@urbanophile.com) Ian Rogers (ian.rogers@manchester.ac.uk) Andrew Selkirk (aselkirk@sympatico.ca) Robert Schuster (robertschuster@fsfe.org) +Joshua Sumali (jsumali@redhat.com) Christian Thalinger (twisti@complang.tuwien.ac.at) Andreas Tobler (a.tobler@schweiz.org) Mario Torre (neugens@limasoftware.net) diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index f8e2d43ee2c..f9db385f7c1 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -1,3 +1,436 @@ +2008-10-20 Andrew John Hughes + + * m4/ac_prog_antlr.m4: + Remove redundant checks. + * tools/Makefile.am: + Use gjdoc_gendir when calling antlr. + +2008-10-15 Andrew John Hughes + + * configure.ac: + Remove superfluous AC_PROG_JAVA call. + +2008-10-06 Andrew John Hughes + + * m4/ac_prog_antlr: + Check for cantlr as well. + * tools/Makefile.am: + Only build GJDoc parser when both + CREATE_GJDOC and CREATE_GJDOC_PARSER + are on. + +2008-10-02 Andrew John Hughes + + * configure.ac: + Add regen-gjdoc-parser option, + and separate antlr tests. + * m4/ac_prog_antlr.m4: + Turn single test into AC_LIB_ANTLR + and AC_PROG_ANTLR. + * m4/ac_prog_java.m4: + Quote tests. + * tools/Makefile.am: + Support CREATE_GJDOC_PARSER option. + +2008-09-14 Andrew John Hughes + + * examples/Makefile.am: + Check lib directly as well as glibj.zip + for boot classes. + * m4/acinclude.m4: + Only require the class files to be built + to allow the tools and examples to be built, + not the installation of glibj.zip. + * tools/Makefile.am: + Check lib directly as well as glibj.zip + for boot classes. + +2008-09-13 Andrew John Hughes + + * examples/Makefile.am, + * lib/Makefile.am: + Add GCJ rules. + * m4/ac_prog_javac.m4: + Check whether JAVAC is gcj. + * m4/ac_prog_javac_works.m4: + Add GCJ rules. + * m4/acinclude.m4: + Don't bother checking for -J + if using GCJ. + * tools/Makefile.am: + Add GCJ rules. + +2007-08-23 Daniel Frampton + + * AUTHORS: Added. + * java/lang/InheritableThreadLocal.java, + * java/lang/Thread.java, + * java/lang/ThreadLocal.java: + Modified to use java.lang.ThreadLocalMap. + * java/lang/ThreadLocalMap.java: + New cheaper ThreadLocal-specific WeakHashMap. + +2008-02-07 Ian Rogers + + * java/util/zip/ZipEntry.java: + Use byte fields instead of integer fields, + store the time as well as the DOS time and + don't retain a global Calendar instance. + (setDOSTime(int)): Set KNOWN_DOSTIME instead + of KNOWN_TIME, and unset KNOWN_TIME. + (getDOSTime()): Compute DOS time from UNIX time + only when needed. + (clone()): Provide cloning via the ZipEntry constructor + where possible. + (setTime(long)): Don't compute DOS time at this point. + (getCalendar()): Removed. + +2008-09-09 Andrew John Hughes + + * tools/gnu/classpath/tools/getopt/Parser.java: + (setHeader(String)): Make synchronized. + (setFooter(String)): Likewise. + * tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java, + (reset()): Make synchronized. + (name(Class)): Likewise. + +2008-09-04 Robert Schuster + + * gnu/java/nio/charset/ByteDecodeLoopHelper: + (arrayDecodeLoop): Added new break label, escape to that label. + * gnu/java/nio/charset/ByteEncodeLoopHelper: + (arrayDecodeLoop): Added new break label, escape to that label. + +2008-09-04 Robert Schuster + + * java/text/DecimalFormat.java: + (scanFix): Use 'i + 1' when looking at following character. + (scanNegativePattern): Dito. + +2008-09-02 Andrew John Hughes + + * tools/gnu/classpath/tools/javah/ClassWrapper.java: + (makeVtable()): Populate methodNameMap. + (printMethods(CniPrintStream)): Always use pre-populated + methodNameMap for bridge targets. + +2008-09-01 Mario Torre + + * gnu/java/awt/peer/x/XImage.java (XImageProducer): remove @Override + annotation to allow compilation on javac < 1.6 and ecj < 3.4. + +2008-09-01 Mario Torre + + * gnu/java/awt/peer/x/XGraphicsDevice.java (getDisplay): fix to support + new Escher API. + * gnu/java/awt/peer/x/XImage.java (getSource): method implemented. + * gnu/java/awt/peer/x/XImage.java (XImageProducer): implement ImageProducer + for getSource. + +2008-09-01 Andrew John Hughes + + * gnu/java/util/regex/BacktrackStack.java, + * gnu/java/util/regex/CharIndexed.java, + * gnu/java/util/regex/CharIndexedCharArray.java, + * gnu/java/util/regex/CharIndexedCharSequence.java, + * gnu/java/util/regex/CharIndexedInputStream.java, + * gnu/java/util/regex/CharIndexedString.java, + * gnu/java/util/regex/CharIndexedStringBuffer.java, + * gnu/java/util/regex/RE.java, + * gnu/java/util/regex/REException.java, + * gnu/java/util/regex/REFilterInputStream.java, + * gnu/java/util/regex/REMatch.java, + * gnu/java/util/regex/REMatchEnumeration.java, + * gnu/java/util/regex/RESyntax.java, + * gnu/java/util/regex/REToken.java, + * gnu/java/util/regex/RETokenAny.java, + * gnu/java/util/regex/RETokenBackRef.java, + * gnu/java/util/regex/RETokenChar.java, + * gnu/java/util/regex/RETokenEnd.java, + * gnu/java/util/regex/RETokenEndOfPreviousMatch.java, + * gnu/java/util/regex/RETokenEndSub.java, + * gnu/java/util/regex/RETokenIndependent.java, + * gnu/java/util/regex/RETokenLookAhead.java, + * gnu/java/util/regex/RETokenLookBehind.java, + * gnu/java/util/regex/RETokenNamedProperty.java, + * gnu/java/util/regex/RETokenOneOf.java, + * gnu/java/util/regex/RETokenPOSIX.java, + * gnu/java/util/regex/RETokenRange.java, + * gnu/java/util/regex/RETokenRepeated.java, + * gnu/java/util/regex/RETokenStart.java, + * gnu/java/util/regex/RETokenWordBoundary.java, + * gnu/java/util/regex/UncheckedRE.java: + Fix indentation. + +2008-09-01 Andrew John Hughes + + * gnu/java/util/regex/RETokenStart.java: + (getMaximumLength()): Add Override annotation. + (matchThis(CharIndexed, REMatch)): Likewise. + (returnsFixedLengthMatches()): Renamed from + returnsFixedLengthmatches and added Override + annotation. + (findFixedLengthMatches(CharIndexed,REMatch,int)): + Add Override annotation. + (dump(CPStringBuilder)): Likewise. + * gnu/javax/print/ipp/IppRequest.java: + (RequestWriter.writeOperationAttributes(AttributeSet)): + Throw exception, don't just create and drop it. + * javax/management/MBeanServerPermission.java: + (MBeanServerPermissionCollection.add(Permission)): Compare + against individual Strings not the entire array, and + store the result of replace. + * javax/swing/text/html/StyleSheet.java: + (setBaseFontSize(size)): Store result of trim(). + +2008-09-01 Andrew John Hughes + + * javax/tools/FileObject.java: + (openReader(boolean)): Document new parameter. + +2008-03-27 Michael Franz + + PR classpath/35690: + * javax/tools/FileObject.java: + (toUri()): Fix case from toURI. + (openReader(boolean)): Add missing boolean argument. + +2008-08-26 Andrew John Hughes + + PR classpath/35487: + * gnu/javax/management/Server.java: + (beans): Change to ConcurrentHashMap. + (defaultDomain): Make final. + (outer): Likewise. + (LazyListenersHolder): Added to wrap + listeners, also now a ConcurrentHashMap, + providing lazy initialisation safely. + (sequenceNumber): Documented. + (getBean(ObjectName)): Remove redundant cast. + (addNotificationListener(ObjectName,NotificationListener, + NotificationFilter,Object)): Remove map initialisation + and use holder. + (getObjectInstance(ObjectName)): Remove redundant cast. + (registerMBean(Object,ObjectName)): Add bean atomically. + (removeNotificationListener(ObjectName,NotificationListener)): + Simplified. + (removeNotificationListener(ObjectName,NotificationListener, + NotificationFilter,Object)): Likewise. + (notify(ObjectName,String)): Documented. + +2008-08-26 Andrew John Hughes + + * gnu/javax/management/Server.java: + Genericised. + +2008-08-26 Andrew John Hughes + + * gnu/javax/management/Translator.java: + Genericised. + +2008-08-26 Andrew John Hughes + + * javax/management/DefaultLoaderRepository.java, + * javax/management/JMX.java, + * javax/management/MBeanAttributeInfo.java, + * javax/management/MBeanConstructorInfo.java, + * javax/management/MBeanOperationInfo.java, + * javax/management/MBeanServerDelegate.java: + Fix warnings due to generics. + +2008-08-25 Andrew John Hughes + + * javax/management/MBeanPermission.java, + * javax/management/MBeanServerDelegate.java, + * javax/management/MBeanServerFactory.java, + * javax/management/MBeanServerInvocationHandler.java, + * javax/management/MBeanServerPermission.java: + Fix warnings due to use of non-generic collections. + +2008-08-25 Mario Torre + + * gnu/javax/rmi/CORBA/RmiUtilities.java (readValue): check if sender is + null to avoid NPE. + +2008-08-22 Mario Torre + + * gnu/CORBA/OrbFunctional.java (set_parameters): Fix + NullPointerException checking when param is null. + +2008-08-23 Andrew John Hughes + + * java/util/regex/Matcher.java: + (reset()): Reset append position so + we don't try and append to the end of + the old input. + +2008-08-22 Andrew John Hughes + + PR classpath/32028: + * m4/acinclude.m4: + Also allow versions of GJDoc from 0.8* on, as + CVS is 0.8.0-pre. + +2008-08-21 Andrew John Hughes + + PR classpath/32028: + * m4/acinclude.m4: + (CLASSPATH_WITH_GJDOC): Ensure version 0.7.9 is + being used. + +2008-08-20 Andrew John Hughes + + * tools/Makefile.am: + Add taglets subdirectory to list of excluded + paths when GJDoc is not compiled. + +2008-08-19 David P Grove + + * scripts/check_jni_methods.sh.in: + Fix build issue on AIX by splitting generation + of method list. + +2008-08-18 Andrew John Hughes + + * native/jni/gstreamer-peer/gst_native_pipeline.c: + (get_free_space(int)): Use #else not #elif when + there is no condition. + +2008-08-17 Andrew John Hughes + + PR classpath/31895: + * java/text/DecimalFormat.java: + (setCurrency(Currency)): Update prefixes and + suffixes when currency changes. + * java/text/DecimalFormatSymbols.java: + (DecimalFormatSymbols(Locale)): Set locale earlier + so it can be used by setCurrency(Currency). + (setCurrency(Currency)): Set the symbol correctly using + the locale of the instance. + * java/util/Currency.java: + Throw error instead of just printing a message. + +2008-08-17 Andrew John Hughes + + * javax/activation/ActivationDataFlavor.java: + Suppress warnings from public API. + (mimeType): Made final. + (representationClass): Added generic type and + made final. + (normalizeMimeTypeParameter(String,String)): + Use CPStringBuilder. + * javax/activation/CommandInfo.java: + (verb): Made final. + (className): Made final. + * javax/activation/DataHandler.java: + (dataSource): Made final. + * javax/activation/FileDataSource.java: + (file): Made final. + * javax/activation/MailcapCommandMap.java: + Use generics on collections and CPStringBuilder + instead of StringBuffer. + * javax/activation/MimeType.java: + (toString()): Use CPStringBuilder. + (getBaseType()): Likewise. + * javax/activation/MimeTypeParameterList.java: + Use generics on collections and CPStringBuilder + instead of StringBuffer. + * javax/activation/MimeTypeParseException.java: + (MimeTypeParseException(String,String)): Use + CPStringBuilder. + * javax/activation/MimetypesFileTypeMap.java: + Use generics on collections and CPStringBuilder + instead of StringBuffer. + * javax/activation/URLDataSource.java: + (url): Made final. + +2008-08-17 Andrew John Hughes + + * gnu/javax/activation/viewers/ImageViewer.java, + * gnu/javax/activation/viewers/TextEditor.java, + * gnu/javax/activation/viewers/TextViewer.java, + * javax/activation/ActivationDataFlavor.java, + * javax/activation/CommandInfo.java, + * javax/activation/CommandMap.java, + * javax/activation/CommandObject.java, + * javax/activation/DataContentHandler.java, + * javax/activation/DataContentHandlerFactory.java, + * javax/activation/DataHandler.java, + * javax/activation/DataHandlerDataSource.java, + * javax/activation/DataSource.java, + * javax/activation/DataSourceDataContentHandler.java, + * javax/activation/FileDataSource.java, + * javax/activation/FileTypeMap.java, + * javax/activation/MailcapCommandMap.java, + * javax/activation/MimeType.java, + * javax/activation/MimeTypeParameterList.java, + * javax/activation/MimeTypeParseException.java, + * javax/activation/MimetypesFileTypeMap.java, + * javax/activation/ObjectDataContentHandler.java, + * javax/activation/URLDataSource.java, + * javax/activation/UnsupportedDataTypeException.java, + * javax/activation/package.html, + * resource/META-INF/mailcap.default, + * resource/META-INF/mimetypes.default: + Import GNU JAF CVS as of 17/08/2008. + +2006-04-25 Archit Shah + + * javax/activation/MimeTypeParameterList.java: + Insert ';' separator before parameter list. + +2005-06-29 Xavier Poinsard + + * javax/activation/ObjectDataContentHandler.java: + Fixed typo. + +2005-05-28 Chris Burdess + + * javax/activation/CommandMap.java, + * javax/activation/MailcapCommandMap.java: + Updated to JAF 1.1. + +2004-06-09 Chris Burdess + + * javax/activation/MailcapCommandMap.java: + Fixed bug whereby x-java prefix was not + attempted. + +2008-08-17 Andrew John Hughes + + * AUTHORS: Added Laszlo. + +2008-04-20 Andrew John Hughes + + PR classpath/30436: + * java/util/Scanner.java: + Fix package to be java.util and correct + indentation. + +2007-07-25 Laszlo Andras Hernadi + + PR classpath/30436: + * java/util/Scanner.java: + Initial implementation. + +2008-08-17 Andrew John Hughes + + * java/util/regex/Matcher.java: + (toMatchResult()): Implemented. + +2008-08-13 Joshua Sumali + + * doc/Makefile.am (gjdoc.pod): Generate gjdoc pod from cp-tools.texinfo + instead of invoke.texi. Remove invoke.texi from EXTRA_DIST. + * doc/invoke.texi: Removed and merged into ... + * doc/cp-tools.texinfo: Here + +2008-08-12 Robert Schuster + + * native/jni/java-net/local.c + (local_bind): Removed fprintf call, fixed access outside + of array bounds. + 2008-07-15 Ralf Wildenhues * m4/acinclude.m4 (CLASSPATH_COND_IF): New macro. @@ -5,7 +438,973 @@ * configure: Regenerate. * tools/Makefile.am (!CREATE_WRAPPERS): Update comment. -2008-06-11 Andrew Haley +2008-07-12 Andrew John Hughes + + * resource/gnu/java/locale/LocaleInformation.properties, + * resource/gnu/java/locale/LocaleInformation_aa.properties, + * resource/gnu/java/locale/LocaleInformation_af.properties, + * resource/gnu/java/locale/LocaleInformation_af_NA.properties, + * resource/gnu/java/locale/LocaleInformation_ak.properties, + * resource/gnu/java/locale/LocaleInformation_am.properties, + * resource/gnu/java/locale/LocaleInformation_ar.properties, + * resource/gnu/java/locale/LocaleInformation_as.properties, + * resource/gnu/java/locale/LocaleInformation_az.properties, + * resource/gnu/java/locale/LocaleInformation_be.properties, + * resource/gnu/java/locale/LocaleInformation_bg.properties, + * resource/gnu/java/locale/LocaleInformation_bn.properties, + * resource/gnu/java/locale/LocaleInformation_bs.properties, + * resource/gnu/java/locale/LocaleInformation_byn.properties, + * resource/gnu/java/locale/LocaleInformation_ca.properties, + * resource/gnu/java/locale/LocaleInformation_cch.properties, + * resource/gnu/java/locale/LocaleInformation_cop.properties, + * resource/gnu/java/locale/LocaleInformation_cs.properties, + * resource/gnu/java/locale/LocaleInformation_cy.properties, + * resource/gnu/java/locale/LocaleInformation_da.properties, + * resource/gnu/java/locale/LocaleInformation_de.properties, + * resource/gnu/java/locale/LocaleInformation_de_BE.properties, + * resource/gnu/java/locale/LocaleInformation_dv.properties, + * resource/gnu/java/locale/LocaleInformation_dz.properties, + * resource/gnu/java/locale/LocaleInformation_ee.properties, + * resource/gnu/java/locale/LocaleInformation_el.properties, + * resource/gnu/java/locale/LocaleInformation_en.properties, + * resource/gnu/java/locale/LocaleInformation_en_BE.properties, + * resource/gnu/java/locale/LocaleInformation_en_BZ.properties, + * resource/gnu/java/locale/LocaleInformation_en_GB.properties, + * resource/gnu/java/locale/LocaleInformation_en_IE.properties, + * resource/gnu/java/locale/LocaleInformation_en_MT.properties, + * resource/gnu/java/locale/LocaleInformation_en_SG.properties, + * resource/gnu/java/locale/LocaleInformation_eo.properties, + * resource/gnu/java/locale/LocaleInformation_es.properties, + * resource/gnu/java/locale/LocaleInformation_es_AR.properties, + * resource/gnu/java/locale/LocaleInformation_es_CL.properties, + * resource/gnu/java/locale/LocaleInformation_es_CO.properties, + * resource/gnu/java/locale/LocaleInformation_es_EC.properties, + * resource/gnu/java/locale/LocaleInformation_es_PE.properties, + * resource/gnu/java/locale/LocaleInformation_es_US.properties, + * resource/gnu/java/locale/LocaleInformation_et.properties, + * resource/gnu/java/locale/LocaleInformation_eu.properties, + * resource/gnu/java/locale/LocaleInformation_fa.properties, + * resource/gnu/java/locale/LocaleInformation_fi.properties, + * resource/gnu/java/locale/LocaleInformation_fil.properties, + * resource/gnu/java/locale/LocaleInformation_fo.properties, + * resource/gnu/java/locale/LocaleInformation_fr.properties, + * resource/gnu/java/locale/LocaleInformation_fr_BE.properties, + * resource/gnu/java/locale/LocaleInformation_fr_CA.properties, + * resource/gnu/java/locale/LocaleInformation_fr_CH.properties, + * resource/gnu/java/locale/LocaleInformation_fur.properties, + * resource/gnu/java/locale/LocaleInformation_ga.properties, + * resource/gnu/java/locale/LocaleInformation_gaa.properties, + * resource/gnu/java/locale/LocaleInformation_gez.properties, + * resource/gnu/java/locale/LocaleInformation_gl.properties, + * resource/gnu/java/locale/LocaleInformation_gu.properties, + * resource/gnu/java/locale/LocaleInformation_gv.properties, + * resource/gnu/java/locale/LocaleInformation_ha.properties, + * resource/gnu/java/locale/LocaleInformation_haw.properties, + * resource/gnu/java/locale/LocaleInformation_he.properties, + * resource/gnu/java/locale/LocaleInformation_hi.properties, + * resource/gnu/java/locale/LocaleInformation_hr.properties, + * resource/gnu/java/locale/LocaleInformation_hu.properties, + * resource/gnu/java/locale/LocaleInformation_hy.properties, + * resource/gnu/java/locale/LocaleInformation_ia.properties, + * resource/gnu/java/locale/LocaleInformation_id.properties, + * resource/gnu/java/locale/LocaleInformation_ig.properties, + * resource/gnu/java/locale/LocaleInformation_is.properties, + * resource/gnu/java/locale/LocaleInformation_it.properties, + * resource/gnu/java/locale/LocaleInformation_it_CH.properties, + * resource/gnu/java/locale/LocaleInformation_iu.properties, + * resource/gnu/java/locale/LocaleInformation_ja.properties, + * resource/gnu/java/locale/LocaleInformation_ka.properties, + * resource/gnu/java/locale/LocaleInformation_kaj.properties, + * resource/gnu/java/locale/LocaleInformation_kam.properties, + * resource/gnu/java/locale/LocaleInformation_kcg.properties, + * resource/gnu/java/locale/LocaleInformation_kfo.properties, + * resource/gnu/java/locale/LocaleInformation_kk.properties, + * resource/gnu/java/locale/LocaleInformation_kl.properties, + * resource/gnu/java/locale/LocaleInformation_km.properties, + * resource/gnu/java/locale/LocaleInformation_kn.properties, + * resource/gnu/java/locale/LocaleInformation_ko.properties, + * resource/gnu/java/locale/LocaleInformation_kok.properties, + * resource/gnu/java/locale/LocaleInformation_kpe.properties, + * resource/gnu/java/locale/LocaleInformation_kw.properties, + * resource/gnu/java/locale/LocaleInformation_ky.properties, + * resource/gnu/java/locale/LocaleInformation_ln.properties, + * resource/gnu/java/locale/LocaleInformation_lo.properties, + * resource/gnu/java/locale/LocaleInformation_lt.properties, + * resource/gnu/java/locale/LocaleInformation_lv.properties, + * resource/gnu/java/locale/LocaleInformation_mk.properties, + * resource/gnu/java/locale/LocaleInformation_ml.properties, + * resource/gnu/java/locale/LocaleInformation_mn.properties, + * resource/gnu/java/locale/LocaleInformation_mr.properties, + * resource/gnu/java/locale/LocaleInformation_ms.properties, + * resource/gnu/java/locale/LocaleInformation_ms_BN.properties, + * resource/gnu/java/locale/LocaleInformation_mt.properties, + * resource/gnu/java/locale/LocaleInformation_my.properties, + * resource/gnu/java/locale/LocaleInformation_nb.properties, + * resource/gnu/java/locale/LocaleInformation_ne.properties, + * resource/gnu/java/locale/LocaleInformation_nl.properties, + * resource/gnu/java/locale/LocaleInformation_nn.properties, + * resource/gnu/java/locale/LocaleInformation_nr.properties, + * resource/gnu/java/locale/LocaleInformation_nso.properties, + * resource/gnu/java/locale/LocaleInformation_ny.properties, + * resource/gnu/java/locale/LocaleInformation_om.properties, + * resource/gnu/java/locale/LocaleInformation_or.properties, + * resource/gnu/java/locale/LocaleInformation_pa.properties, + * resource/gnu/java/locale/LocaleInformation_pl.properties, + * resource/gnu/java/locale/LocaleInformation_ps.properties, + * resource/gnu/java/locale/LocaleInformation_pt.properties, + * resource/gnu/java/locale/LocaleInformation_pt_PT.properties, + * resource/gnu/java/locale/LocaleInformation_ro.properties, + * resource/gnu/java/locale/LocaleInformation_ru.properties, + * resource/gnu/java/locale/LocaleInformation_ru_UA.properties, + * resource/gnu/java/locale/LocaleInformation_rw.properties, + * resource/gnu/java/locale/LocaleInformation_sa.properties, + * resource/gnu/java/locale/LocaleInformation_se.properties, + * resource/gnu/java/locale/LocaleInformation_si.properties, + * resource/gnu/java/locale/LocaleInformation_sid.properties, + * resource/gnu/java/locale/LocaleInformation_sk.properties, + * resource/gnu/java/locale/LocaleInformation_sl.properties, + * resource/gnu/java/locale/LocaleInformation_so.properties, + * resource/gnu/java/locale/LocaleInformation_sq.properties, + * resource/gnu/java/locale/LocaleInformation_sr.properties, + * resource/gnu/java/locale/LocaleInformation_sr_BA_Cyrl.properties, + * resource/gnu/java/locale/LocaleInformation_sr_ME_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_ss.properties, + * resource/gnu/java/locale/LocaleInformation_st.properties, + * resource/gnu/java/locale/LocaleInformation_sv.properties, + * resource/gnu/java/locale/LocaleInformation_sw.properties, + * resource/gnu/java/locale/LocaleInformation_syr.properties, + * resource/gnu/java/locale/LocaleInformation_ta.properties, + * resource/gnu/java/locale/LocaleInformation_te.properties, + * resource/gnu/java/locale/LocaleInformation_tg.properties, + * resource/gnu/java/locale/LocaleInformation_th.properties, + * resource/gnu/java/locale/LocaleInformation_ti.properties, + * resource/gnu/java/locale/LocaleInformation_tig.properties, + * resource/gnu/java/locale/LocaleInformation_tn.properties, + * resource/gnu/java/locale/LocaleInformation_to.properties, + * resource/gnu/java/locale/LocaleInformation_tr.properties, + * resource/gnu/java/locale/LocaleInformation_trv.properties, + * resource/gnu/java/locale/LocaleInformation_ts.properties, + * resource/gnu/java/locale/LocaleInformation_tt.properties, + * resource/gnu/java/locale/LocaleInformation_ug.properties, + * resource/gnu/java/locale/LocaleInformation_uk.properties, + * resource/gnu/java/locale/LocaleInformation_ur.properties, + * resource/gnu/java/locale/LocaleInformation_uz.properties, + * resource/gnu/java/locale/LocaleInformation_uz_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_ve.properties, + * resource/gnu/java/locale/LocaleInformation_vi.properties, + * resource/gnu/java/locale/LocaleInformation_wal.properties, + * resource/gnu/java/locale/LocaleInformation_wo.properties, + * resource/gnu/java/locale/LocaleInformation_xh.properties, + * resource/gnu/java/locale/LocaleInformation_yo.properties, + * resource/gnu/java/locale/LocaleInformation_zh.properties, + * resource/gnu/java/locale/LocaleInformation_zh_Hant.properties, + * resource/gnu/java/locale/LocaleInformation_zu.properties: + Correct use of 'v' with 'z' in locale data as Java does not + support this new pattern character. + +2008-07-12 David Daney + + * gnu/java/net/protocol/http/LimitedLengthInputStream.java: Clean up + white space in entire file. + (handleClose): Remove redundant braces from if statement. + +2008-07-07 Andrew John Hughes + + * java/text/DateFormatSymbols.java: + (getZoneStrings(ResourceBundle,Locale)): + Handle missing standard zone names. + +2008-07-07 Andrew John Hughes + + * java/text/DateFormatSymbols.java: + (getZoneStrings(ResourceBundle,Locale)): + Fallback on to parent locales. + +2008-07-07 Andrew John Hughes + + * java/text/DateFormatSymbols.java: + (getZoneStrings(ResourceBundle,Locale)): + Use metazones to convert metazone names to standard + Continent/City form. Also add hack to include GMT + as a short name. + * resource/java/text/metazones.properties: + New properties file for mapping metazones to standard + zone names. + +2008-07-07 Christian Thalinger + + * configure.ac (AC_CHECK_HEADERS): Added sys/sockio.h, required + for Solaris. + (AC_CHECK_LIB): Check for socket. + * native/jni/java-net/java_net_VMNetworkInterface.c (unistd.h): + Added. + [HAVE_SYS_SOCKIO_H] (sys/sockio.h): Likewise. + +2008-07-07 Andrew John Hughes + + * THANKYOU: Added Byeogncheol. + +2008-07-07 Byeogncheol Lee + + PR classpath/36677: + * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java: + (executeTopLevelThreadGroups(ByteBuffer,DataOutputStream)): + Add missing write. + +2008-07-07 Andrew John Hughes + + * java/text/DateFormatSymbols.java: + (getZoneStrings(ResourceBundle,Locale)): + Pad arrays smaller than 5 with empty strings. + +2008-07-07 Andrew John Hughes + + * java/util/Calendar.java: + (Calendar(TimeZone,Locale)): Use weeks.properties + instead of LocaleInformation bundles. + * resource/java/util/iso4217.properties: + Updated with new supplementgen header. + * resource/java/util/weeks.properties: + New resource file. + +2008-07-07 Andrew John Hughes + + * resource/gnu/java/locale/LocaleInformation.properties, + * resource/gnu/java/locale/LocaleInformation_aa.properties, + * resource/gnu/java/locale/LocaleInformation_af.properties, + * resource/gnu/java/locale/LocaleInformation_af_NA.properties, + * resource/gnu/java/locale/LocaleInformation_ak.properties, + * resource/gnu/java/locale/LocaleInformation_am.properties, + * resource/gnu/java/locale/LocaleInformation_ar.properties, + * resource/gnu/java/locale/LocaleInformation_ar_LB.properties, + * resource/gnu/java/locale/LocaleInformation_as.properties, + * resource/gnu/java/locale/LocaleInformation_az.properties, + * resource/gnu/java/locale/LocaleInformation_be.properties, + * resource/gnu/java/locale/LocaleInformation_bg.properties, + * resource/gnu/java/locale/LocaleInformation_bn.properties, + * resource/gnu/java/locale/LocaleInformation_bn_IN.properties, + * resource/gnu/java/locale/LocaleInformation_bs.properties, + * resource/gnu/java/locale/LocaleInformation_byn.properties, + * resource/gnu/java/locale/LocaleInformation_ca.properties, + * resource/gnu/java/locale/LocaleInformation_cs.properties, + * resource/gnu/java/locale/LocaleInformation_cy.properties, + * resource/gnu/java/locale/LocaleInformation_da.properties, + * resource/gnu/java/locale/LocaleInformation_de.properties, + * resource/gnu/java/locale/LocaleInformation_de_AT.properties, + * resource/gnu/java/locale/LocaleInformation_de_BE.properties, + * resource/gnu/java/locale/LocaleInformation_de_CH.properties, + * resource/gnu/java/locale/LocaleInformation_de_LI.properties, + * resource/gnu/java/locale/LocaleInformation_dv.properties, + * resource/gnu/java/locale/LocaleInformation_dz.properties, + * resource/gnu/java/locale/LocaleInformation_el.properties, + * resource/gnu/java/locale/LocaleInformation_en.properties, + * resource/gnu/java/locale/LocaleInformation_en_AU.properties, + * resource/gnu/java/locale/LocaleInformation_en_BE.properties, + * resource/gnu/java/locale/LocaleInformation_en_BW.properties, + * resource/gnu/java/locale/LocaleInformation_en_BZ.properties, + * resource/gnu/java/locale/LocaleInformation_en_CA.properties, + * resource/gnu/java/locale/LocaleInformation_en_GB.properties, + * resource/gnu/java/locale/LocaleInformation_en_HK.properties, + * resource/gnu/java/locale/LocaleInformation_en_IN.properties, + * resource/gnu/java/locale/LocaleInformation_en_NZ.properties, + * resource/gnu/java/locale/LocaleInformation_en_PH.properties, + * resource/gnu/java/locale/LocaleInformation_en_PK.properties, + * resource/gnu/java/locale/LocaleInformation_en_SG.properties, + * resource/gnu/java/locale/LocaleInformation_en_US_POSIX.properties, + * resource/gnu/java/locale/LocaleInformation_en_ZA.properties, + * resource/gnu/java/locale/LocaleInformation_en_ZW.properties, + * resource/gnu/java/locale/LocaleInformation_eo.properties, + * resource/gnu/java/locale/LocaleInformation_es.properties, + * resource/gnu/java/locale/LocaleInformation_es_AR.properties, + * resource/gnu/java/locale/LocaleInformation_es_CL.properties, + * resource/gnu/java/locale/LocaleInformation_es_CR.properties, + * resource/gnu/java/locale/LocaleInformation_es_PY.properties, + * resource/gnu/java/locale/LocaleInformation_es_UY.properties, + * resource/gnu/java/locale/LocaleInformation_es_VE.properties, + * resource/gnu/java/locale/LocaleInformation_et.properties, + * resource/gnu/java/locale/LocaleInformation_eu.properties, + * resource/gnu/java/locale/LocaleInformation_fa.properties, + * resource/gnu/java/locale/LocaleInformation_fa_AF.properties, + * resource/gnu/java/locale/LocaleInformation_fi.properties, + * resource/gnu/java/locale/LocaleInformation_fil.properties, + * resource/gnu/java/locale/LocaleInformation_fo.properties, + * resource/gnu/java/locale/LocaleInformation_fr.properties, + * resource/gnu/java/locale/LocaleInformation_fr_BE.properties, + * resource/gnu/java/locale/LocaleInformation_fr_CA.properties, + * resource/gnu/java/locale/LocaleInformation_fr_CH.properties, + * resource/gnu/java/locale/LocaleInformation_fur.properties, + * resource/gnu/java/locale/LocaleInformation_ga.properties, + * resource/gnu/java/locale/LocaleInformation_gez.properties, + * resource/gnu/java/locale/LocaleInformation_gl.properties, + * resource/gnu/java/locale/LocaleInformation_gu.properties, + * resource/gnu/java/locale/LocaleInformation_gv.properties, + * resource/gnu/java/locale/LocaleInformation_ha.properties, + * resource/gnu/java/locale/LocaleInformation_haw.properties, + * resource/gnu/java/locale/LocaleInformation_he.properties, + * resource/gnu/java/locale/LocaleInformation_hi.properties, + * resource/gnu/java/locale/LocaleInformation_hr.properties, + * resource/gnu/java/locale/LocaleInformation_hu.properties, + * resource/gnu/java/locale/LocaleInformation_hy.properties, + * resource/gnu/java/locale/LocaleInformation_id.properties, + * resource/gnu/java/locale/LocaleInformation_is.properties, + * resource/gnu/java/locale/LocaleInformation_it.properties, + * resource/gnu/java/locale/LocaleInformation_it_CH.properties, + * resource/gnu/java/locale/LocaleInformation_ja.properties, + * resource/gnu/java/locale/LocaleInformation_ka.properties, + * resource/gnu/java/locale/LocaleInformation_kk.properties, + * resource/gnu/java/locale/LocaleInformation_kl.properties, + * resource/gnu/java/locale/LocaleInformation_km.properties, + * resource/gnu/java/locale/LocaleInformation_kn.properties, + * resource/gnu/java/locale/LocaleInformation_ko.properties, + * resource/gnu/java/locale/LocaleInformation_kok.properties, + * resource/gnu/java/locale/LocaleInformation_ku.properties, + * resource/gnu/java/locale/LocaleInformation_kw.properties, + * resource/gnu/java/locale/LocaleInformation_ky.properties, + * resource/gnu/java/locale/LocaleInformation_ln.properties, + * resource/gnu/java/locale/LocaleInformation_lo.properties, + * resource/gnu/java/locale/LocaleInformation_lt.properties, + * resource/gnu/java/locale/LocaleInformation_lv.properties, + * resource/gnu/java/locale/LocaleInformation_mk.properties, + * resource/gnu/java/locale/LocaleInformation_ml.properties, + * resource/gnu/java/locale/LocaleInformation_mn.properties, + * resource/gnu/java/locale/LocaleInformation_mr.properties, + * resource/gnu/java/locale/LocaleInformation_ms.properties, + * resource/gnu/java/locale/LocaleInformation_ms_BN.properties, + * resource/gnu/java/locale/LocaleInformation_mt.properties, + * resource/gnu/java/locale/LocaleInformation_my.properties, + * resource/gnu/java/locale/LocaleInformation_nb.properties, + * resource/gnu/java/locale/LocaleInformation_ne.properties, + * resource/gnu/java/locale/LocaleInformation_nl.properties, + * resource/gnu/java/locale/LocaleInformation_nl_BE.properties, + * resource/gnu/java/locale/LocaleInformation_nn.properties, + * resource/gnu/java/locale/LocaleInformation_nr.properties, + * resource/gnu/java/locale/LocaleInformation_nso.properties, + * resource/gnu/java/locale/LocaleInformation_om.properties, + * resource/gnu/java/locale/LocaleInformation_or.properties, + * resource/gnu/java/locale/LocaleInformation_pa.properties, + * resource/gnu/java/locale/LocaleInformation_pa_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_pl.properties, + * resource/gnu/java/locale/LocaleInformation_ps.properties, + * resource/gnu/java/locale/LocaleInformation_pt.properties, + * resource/gnu/java/locale/LocaleInformation_pt_PT.properties, + * resource/gnu/java/locale/LocaleInformation_ro.properties, + * resource/gnu/java/locale/LocaleInformation_ru.properties, + * resource/gnu/java/locale/LocaleInformation_ru_UA.properties, + * resource/gnu/java/locale/LocaleInformation_sa.properties, + * resource/gnu/java/locale/LocaleInformation_se.properties, + * resource/gnu/java/locale/LocaleInformation_se_FI.properties, + * resource/gnu/java/locale/LocaleInformation_sk.properties, + * resource/gnu/java/locale/LocaleInformation_sl.properties, + * resource/gnu/java/locale/LocaleInformation_so.properties, + * resource/gnu/java/locale/LocaleInformation_sq.properties, + * resource/gnu/java/locale/LocaleInformation_sr.properties, + * resource/gnu/java/locale/LocaleInformation_sr_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_sr_ME_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_ss.properties, + * resource/gnu/java/locale/LocaleInformation_st.properties, + * resource/gnu/java/locale/LocaleInformation_sv.properties, + * resource/gnu/java/locale/LocaleInformation_sv_FI.properties, + * resource/gnu/java/locale/LocaleInformation_sw.properties, + * resource/gnu/java/locale/LocaleInformation_syr.properties, + * resource/gnu/java/locale/LocaleInformation_ta.properties, + * resource/gnu/java/locale/LocaleInformation_te.properties, + * resource/gnu/java/locale/LocaleInformation_tg.properties, + * resource/gnu/java/locale/LocaleInformation_th.properties, + * resource/gnu/java/locale/LocaleInformation_ti.properties, + * resource/gnu/java/locale/LocaleInformation_tig.properties, + * resource/gnu/java/locale/LocaleInformation_tn.properties, + * resource/gnu/java/locale/LocaleInformation_to.properties, + * resource/gnu/java/locale/LocaleInformation_tr.properties, + * resource/gnu/java/locale/LocaleInformation_ts.properties, + * resource/gnu/java/locale/LocaleInformation_tt.properties, + * resource/gnu/java/locale/LocaleInformation_uk.properties, + * resource/gnu/java/locale/LocaleInformation_ur.properties, + * resource/gnu/java/locale/LocaleInformation_uz.properties, + * resource/gnu/java/locale/LocaleInformation_uz_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_uz_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_ve.properties, + * resource/gnu/java/locale/LocaleInformation_vi.properties, + * resource/gnu/java/locale/LocaleInformation_wal.properties, + * resource/gnu/java/locale/LocaleInformation_xh.properties, + * resource/gnu/java/locale/LocaleInformation_yo.properties, + * resource/gnu/java/locale/LocaleInformation_zh.properties, + * resource/gnu/java/locale/LocaleInformation_zh_HK_Hant.properties, + * resource/gnu/java/locale/LocaleInformation_zh_Hant.properties, + * resource/gnu/java/locale/LocaleInformation_zh_MO_Hant.properties, + * resource/gnu/java/locale/LocaleInformation_zh_SG_Hans.properties, + * resource/gnu/java/locale/LocaleInformation_zu.properties, + * resource/java/util/iso4217.properties: + Regenerated from CLDR 1.6.0. + * resource/gnu/java/locale/LocaleInformation_en_Dsrt.properties, + * resource/gnu/java/locale/LocaleInformation_en_Shaw.properties, + * resource/gnu/java/locale/LocaleInformation_ku_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_trv.properties, + * resource/gnu/java/locale/LocaleInformation_si.properties, + * resource/gnu/java/locale/LocaleInformation_ur_IN.properties: + New files from CLDR 1.6.0. + +2008-07-06 Andrew John Hughes + + * resource/gnu/java/locale/LocaleInformation.properties, + * resource/gnu/java/locale/LocaleInformation_aa.properties, + * resource/gnu/java/locale/LocaleInformation_aa_DJ.properties, + * resource/gnu/java/locale/LocaleInformation_aa_ER_SAAHO.properties, + * resource/gnu/java/locale/LocaleInformation_af.properties, + * resource/gnu/java/locale/LocaleInformation_ak.properties, + * resource/gnu/java/locale/LocaleInformation_am.properties, + * resource/gnu/java/locale/LocaleInformation_ar.properties, + * resource/gnu/java/locale/LocaleInformation_ar_JO.properties, + * resource/gnu/java/locale/LocaleInformation_ar_LB.properties, + * resource/gnu/java/locale/LocaleInformation_ar_QA.properties, + * resource/gnu/java/locale/LocaleInformation_ar_SA.properties, + * resource/gnu/java/locale/LocaleInformation_ar_SY.properties, + * resource/gnu/java/locale/LocaleInformation_ar_TN.properties, + * resource/gnu/java/locale/LocaleInformation_ar_YE.properties, + * resource/gnu/java/locale/LocaleInformation_as.properties, + * resource/gnu/java/locale/LocaleInformation_az.properties, + * resource/gnu/java/locale/LocaleInformation_az_Cyrl.properties, + * resource/gnu/java/locale/LocaleInformation_be.properties, + * resource/gnu/java/locale/LocaleInformation_bg.properties, + * resource/gnu/java/locale/LocaleInformation_bn.properties, + * resource/gnu/java/locale/LocaleInformation_bo.properties, + * resource/gnu/java/locale/LocaleInformation_bs.properties, + * resource/gnu/java/locale/LocaleInformation_byn.properties, + * resource/gnu/java/locale/LocaleInformation_ca.properties, + * resource/gnu/java/locale/LocaleInformation_cch.properties, + * resource/gnu/java/locale/LocaleInformation_cop.properties, + * resource/gnu/java/locale/LocaleInformation_cs.properties, + * resource/gnu/java/locale/LocaleInformation_cy.properties, + * resource/gnu/java/locale/LocaleInformation_da.properties, + * resource/gnu/java/locale/LocaleInformation_de.properties, + * resource/gnu/java/locale/LocaleInformation_de_AT.properties, + * resource/gnu/java/locale/LocaleInformation_de_BE.properties, + * resource/gnu/java/locale/LocaleInformation_dv.properties, + * resource/gnu/java/locale/LocaleInformation_dz.properties, + * resource/gnu/java/locale/LocaleInformation_ee.properties, + * resource/gnu/java/locale/LocaleInformation_el.properties, + * resource/gnu/java/locale/LocaleInformation_en.properties, + * resource/gnu/java/locale/LocaleInformation_en_IE.properties, + * resource/gnu/java/locale/LocaleInformation_eo.properties, + * resource/gnu/java/locale/LocaleInformation_es.properties, + * resource/gnu/java/locale/LocaleInformation_et.properties, + * resource/gnu/java/locale/LocaleInformation_eu.properties, + * resource/gnu/java/locale/LocaleInformation_fa.properties, + * resource/gnu/java/locale/LocaleInformation_fa_AF.properties, + * resource/gnu/java/locale/LocaleInformation_fi.properties, + * resource/gnu/java/locale/LocaleInformation_fil.properties, + * resource/gnu/java/locale/LocaleInformation_fo.properties, + * resource/gnu/java/locale/LocaleInformation_fr.properties, + * resource/gnu/java/locale/LocaleInformation_fur.properties, + * resource/gnu/java/locale/LocaleInformation_ga.properties, + * resource/gnu/java/locale/LocaleInformation_gaa.properties, + * resource/gnu/java/locale/LocaleInformation_gez.properties, + * resource/gnu/java/locale/LocaleInformation_gl.properties, + * resource/gnu/java/locale/LocaleInformation_gu.properties, + * resource/gnu/java/locale/LocaleInformation_gv.properties, + * resource/gnu/java/locale/LocaleInformation_ha.properties, + * resource/gnu/java/locale/LocaleInformation_ha_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_haw.properties, + * resource/gnu/java/locale/LocaleInformation_he.properties, + * resource/gnu/java/locale/LocaleInformation_hi.properties, + * resource/gnu/java/locale/LocaleInformation_hr.properties, + * resource/gnu/java/locale/LocaleInformation_hu.properties, + * resource/gnu/java/locale/LocaleInformation_hy.properties, + * resource/gnu/java/locale/LocaleInformation_hy_AM_REVISED.properties, + * resource/gnu/java/locale/LocaleInformation_ia.properties, + * resource/gnu/java/locale/LocaleInformation_id.properties, + * resource/gnu/java/locale/LocaleInformation_ig.properties, + * resource/gnu/java/locale/LocaleInformation_ii.properties, + * resource/gnu/java/locale/LocaleInformation_is.properties, + * resource/gnu/java/locale/LocaleInformation_it.properties, + * resource/gnu/java/locale/LocaleInformation_iu.properties, + * resource/gnu/java/locale/LocaleInformation_ja.properties, + * resource/gnu/java/locale/LocaleInformation_ka.properties, + * resource/gnu/java/locale/LocaleInformation_kaj.properties, + * resource/gnu/java/locale/LocaleInformation_kam.properties, + * resource/gnu/java/locale/LocaleInformation_kcg.properties, + * resource/gnu/java/locale/LocaleInformation_kfo.properties, + * resource/gnu/java/locale/LocaleInformation_kk.properties, + * resource/gnu/java/locale/LocaleInformation_kl.properties, + * resource/gnu/java/locale/LocaleInformation_km.properties, + * resource/gnu/java/locale/LocaleInformation_kn.properties, + * resource/gnu/java/locale/LocaleInformation_ko.properties, + * resource/gnu/java/locale/LocaleInformation_kok.properties, + * resource/gnu/java/locale/LocaleInformation_kpe.properties, + * resource/gnu/java/locale/LocaleInformation_ku.properties, + * resource/gnu/java/locale/LocaleInformation_kw.properties, + * resource/gnu/java/locale/LocaleInformation_ky.properties, + * resource/gnu/java/locale/LocaleInformation_ln.properties, + * resource/gnu/java/locale/LocaleInformation_lo.properties, + * resource/gnu/java/locale/LocaleInformation_lt.properties, + * resource/gnu/java/locale/LocaleInformation_lv.properties, + * resource/gnu/java/locale/LocaleInformation_mk.properties, + * resource/gnu/java/locale/LocaleInformation_ml.properties, + * resource/gnu/java/locale/LocaleInformation_mn.properties, + * resource/gnu/java/locale/LocaleInformation_mr.properties, + * resource/gnu/java/locale/LocaleInformation_ms.properties, + * resource/gnu/java/locale/LocaleInformation_mt.properties, + * resource/gnu/java/locale/LocaleInformation_my.properties, + * resource/gnu/java/locale/LocaleInformation_nb.properties, + * resource/gnu/java/locale/LocaleInformation_ne.properties, + * resource/gnu/java/locale/LocaleInformation_nl.properties, + * resource/gnu/java/locale/LocaleInformation_nn.properties, + * resource/gnu/java/locale/LocaleInformation_nr.properties, + * resource/gnu/java/locale/LocaleInformation_nso.properties, + * resource/gnu/java/locale/LocaleInformation_ny.properties, + * resource/gnu/java/locale/LocaleInformation_om.properties, + * resource/gnu/java/locale/LocaleInformation_or.properties, + * resource/gnu/java/locale/LocaleInformation_pa.properties, + * resource/gnu/java/locale/LocaleInformation_pa_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_pl.properties, + * resource/gnu/java/locale/LocaleInformation_ps.properties, + * resource/gnu/java/locale/LocaleInformation_pt.properties, + * resource/gnu/java/locale/LocaleInformation_pt_PT.properties, + * resource/gnu/java/locale/LocaleInformation_ro.properties, + * resource/gnu/java/locale/LocaleInformation_ru.properties, + * resource/gnu/java/locale/LocaleInformation_rw.properties, + * resource/gnu/java/locale/LocaleInformation_sa.properties, + * resource/gnu/java/locale/LocaleInformation_se.properties, + * resource/gnu/java/locale/LocaleInformation_se_FI.properties, + * resource/gnu/java/locale/LocaleInformation_sid.properties, + * resource/gnu/java/locale/LocaleInformation_sk.properties, + * resource/gnu/java/locale/LocaleInformation_sl.properties, + * resource/gnu/java/locale/LocaleInformation_so.properties, + * resource/gnu/java/locale/LocaleInformation_sq.properties, + * resource/gnu/java/locale/LocaleInformation_sr.properties, + * resource/gnu/java/locale/LocaleInformation_sr_BA_Cyrl.properties, + * resource/gnu/java/locale/LocaleInformation_sr_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_ss.properties, + * resource/gnu/java/locale/LocaleInformation_ssy.properties, + * resource/gnu/java/locale/LocaleInformation_st.properties, + * resource/gnu/java/locale/LocaleInformation_sv.properties, + * resource/gnu/java/locale/LocaleInformation_sw.properties, + * resource/gnu/java/locale/LocaleInformation_syr.properties, + * resource/gnu/java/locale/LocaleInformation_ta.properties, + * resource/gnu/java/locale/LocaleInformation_te.properties, + * resource/gnu/java/locale/LocaleInformation_tg.properties, + * resource/gnu/java/locale/LocaleInformation_th.properties, + * resource/gnu/java/locale/LocaleInformation_ti.properties, + * resource/gnu/java/locale/LocaleInformation_ti_ER.properties, + * resource/gnu/java/locale/LocaleInformation_tig.properties, + * resource/gnu/java/locale/LocaleInformation_tn.properties, + * resource/gnu/java/locale/LocaleInformation_to.properties, + * resource/gnu/java/locale/LocaleInformation_tr.properties, + * resource/gnu/java/locale/LocaleInformation_ts.properties, + * resource/gnu/java/locale/LocaleInformation_tt.properties, + * resource/gnu/java/locale/LocaleInformation_ug.properties, + * resource/gnu/java/locale/LocaleInformation_uk.properties, + * resource/gnu/java/locale/LocaleInformation_ur.properties, + * resource/gnu/java/locale/LocaleInformation_uz.properties, + * resource/gnu/java/locale/LocaleInformation_uz_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_uz_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_ve.properties, + * resource/gnu/java/locale/LocaleInformation_vi.properties, + * resource/gnu/java/locale/LocaleInformation_wal.properties, + * resource/gnu/java/locale/LocaleInformation_wo.properties, + * resource/gnu/java/locale/LocaleInformation_xh.properties, + * resource/gnu/java/locale/LocaleInformation_yo.properties, + * resource/gnu/java/locale/LocaleInformation_zh.properties, + * resource/gnu/java/locale/LocaleInformation_zh_Hant.properties, + * resource/gnu/java/locale/LocaleInformation_zu.properties: + Regenerated with Unicode delimiters escaped. + +2008-07-06 Andrew John Hughes + + PR classpath/36653: + * doc/www.gnu.org/downloads/downloads.wml: + Add 0.97.2 to download list. + +2008-07-06 Andrew John Hughes + + * java/util/ResourceBundle.java, + (BundleKey.toString()): Implemented. + (clearCache()): Implemented. + (clearCache(ClassLoader)): Implemented. + +2008-07-06 Andrew John Hughes + + * java/util/ResourceBundle.java: + Fix generic warnings. + +2008-07-06 Andrew John Hughes + + * java/util/Properties.java: + (load(Reader)): Implemented. + (load(InputStream)): Fixed to use load(Reader). + * java/util/PropertyResourceBundle.java: + (PropertyResourceBundle(Reader)): Implemented. + +2008-07-03 Andrew John Hughes + + * resource/gnu/java/locale/LocaleInformation.properties, + * resource/gnu/java/locale/LocaleInformation_aa.properties, + * resource/gnu/java/locale/LocaleInformation_aa_DJ.properties, + * resource/gnu/java/locale/LocaleInformation_aa_ER.properties, + * resource/gnu/java/locale/LocaleInformation_aa_ER_SAAHO.properties, + * resource/gnu/java/locale/LocaleInformation_af.properties, + * resource/gnu/java/locale/LocaleInformation_am.properties, + * resource/gnu/java/locale/LocaleInformation_ar.properties, + * resource/gnu/java/locale/LocaleInformation_ar_JO.properties, + * resource/gnu/java/locale/LocaleInformation_ar_LB.properties, + * resource/gnu/java/locale/LocaleInformation_ar_QA.properties, + * resource/gnu/java/locale/LocaleInformation_ar_SA.properties, + * resource/gnu/java/locale/LocaleInformation_ar_SY.properties, + * resource/gnu/java/locale/LocaleInformation_ar_TN.properties, + * resource/gnu/java/locale/LocaleInformation_ar_YE.properties, + * resource/gnu/java/locale/LocaleInformation_as.properties, + * resource/gnu/java/locale/LocaleInformation_az.properties, + * resource/gnu/java/locale/LocaleInformation_az_Cyrl.properties, + * resource/gnu/java/locale/LocaleInformation_be.properties, + * resource/gnu/java/locale/LocaleInformation_bg.properties, + * resource/gnu/java/locale/LocaleInformation_bn.properties, + * resource/gnu/java/locale/LocaleInformation_bn_IN.properties, + * resource/gnu/java/locale/LocaleInformation_bs.properties, + * resource/gnu/java/locale/LocaleInformation_byn.properties, + * resource/gnu/java/locale/LocaleInformation_ca.properties, + * resource/gnu/java/locale/LocaleInformation_cs.properties, + * resource/gnu/java/locale/LocaleInformation_cy.properties, + * resource/gnu/java/locale/LocaleInformation_da.properties, + * resource/gnu/java/locale/LocaleInformation_de.properties, + * resource/gnu/java/locale/LocaleInformation_de_AT.properties, + * resource/gnu/java/locale/LocaleInformation_de_BE.properties, + * resource/gnu/java/locale/LocaleInformation_de_CH.properties, + * resource/gnu/java/locale/LocaleInformation_de_LI.properties, + * resource/gnu/java/locale/LocaleInformation_de_LU.properties, + * resource/gnu/java/locale/LocaleInformation_dv.properties, + * resource/gnu/java/locale/LocaleInformation_dz.properties, + * resource/gnu/java/locale/LocaleInformation_el.properties, + * resource/gnu/java/locale/LocaleInformation_en.properties, + * resource/gnu/java/locale/LocaleInformation_en_AU.properties, + * resource/gnu/java/locale/LocaleInformation_en_BE.properties, + * resource/gnu/java/locale/LocaleInformation_en_BW.properties, + * resource/gnu/java/locale/LocaleInformation_en_BZ.properties, + * resource/gnu/java/locale/LocaleInformation_en_CA.properties, + * resource/gnu/java/locale/LocaleInformation_en_GB.properties, + * resource/gnu/java/locale/LocaleInformation_en_HK.properties, + * resource/gnu/java/locale/LocaleInformation_en_IE.properties, + * resource/gnu/java/locale/LocaleInformation_en_IN.properties, + * resource/gnu/java/locale/LocaleInformation_en_MT.properties, + * resource/gnu/java/locale/LocaleInformation_en_NZ.properties, + * resource/gnu/java/locale/LocaleInformation_en_PH.properties, + * resource/gnu/java/locale/LocaleInformation_en_SG.properties, + * resource/gnu/java/locale/LocaleInformation_en_TT.properties, + * resource/gnu/java/locale/LocaleInformation_en_US_POSIX.properties, + * resource/gnu/java/locale/LocaleInformation_en_ZA.properties, + * resource/gnu/java/locale/LocaleInformation_en_ZW.properties, + * resource/gnu/java/locale/LocaleInformation_eo.properties, + * resource/gnu/java/locale/LocaleInformation_es.properties, + * resource/gnu/java/locale/LocaleInformation_es_AR.properties, + * resource/gnu/java/locale/LocaleInformation_es_CL.properties, + * resource/gnu/java/locale/LocaleInformation_es_CO.properties, + * resource/gnu/java/locale/LocaleInformation_es_DO.properties, + * resource/gnu/java/locale/LocaleInformation_es_EC.properties, + * resource/gnu/java/locale/LocaleInformation_es_ES.properties, + * resource/gnu/java/locale/LocaleInformation_es_GT.properties, + * resource/gnu/java/locale/LocaleInformation_es_HN.properties, + * resource/gnu/java/locale/LocaleInformation_es_MX.properties, + * resource/gnu/java/locale/LocaleInformation_es_NI.properties, + * resource/gnu/java/locale/LocaleInformation_es_PA.properties, + * resource/gnu/java/locale/LocaleInformation_es_PE.properties, + * resource/gnu/java/locale/LocaleInformation_es_PR.properties, + * resource/gnu/java/locale/LocaleInformation_es_PY.properties, + * resource/gnu/java/locale/LocaleInformation_es_SV.properties, + * resource/gnu/java/locale/LocaleInformation_es_US.properties, + * resource/gnu/java/locale/LocaleInformation_es_UY.properties, + * resource/gnu/java/locale/LocaleInformation_es_VE.properties, + * resource/gnu/java/locale/LocaleInformation_et.properties, + * resource/gnu/java/locale/LocaleInformation_eu.properties, + * resource/gnu/java/locale/LocaleInformation_fa.properties, + * resource/gnu/java/locale/LocaleInformation_fa_AF.properties, + * resource/gnu/java/locale/LocaleInformation_fi.properties, + * resource/gnu/java/locale/LocaleInformation_fo.properties, + * resource/gnu/java/locale/LocaleInformation_fr.properties, + * resource/gnu/java/locale/LocaleInformation_fr_BE.properties, + * resource/gnu/java/locale/LocaleInformation_fr_CA.properties, + * resource/gnu/java/locale/LocaleInformation_fr_CH.properties, + * resource/gnu/java/locale/LocaleInformation_ga.properties, + * resource/gnu/java/locale/LocaleInformation_gez.properties, + * resource/gnu/java/locale/LocaleInformation_gez_ET.properties, + * resource/gnu/java/locale/LocaleInformation_gl.properties, + * resource/gnu/java/locale/LocaleInformation_gu.properties, + * resource/gnu/java/locale/LocaleInformation_gv.properties, + * resource/gnu/java/locale/LocaleInformation_haw.properties, + * resource/gnu/java/locale/LocaleInformation_he.properties, + * resource/gnu/java/locale/LocaleInformation_hi.properties, + * resource/gnu/java/locale/LocaleInformation_hr.properties, + * resource/gnu/java/locale/LocaleInformation_hu.properties, + * resource/gnu/java/locale/LocaleInformation_hy.properties, + * resource/gnu/java/locale/LocaleInformation_hy_AM_REVISED.properties, + * resource/gnu/java/locale/LocaleInformation_id.properties, + * resource/gnu/java/locale/LocaleInformation_is.properties, + * resource/gnu/java/locale/LocaleInformation_it.properties, + * resource/gnu/java/locale/LocaleInformation_it_CH.properties, + * resource/gnu/java/locale/LocaleInformation_iu.properties, + * resource/gnu/java/locale/LocaleInformation_ja.properties, + * resource/gnu/java/locale/LocaleInformation_ka.properties, + * resource/gnu/java/locale/LocaleInformation_kk.properties, + * resource/gnu/java/locale/LocaleInformation_kl.properties, + * resource/gnu/java/locale/LocaleInformation_km.properties, + * resource/gnu/java/locale/LocaleInformation_kn.properties, + * resource/gnu/java/locale/LocaleInformation_ko.properties, + * resource/gnu/java/locale/LocaleInformation_kok.properties, + * resource/gnu/java/locale/LocaleInformation_kw.properties, + * resource/gnu/java/locale/LocaleInformation_ky.properties, + * resource/gnu/java/locale/LocaleInformation_lo.properties, + * resource/gnu/java/locale/LocaleInformation_lt.properties, + * resource/gnu/java/locale/LocaleInformation_lv.properties, + * resource/gnu/java/locale/LocaleInformation_mk.properties, + * resource/gnu/java/locale/LocaleInformation_ml.properties, + * resource/gnu/java/locale/LocaleInformation_mn.properties, + * resource/gnu/java/locale/LocaleInformation_mr.properties, + * resource/gnu/java/locale/LocaleInformation_ms.properties, + * resource/gnu/java/locale/LocaleInformation_ms_BN.properties, + * resource/gnu/java/locale/LocaleInformation_mt.properties, + * resource/gnu/java/locale/LocaleInformation_nb.properties, + * resource/gnu/java/locale/LocaleInformation_nl.properties, + * resource/gnu/java/locale/LocaleInformation_nl_BE.properties, + * resource/gnu/java/locale/LocaleInformation_nn.properties, + * resource/gnu/java/locale/LocaleInformation_om.properties, + * resource/gnu/java/locale/LocaleInformation_om_KE.properties, + * resource/gnu/java/locale/LocaleInformation_or.properties, + * resource/gnu/java/locale/LocaleInformation_pa.properties, + * resource/gnu/java/locale/LocaleInformation_pl.properties, + * resource/gnu/java/locale/LocaleInformation_ps.properties, + * resource/gnu/java/locale/LocaleInformation_pt.properties, + * resource/gnu/java/locale/LocaleInformation_pt_PT.properties, + * resource/gnu/java/locale/LocaleInformation_ro.properties, + * resource/gnu/java/locale/LocaleInformation_ru.properties, + * resource/gnu/java/locale/LocaleInformation_ru_UA.properties, + * resource/gnu/java/locale/LocaleInformation_sa.properties, + * resource/gnu/java/locale/LocaleInformation_sid.properties, + * resource/gnu/java/locale/LocaleInformation_sk.properties, + * resource/gnu/java/locale/LocaleInformation_sl.properties, + * resource/gnu/java/locale/LocaleInformation_so.properties, + * resource/gnu/java/locale/LocaleInformation_so_DJ.properties, + * resource/gnu/java/locale/LocaleInformation_so_ET.properties, + * resource/gnu/java/locale/LocaleInformation_so_KE.properties, + * resource/gnu/java/locale/LocaleInformation_sq.properties, + * resource/gnu/java/locale/LocaleInformation_sr.properties, + * resource/gnu/java/locale/LocaleInformation_sr_BA_Cyrl.properties, + * resource/gnu/java/locale/LocaleInformation_sr_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_sv.properties, + * resource/gnu/java/locale/LocaleInformation_sv_FI.properties, + * resource/gnu/java/locale/LocaleInformation_sw.properties, + * resource/gnu/java/locale/LocaleInformation_syr.properties, + * resource/gnu/java/locale/LocaleInformation_ta.properties, + * resource/gnu/java/locale/LocaleInformation_te.properties, + * resource/gnu/java/locale/LocaleInformation_th.properties, + * resource/gnu/java/locale/LocaleInformation_ti.properties, + * resource/gnu/java/locale/LocaleInformation_ti_ER.properties, + * resource/gnu/java/locale/LocaleInformation_tig.properties, + * resource/gnu/java/locale/LocaleInformation_tr.properties, + * resource/gnu/java/locale/LocaleInformation_tt.properties, + * resource/gnu/java/locale/LocaleInformation_uk.properties, + * resource/gnu/java/locale/LocaleInformation_ur.properties, + * resource/gnu/java/locale/LocaleInformation_uz.properties, + * resource/gnu/java/locale/LocaleInformation_uz_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_uz_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_vi.properties, + * resource/gnu/java/locale/LocaleInformation_wal.properties, + * resource/gnu/java/locale/LocaleInformation_zh.properties, + * resource/gnu/java/locale/LocaleInformation_zh_HK_Hant.properties, + * resource/gnu/java/locale/LocaleInformation_zh_Hant.properties, + * resource/gnu/java/locale/LocaleInformation_zh_MO_Hant.properties, + * resource/gnu/java/locale/LocaleInformation_zh_SG_Hans.properties: + Regenerated from CLDR 1.5.1 data. + * resource/gnu/java/locale/LocaleInformation_af_NA.properties, + * resource/gnu/java/locale/LocaleInformation_ak.properties, + * resource/gnu/java/locale/LocaleInformation_bo.properties, + * resource/gnu/java/locale/LocaleInformation_cch.properties, + * resource/gnu/java/locale/LocaleInformation_cop.properties, + * resource/gnu/java/locale/LocaleInformation_ee.properties, + * resource/gnu/java/locale/LocaleInformation_en_JM.properties, + * resource/gnu/java/locale/LocaleInformation_en_NA.properties, + * resource/gnu/java/locale/LocaleInformation_fil.properties, + * resource/gnu/java/locale/LocaleInformation_fur.properties, + * resource/gnu/java/locale/LocaleInformation_gaa.properties, + * resource/gnu/java/locale/LocaleInformation_ha.properties, + * resource/gnu/java/locale/LocaleInformation_ha_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_ia.properties, + * resource/gnu/java/locale/LocaleInformation_ig.properties, + * resource/gnu/java/locale/LocaleInformation_ii.properties, + * resource/gnu/java/locale/LocaleInformation_kaj.properties, + * resource/gnu/java/locale/LocaleInformation_kam.properties + * resource/gnu/java/locale/LocaleInformation_kcg.properties, + * resource/gnu/java/locale/LocaleInformation_kfo.properties, + * resource/gnu/java/locale/LocaleInformation_kpe.properties, + * resource/gnu/java/locale/LocaleInformation_ku.properties, + * resource/gnu/java/locale/LocaleInformation_ku_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_ln.properties, + * resource/gnu/java/locale/LocaleInformation_my.properties, + * resource/gnu/java/locale/LocaleInformation_ne.properties, + * resource/gnu/java/locale/LocaleInformation_nr.properties, + * resource/gnu/java/locale/LocaleInformation_nso.properties, + * resource/gnu/java/locale/LocaleInformation_ny.properties, + * resource/gnu/java/locale/LocaleInformation_pa_Arab.properties, + * resource/gnu/java/locale/LocaleInformation_rw.properties, + * resource/gnu/java/locale/LocaleInformation_se.properties, + * resource/gnu/java/locale/LocaleInformation_se_FI.properties, + * resource/gnu/java/locale/LocaleInformation_sr_ME_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_sr_RS_Latn.properties, + * resource/gnu/java/locale/LocaleInformation_ss.properties, + * resource/gnu/java/locale/LocaleInformation_ssy.properties, + * resource/gnu/java/locale/LocaleInformation_st.properties, + * resource/gnu/java/locale/LocaleInformation_tg.properties, + * resource/gnu/java/locale/LocaleInformation_tn.properties, + * resource/gnu/java/locale/LocaleInformation_to.properties + * resource/gnu/java/locale/LocaleInformation_ts.properties, + * resource/gnu/java/locale/LocaleInformation_ug.properties, + * resource/gnu/java/locale/LocaleInformation_ve.properties, + * resource/gnu/java/locale/LocaleInformation_wo.properties, + * resource/gnu/java/locale/LocaleInformation_xh.properties, + * resource/gnu/java/locale/LocaleInformation_yo.properties, + * resource/gnu/java/locale/LocaleInformation_zu.properties: + New files from CLDR 1.5.1. + +2008-07-01 Christian Thalinger + + * java/lang/Integer.java (signum): Implemented properly as + described in Hacker's Delight Section 2-7, plus Andrew Haley's + explanation. + +2008-07-01 Andrew Haley + + * java/lang/Long.java: Comment change only. + +2008-07-01 Christian Thalinger + + * java/lang/Long.java (signum): Implemented properly as described + in Hacker's Delight Section 2-7. + +2008-06-30 Andrew John Hughes + + PR classpath/35237: + * resource/java/util/iso4217.properties: + Regenerated from CLDR 1.5.1 data. + +2008-06-28 Andrew John Hughes + + PR classpath/36636: + * tools/gnu/classpath/tools/jar/Updater.java: + (run(Main)): Check return value of renameTo, and + create temporary file in same directory (as suggested + by Tom Tromey). + (copyFile(File,File)): Removed. + +2008-06-27 Andrew John Hughes + + PR classpath/36637: + * examples/Makefile.am, + * lib/Makefile.am: + Use new conditional and $(JAR). + * m4/acinclude.m4: + Replace --with-fastjar with a general + --with-jar check that can be turned off. + * tools/Makefile.am: + Use new conditional and $(JAR). + +2008-06-26 Andrew John Hughes + + PR classpath/36636: + * tools/gnu/classpath/tools/jar/Updater.java: + (run(Main)): Check return value of renameTo, and + copy file instead if necessary. + (copyFile(File,File)): New method to copy a file. + +2008-06-26 Andrew John Hughes + + * configure.ac: Remove AC_PROG_MKDIR_P. + * examples/Makefile.am, + * lib/Makefile.am, + * tools/Makefile.am: + Use mkdir_p instead of MKDIR_P. + +2008-06-25 Andrew John Hughes + + PR classpath/36221: + * gnu/xml/dom/DomAttr.java: + (DomAttr(DomDocument,String,String,String,String)): + New constructor. + * gnu/xml/dom/DomDocument.java: + (createElement(String)): Use new constructor rather than + setting variable directly. + (createAttribute(String)): Likewise. + * gnu/xml/dom/DomElement.java: + (DomElement(DomDocument,String,String,String,String)): + New constructor. + * gnu/xml/dom/DomNsNode.java: + (localName): Make private. + (DomNsNode(short,DomDocument,String,String,String,String)): + New constructor. + * gnu/xml/dom/ls/DomLSParser.java: + (doParse(LSInput)): Set namespace awareness using a method, + not directly. + * gnu/xml/dom/ls/SAXEventSink.java: + (namespaceAware): Make private. + (setNamespaceAware(boolean)): New method. + * gnu/xml/transform/XSLURIResolver.java: + (parse(InputSource,XMLReader)): Parse with namespace awareness on. + +2008-06-24 Tom Tromey + + PR libgcj/32198: + * tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java + (compile): Reverse isAssignableFrom test. + +2008-06-23 Andrew John Hughes + + PR classpath/36219: + * gnu/xml/transform/ForEachNode.java: + Genericised. + * gnu/xml/transform/SortKey.java: + Documented. + (clone(Stylesheet)): Implemented. + (cloneAttributeValueTemplate(TemplateNode,Stylesheet)): + Implemented. + * gnu/xml/transform/Stylesheet.java: + (parseSortKeys(Node)): Return empty list not null. + * gnu/xml/transform/TemplateNode.java: + Genericise documentOrderComparator. + +2008-06-23 Andrew John Hughes + + * gnu/xml/xpath/CountFunction.java, + * gnu/xml/xpath/EqualityExpr.java, + * gnu/xml/xpath/Expr.java, + * gnu/xml/xpath/IdFunction.java, + * gnu/xml/xpath/LocalNameFunction.java, + * gnu/xml/xpath/NameFunction.java, + * gnu/xml/xpath/NamespaceUriFunction.java, + * gnu/xml/xpath/ParenthesizedExpr.java, + * gnu/xml/xpath/Steps.java, + * gnu/xml/xpath/SumFunction.java, + * gnu/xml/xpath/UnionExpr.java, + * gnu/xml/xpath/XPathParser.java, + * gnu/xml/xpath/XPathParser.y, + * java/lang/Enum.java, + * java/lang/reflect/Constructor.java, + * java/lang/reflect/Field.java, + * java/lang/reflect/Method.java: + Reduce scope of unchecked warning suppression, + and remove unneeded uses. + +2008-06-23 Christian Thalinger + + * include/jni.h [__cplusplus] (_Jv_JNIEnv): Renamed member p to + functions to be compatible with OpenJDK. + +2008-06-23 Andrew John Hughes + + PR classpath/36220: + * gnu/xml/transform/CallTemplateNode.java: + (doApply(Stylesheet,QName,Node,int,int,Node,Node)): + Check for withParams being empty not null. + (references(QName)): Remove special-casing for null. + * gnu/xml/transform/Stylesheet.java: + (parseWithParams(Node)): Just return the list if empty, + don't return null instead. + +2008-06-23 Andrew Haley * native/jawt/Makefile.am, native/fdlibm/Makefile.am, @@ -26,57 +1425,341 @@ * lib/Makefile.am (resources): Add .svn. +2008-06-23 Andrew John Hughes + + * gnu/xml/transform/ParameterNode.java, + * gnu/xml/transform/Stylesheet.java, + * gnu/xml/transform/UnparsedEntityUriFunction.java, + * gnu/xml/transform/ValueOfNode.java, + * gnu/xml/transform/XSLComparator.java, + * gnu/xml/transform/XSLURIResolver.java: + Genericised. + +2008-06-22 Andrew John Hughes + + * gnu/xml/xpath/ContainsFunction.java, + * gnu/xml/xpath/CountFunction.java, + * gnu/xml/xpath/EqualityExpr.java, + * gnu/xml/xpath/Expr.java, + * gnu/xml/xpath/IdFunction.java, + * gnu/xml/xpath/LocalNameFunction.java, + * gnu/xml/xpath/NameFunction.java, + * gnu/xml/xpath/ParenthesizedExpr.java: + Genericised. + +2008-06-22 Andrew John Hughes + + * gnu/xml/xpath/Expr.java, + * gnu/xml/xpath/FloorFunction.java, + * gnu/xml/xpath/Function.java, + * gnu/xml/xpath/FunctionCall.java, + * gnu/xml/xpath/NamespaceUriFunction.java, + * gnu/xml/xpath/ParenthesizedExpr.java, + * gnu/xml/xpath/Root.java, + * gnu/xml/xpath/Selector.java, + * gnu/xml/xpath/Steps.java: + Genericised. + +2008-06-22 Andrew John Hughes + + * gnu/xml/xpath/BooleanFunction.java, + * gnu/xml/xpath/CeilingFunction.java, + * gnu/xml/xpath/ConcatFunction.java, + * gnu/xml/xpath/DocumentOrderComparator.java, + * gnu/xml/xpath/Expr.java, + * gnu/xml/xpath/IdFunction.java, + * gnu/xml/xpath/LangFunction.java, + * gnu/xml/xpath/LocalNameFunction.java, + * gnu/xml/xpath/NameFunction.java, + * gnu/xml/xpath/NormalizeSpaceFunction.java, + * gnu/xml/xpath/NotFunction.java, + * gnu/xml/xpath/NumberFunction.java, + * gnu/xml/xpath/Path.java, + * gnu/xml/xpath/RoundFunction.java, + * gnu/xml/xpath/Selector.java, + * gnu/xml/xpath/StartsWithFunction.java, + * gnu/xml/xpath/Steps.java, + * gnu/xml/xpath/StringFunction.java, + * gnu/xml/xpath/StringLengthFunction.java, + * gnu/xml/xpath/SubstringAfterFunction.java, + * gnu/xml/xpath/SubstringBeforeFunction.java, + * gnu/xml/xpath/SubstringFunction.java, + * gnu/xml/xpath/SumFunction.java, + * gnu/xml/xpath/TranslateFunction.java, + * gnu/xml/xpath/UnionExpr.java, + * gnu/xml/xpath/XPathParser.java, + * gnu/xml/xpath/XPathParser.y, + * gnu/xml/xpath/XPathTokenizer.java: + Genericised. + * javax/xml/datatype/DatatypeFactory.java: + Use new java.util.ServiceLoader framework. + * javax/xml/namespace/NamespaceContext.java, + * javax/xml/parsers/DocumentBuilderFactory.java, + * javax/xml/parsers/SAXParserFactory.java, + * javax/xml/stream/XMLEventFactory.java, + * javax/xml/stream/XMLEventReader.java, + * javax/xml/stream/XMLInputFactory.java, + * javax/xml/stream/XMLOutputFactory.java: + Genericised. + * javax/xml/stream/events/DTD.java, + * javax/xml/stream/events/EndElement.java, + * javax/xml/stream/events/StartElement.java: + Ignore unchecked errors due to API not using generics. + * javax/xml/transform/TransformerFactory.java, + * javax/xml/validation/SchemaFactory.java, + * javax/xml/xpath/XPathFactory.java: + Genericised. + * javax/xml/xpath/XPathFunction.java: + Ignore unchecked errors due to API not using generics. + +2008-06-22 Andrew John Hughes + + PR classpath/36220: + * gnu/xml/transform/ParameterNode.java: + (clone()): Only clone select if not null. + (toString()): Always include value of select. + * gnu/xml/transform/Stylesheet.java: + (toString()): Implemented. + * gnu/xml/transform/Template.java: + (toString()): Add value of node. + * gnu/xml/transform/TemplatesImpl.java: + (toString()): Implemented. + +2008-06-22 Andrew John Hughes + + PR classpath/28664: + * gnu/java/math/GMP.java: + Renamed from VMBigInteger.java and fixed to use + GMP instances directly. + * include/Makefile.am: + Generate GMP.h not VMBigInteger.h. + * java/math/BigInteger.java: + Send instances of GMP in calls to GMP rather than + the wrapping BigInteger class. + * native/jni/java-math/Makefile.am: + Fix filename of source code file. + * native/jni/java-math/gnu_java_math_GMP.c: + Renamed from java_math_VMBigInteger.c. + * native/jni/java-math/java_math_VMBigInteger.c, + * vm/reference/java/math/VMBigInteger.java: + Removed. + +2008-06-21 Andrew John Hughes + + * configure.ac: + Remove --with-vm option, instead relying + on AC_PROG_JAVA. Only call this if tools + are enabled. + * tools/gappletviewer.in, + * tools/gjar.in, + * tools/gjarsigner.in, + * tools/gjavah.in, + * tools/gjdoc.in, + * tools/gkeytool.in, + * tools/gnative2ascii.in, + * tools/gorbd.in, + * tools/grmic.in, + * tools/grmid.in, + * tools/grmiregistry.in, + * tools/gserialver.in, + * tools/gtnameserv.in: + Regenerated with @JAVA@ and -classpath option. + +2008-06-21 Andrew John Hughes + + * m4/ac_prog_java.m4: + Add CACAO and JamVM. + * m4/ac_prog_javac.m4: + Use variables to store warning options. + +2008-06-17 Andrew John Hughes + + * javax/management/ObjectName.java, + * javax/management/StandardMBean.java: + Fix warnings due to use of generics. + 2008-06-18 Ralf Wildenhues * native/fdlibm/dtoa.c: include stdlib.h, for 'free'. -2008-06-17 Ralf Wildenhues +2008-06-16 Andrew John Hughes + + * javax/management/openmbean/ArrayType.java, + * javax/management/openmbean/CompositeDataSupport.java, + * javax/management/openmbean/CompositeType.java, + * javax/management/openmbean/OpenMBeanAttributeInfoSupport.java, + * javax/management/openmbean/OpenMBeanInfoSupport.java, + * javax/management/openmbean/OpenMBeanParameterInfoSupport.java, + * javax/management/openmbean/SimpleType.java, + * javax/management/openmbean/TabularDataSupport.java: + Fix warnings due to use of generics. + * javax/management/remote/rmi/RMIConnection.java: + Suppress warnings due to API's use of MarshalledObject. - * Makefile.in: Regenerate. - * configure: Regenerate. - * doc/Makefile.in: Regenerate. - * doc/api/Makefile.in: Regenerate. - * examples/Makefile.in: Regenerate. - * external/Makefile.in: Regenerate. - * external/jsr166/Makefile.in: Regenerate. - * external/relaxngDatatype/Makefile.in: Regenerate. - * external/sax/Makefile.in: Regenerate. - * external/w3c_dom/Makefile.in: Regenerate. - * include/Makefile.in: Regenerate. - * lib/Makefile.in: Regenerate. - * native/Makefile.in: Regenerate. - * native/fdlibm/Makefile.in: Regenerate. - * native/jawt/Makefile.in: Regenerate. - * native/jni/Makefile.in: Regenerate. - * native/jni/classpath/Makefile.in: Regenerate. - * native/jni/gconf-peer/Makefile.in: Regenerate. - * native/jni/gstreamer-peer/Makefile.in: Regenerate. - * native/jni/gtk-peer/Makefile.in: Regenerate. - * native/jni/java-io/Makefile.in: Regenerate. - * native/jni/java-lang/Makefile.in: Regenerate. - * native/jni/java-net/Makefile.in: Regenerate. - * native/jni/java-nio/Makefile.in: Regenerate. - * native/jni/java-util/Makefile.in: Regenerate. - * native/jni/midi-alsa/Makefile.in: Regenerate. - * native/jni/midi-dssi/Makefile.in: Regenerate. - * native/jni/native-lib/Makefile.in: Regenerate. - * native/jni/qt-peer/Makefile.in: Regenerate. - * native/jni/xmlj/Makefile.in: Regenerate. - * native/plugin/Makefile.in: Regenerate. - * resource/Makefile.in: Regenerate. - * scripts/Makefile.in: Regenerate. - * tools/Makefile.in: Regenerate. +2008-06-15 Andrew John Hughes -2008-06-06 Andrew John Hughes + * javax/management/openmbean/TabularDataSupport.java, + * javax/management/openmbean/TabularType.java: + Fix warnings due to use of generics. - * configure.ac: Set version to 0.97.2. - * NEWS: Add 0.97.2. +2008-06-15 Andrew John Hughes -2008-05-10 Andrew John Hughes + PR classpath/36522: + * gnu/java/security/PolicyFile.java: + Correct typo changing seperator to separator. - * vm/reference/gnu/java/lang/management/VMMemoryMXBeanImpl.java: - Remove use of 1.5 language constructs. +2008-06-15 Andrew John Hughes + + PR classpath/36477: + * gnu/java/lang/CPStringBuilder.java, + (setLength(int)): Don't ensure capacity when + new length is 0. + (ensureCapacity(int)): Allocate double the minimum + capacity rather than double the array length when + allocating a new array after a write. + +2008-06-15 Mario Torre + + * gnu/java/awt/java2d/RasterGraphics.java: remove unused import that cause + compilation to fail when xpeers are not enabled. + +2008-06-15 Mario Torre + + * gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): delegate to + setPaint. + (setPaint): fix to set paint context and foreground color. + (imageCache): new field. + (drawImage): new codepath for scaling images. + (prepareImage): new method. + (getPaintContext): set paintContext appropriately. + * gnu/java/awt/java2d/RasterGraphics.java (renderScanline): new method, + override from superclass to detect correct value of y while rendering + the scanline. + * gnu/java/awt/java2d/ScanlineConverter.java (renderShape): revert previous + patch. + * gnu/java/awt/peer/x/XEventPump.java (findMouseEventTarget): new method. + (handleButtonPress): use of findMouseEventTarget to detect the correct + target. + (handleButtonRelease): likewise. + * gnu/java/awt/peer/x/XGraphics2D.java (rawDrawImage): clip the target image + so that it is completely contained in the destination pixmaps, as per X11 + specification. + * gnu/java/awt/peer/x/XToolkit.java (createTextField): method implemented. + (createButton): likewise. + (prepareImage): likewise. + (createLabel): likewise. + (checkImage): likewise. + (createTextArea): likewise. + (createCheckbox): likewise. + (checkHeadLess): new method. + * gnu/javax/imageio/bmp/BMPImageWriter.java (write): + don't close the stream. + * gnu/javax/imageio/bmp/BMPImageWriterSpi.java (names): added new names to + the list of known names for BMP. + * java/awt/image/WritableRaster.java (createWritableTranslatedChild): + * javax/imageio/ImageIO.java (write): call dispose on ImageWriter after + writing of the image. + +2008-06-15 Tom Tromey + + * include/jni.h (_jobjectRefType, jobjectRefType): Always + declare. + +2008-06-13 Andrew John Hughes + * configure.ac: + Add --enable-gjdoc option and check + for mkdir -p. + * examples/Makefile.am, + * lib/Makefile.am, + * lib/copy-vmresources.sh.in: + Use @MKDIR_P@. + * tools/Makefile.am: + Allow building GJDoc to be disabled + and use @MKDIR_P@. + +2008-06-13 Mark Wielaard + + * tools/Makefile.am (USE_JAVAC_FLAGS): Use relative generated dir. + (TOOLS_ZIP): Generate antlr output in relative dir. + +2008-06-13 Mark Wielaard + + * tools/Makefile.am (USE_JAVAC_FLAGS): Use generated in builddir. + (TOOLS_JAVA_FILES): Include all .java files in all subdirs. + (ALL_TOOLS_FILES): Include gjdoc_resources and antlr input file. + (TOOLS_ZIP): Generate antlr output in builddir. + * tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/inherit.png: + New file from gjdoc. + +2008-06-05 Andrew John Hughes + + * configure.ac: + Check for --with-glibj too when disabling + the javac check. + +2008-06-02 Andrew John Hughes + + * include/Makefile.am: Don't delete headers + when not rebuilding them. + +2008-06-01 Andrew John Hughes + + * configure.ac: Only regenerate headers by + default if the headers aren't in the source tree. + +2008-06-01 Andrew John Hughes + + * configure.ac: Only run javac check + if examples, tools and/or class library are + being built. + * scripts/check_jni_methods.sh.in: + Remove duplicates in the list of JNI methods + for when builddir==srcdir. + +2008-06-01 Andrew John Hughes + + * lib/Makefile.am: + Replace explicit mkinstalldirs with $(mkinstalldirs). + +2008-06-01 Andrew John Hughes + + * scripts/check_jni_methods.sh.in: + Search the source directory as well for + when headers are in the tarball. + +2008-06-01 Andrew John Hughes + + * Makefile.am: Replace tools with + $(TOOLSDIR). + * m4/acinclude.m4: Include option + to disable building the tools. + +2008-06-01 Andrew John Hughes + + * Makefile.am: Use default makedistcheck + flags that test all optional dependencies. + * include/Makefile.am: Add header files to dist. + * lib/Makefile.am: Trick class files into being + built for dist, so headers can be generated. + +2008-06-11 Andrew John Hughes + + * doc/www.gnu.org/announce/20080606.wml, + * doc/www.gnu.org/newsitems.txt: + Add 0.97.2 annoncement. + * NEWS: Add 0.97.1 and 0.97.2 updates. + +2008-06-09 Mark Wielaard + + * Makefile.am (EXTRA_DIST): Add ChangeLog-2007. + * doc/Makefile.am (EXTRA_DIST): Add invoke.texi. + +2008-06-06 Andrew John Hughes + + * java/lang/Integer.java: + (parseInt(String, int, boolean)): Disallow "-+". + 2008-06-06 Andrew John Hughes * tools/gnu/classpath/tools/common/ClasspathToolParser.java: @@ -108,24 +1791,6 @@ * tools/gnu/classpath/tools/jar/Main.java: Revert previous changes to allow Schuster's patch to do the same. - -2008-06-06 Andrew John Hughes - - * java/lang/Integer.java: - (parseInt(String, int, boolean)): Disallow "-+". - -2008-05-11 Andrew John Hughes - - Reported by Nicolas Geoffray - * java/lang/Integer.java: - (parseInt(String,int,boolean)): Parse +x - as x, not -x. - -2008-06-05 Andrew John Hughes - - * configure.ac: - Check for --with-glibj too when disabling - the javac check. 2008-06-02 Andrew John Hughes @@ -138,6 +1803,596 @@ (parsed(String)): Add stdin to queue instead of setting flag. (readNames()): Work with the queue rather than just stdin. (run(String[])): Always execute readNames(). + +2008-06-01 Mark Wielaard + + * gnu/java/awt/java2d/AbstractGraphics2D.java: Removed XDialogPeer + import. + +2008-05-29 Mario Torre + + * gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): now set directly + the foreground color the application wants to use to draw. On null, behave + like OpenJDK, drawing black. + (renderScanline): fixed NPE, paintContext never initialized. Correctely + retrieve destination raster + (getColor): Return the correct type. + (static initializer): HashMap now typed. + (background): now defaults to black and not null. + (getPaintContext): new method. Initialize lazily the PaintContext. + (foreground): new field. + (isForegroundColorNull): likewise. + (getDeviceBounds): made abstract. + * gnu/java/awt/java2d/RasterGraphics.java (getDeviceBounds): new method. + * gnu/java/awt/java2d/ScanlineConverter.java (renderShape): pass correct + value of Y to doScanline. + * gnu/java/awt/peer/x/GLGraphics.java (getDeviceBounds): new method. + (setBackground): synch with new Escher 2.0 API. + * gnu/java/awt/peer/x/XGraphicsConfiguration.java (getDefaultTransform): + implemented. + (getBounds): new method. + * java/awt/AlphaComposite.java (derive(int) and derive(float)): + new methods. + * java/awt/image/WritableRaster.java (createWritableTranslatedChild): + now call createWritableChild. + (createWritableChild): reformatted. + +2008-05-27 Joshua Sumali + + * NEWS: Added building of gjdoc into tools. + +2008-05-27 Joshua Sumali + + * AUTHORS: Added Joshua Sumali. + +2008-05-27 Joshua Sumali + + * configure.ac: Add support for Antlr. This is used for building gjdoc. + Also generate tools/gjdoc wrapper with gjdoc.in. + * doc/gjdoc.texi: New file. + * doc/invoke.texi: New file. + * doc/Makefile.am: Generate gjdoc documentation. + * m4/ac_prog_antlr.m4: New file. + * m4/ac_prog_java.m4: New file. + * m4/ac_prog_java_works.m4: New file. + * tools/Makefile.am: Build gjdoc as part of tools. + * tools/com/sun/tools/javadoc/Main.java, + * tools/gjdoc.in, + * tools/gnu/classpath/tools/doclets/AbstractDoclet.java, + * tools/gnu/classpath/tools/doclets/.cvsignore, + * tools/gnu/classpath/tools/doclets/debugdoclet/.cvsignore, + * tools/gnu/classpath/tools/doclets/debugdoclet/DebugDoclet.java, + * tools/gnu/classpath/tools/doclets/DocletConfigurationException.java, + * tools/gnu/classpath/tools/doclets/DocletOptionColonSeparated.java, + * tools/gnu/classpath/tools/doclets/DocletOptionFile.java, + * tools/gnu/classpath/tools/doclets/DocletOptionFlag.java, + * tools/gnu/classpath/tools/doclets/DocletOption.java, + * tools/gnu/classpath/tools/doclets/DocletOptionPackageWildcard.java, + * tools/gnu/classpath/tools/doclets/DocletOptionString.java, + * tools/gnu/classpath/tools/doclets/htmldoclet/CssClass.java, + * tools/gnu/classpath/tools/doclets/htmldoclet/.cvsignore, + * tools/gnu/classpath/tools/doclets/htmldoclet/ExternalDocSet.java, + * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java, + * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlPage.java, + * tools/gnu/classpath/tools/doclets/htmldoclet/HtmlTagletContext.java, + * tools/gnu/classpath/tools/doclets/InlineTagRenderer.java, + * tools/gnu/classpath/tools/doclets/InvalidPackageWildcardException.java, + * tools/gnu/classpath/tools/doclets/PackageGroup.java, + * tools/gnu/classpath/tools/doclets/PackageMatcher.java, + * tools/gnu/classpath/tools/doclets/StandardTaglet.java, + * tools/gnu/classpath/tools/doclets/TagletPrinter.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/.cvsignore, + * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/.cvsignore, + * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletConfigurationException.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletException.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTranslet.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/DocTransletOptions.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/JarClassLoader.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/OutputFileInfo.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/package.html, + * tools/gnu/classpath/tools/doclets/xmldoclet/Driver1_4.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/Driver.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/HtmlRepairer.java, + * tools/gnu/classpath/tools/doclets/xmldoclet/TargetContext.java, + * tools/gnu/classpath/tools/FileSystemClassLoader.java, + * tools/gnu/classpath/tools/gjdoc/AbstractTagImpl.java, + * tools/gnu/classpath/tools/gjdoc/ArrayCharacterIterator.java, + * tools/gnu/classpath/tools/gjdoc/ClassDocImpl.java, + * tools/gnu/classpath/tools/gjdoc/ClassDocProxy.java, + * tools/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.java, + * tools/gnu/classpath/tools/gjdoc/ConstructorDocImpl.java, + * tools/gnu/classpath/tools/gjdoc/.cvsignore, + * tools/gnu/classpath/tools/gjdoc/Debug.java, + * tools/gnu/classpath/tools/gjdoc/DirectoryTree.java, + * tools/gnu/classpath/tools/gjdoc/DocImpl.java, + * tools/gnu/classpath/tools/gjdoc/ErrorReporter.java, + * tools/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.java, + * tools/gnu/classpath/tools/gjdoc/expr/AdditionExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/AndExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/BinaryBitwiseExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/BinaryComputationExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/BinaryEqualityExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/BinaryExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/BinaryLogicalExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/BinaryRelationExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/BinaryShiftExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/BitShiftRightExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/CircularExpressionException.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConditionalExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantBoolean.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantByte.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantChar.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantDouble.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantFloat.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantInteger.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantLong.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantNull.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantShort.java, + * tools/gnu/classpath/tools/gjdoc/expr/ConstantString.java, + * tools/gnu/classpath/tools/gjdoc/expr/Context.java, + * tools/gnu/classpath/tools/gjdoc/expr/.cvsignore, + * tools/gnu/classpath/tools/gjdoc/expr/DivisionExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/EqualExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java, + * tools/gnu/classpath/tools/gjdoc/expr/Evaluator.java, + * tools/gnu/classpath/tools/gjdoc/expr/ExclusiveOrExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/Expression.java, + * tools/gnu/classpath/tools/gjdoc/expr/GreaterThanExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/GreaterThanOrEqualExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/IdentifierExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/IllegalExpressionException.java, + * tools/gnu/classpath/tools/gjdoc/expr/InclusiveOrExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/java-expression.g, + * tools/gnu/classpath/tools/gjdoc/expr/LessThanExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/LessThanOrEqualExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/LogicalAndExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/LogicalNotExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/LogicalOrExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/ModuloExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/MultiplicationExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/NegateExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/NotEqualExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/NotExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/ShiftLeftExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/ShiftRightExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/SubtractionExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/TypeCastExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/Type.java, + * tools/gnu/classpath/tools/gjdoc/expr/UnaryExpression.java, + * tools/gnu/classpath/tools/gjdoc/expr/UnknownIdentifierException.java, + * tools/gnu/classpath/tools/gjdoc/FieldDocImpl.java, + * tools/gnu/classpath/tools/gjdoc/GjdocPackageDoc.java, + * tools/gnu/classpath/tools/gjdoc/GjdocRootDoc.java, + * tools/gnu/classpath/tools/gjdoc/InheritDocTagImpl.java, + * tools/gnu/classpath/tools/gjdoc/JavadocWrapper.java, + * tools/gnu/classpath/tools/gjdoc/LinkTagImpl.java, + * tools/gnu/classpath/tools/gjdoc/Main.java, + * tools/gnu/classpath/tools/gjdoc/MemberDocImpl.java, + * tools/gnu/classpath/tools/gjdoc/MethodDocImpl.java, + * tools/gnu/classpath/tools/gjdoc/PackageDocImpl.java, + * tools/gnu/classpath/tools/gjdoc/ParameterImpl.java, + * tools/gnu/classpath/tools/gjdoc/ParamTagImpl.java, + * tools/gnu/classpath/tools/gjdoc/ParseException.java, + * tools/gnu/classpath/tools/gjdoc/Parser.java, + * tools/gnu/classpath/tools/gjdoc/ProgramElementDocImpl.java, + * tools/gnu/classpath/tools/gjdoc/RootDocImpl.java, + * tools/gnu/classpath/tools/gjdoc/SeeTagImpl.java, + * tools/gnu/classpath/tools/gjdoc/SerialFieldTagImpl.java, + * tools/gnu/classpath/tools/gjdoc/SourcePositionImpl.java, + * tools/gnu/classpath/tools/gjdoc/TagContainer.java, + * tools/gnu/classpath/tools/gjdoc/TagImpl.java, + * tools/gnu/classpath/tools/gjdoc/TemporaryStore.java, + * tools/gnu/classpath/tools/gjdoc/TextTagImpl.java, + * tools/gnu/classpath/tools/gjdoc/ThrowsTagImpl.java, + * tools/gnu/classpath/tools/gjdoc/TimerDoclet.java, + * tools/gnu/classpath/tools/gjdoc/Timer.java, + * tools/gnu/classpath/tools/gjdoc/TypeImpl.java, + * tools/gnu/classpath/tools/gjdoc/TypeVariableImpl.java, + * tools/gnu/classpath/tools/gjdoc/ValueTagImpl.java, + * tools/gnu/classpath/tools/gjdoc/WritableType.java, + * tools/gnu/classpath/tools/IOToolkit.java, + * tools/gnu/classpath/tools/java2xhtml/.cvsignore, + * tools/gnu/classpath/tools/java2xhtml/Java2xhtml.java, + * tools/gnu/classpath/tools/MalformedInputEvent.java, + * tools/gnu/classpath/tools/MalformedInputListener.java, + * tools/gnu/classpath/tools/NotifyingInputStreamReader.java, + * tools/gnu/classpath/tools/StringToolkit.java, + * tools/gnu/classpath/tools/taglets/AuthorTaglet.java, + * tools/gnu/classpath/tools/taglets/CodeTaglet.java, + * tools/gnu/classpath/tools/taglets/CopyrightTaglet.java, + * tools/gnu/classpath/tools/taglets/.cvsignore, + * tools/gnu/classpath/tools/taglets/DeprecatedTaglet.java, + * tools/gnu/classpath/tools/taglets/GenericTaglet.java, + * tools/gnu/classpath/tools/taglets/GnuExtendedTaglet.java, + * tools/gnu/classpath/tools/taglets/SinceTaglet.java, + * tools/gnu/classpath/tools/taglets/TagletContext.java, + * tools/gnu/classpath/tools/taglets/ValueTaglet.java, + * tools/gnu/classpath/tools/taglets/VersionTaglet.java, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/gjdoc_common.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/about.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/allclasses.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/allpackages.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/alphaindex_chunked.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/alphaindex.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/classdoc-source.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/classdoc-uses.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/classdoc.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/deprecated.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/descriptor.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/doctranslet.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/fulltree.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/gjdoc.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/help.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/html_common.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/index_noframes.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/index.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/packageclasses.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/packagedoc.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/default_help_en.html, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdochtml-clean.css, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdochtml.css, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdochtml-fixed.css, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdochtml-sclara.css, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/res/gjdoc.js, + * tools/resource/gnu/classpath/tools/gjdoc/doctranslets/html/serialized.xsl, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/dbcentx.mod, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsa.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsb.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsc.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsn.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amso.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-amsr.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-box.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-cyr1.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-cyr2.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-dia.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-grk1.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-grk2.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-grk3.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-grk4.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-lat1.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-lat2.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-num.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-pub.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/ent/iso-tech.ent, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/gjdoc-alphaindex.dtd, + * tools/resource/gnu/classpath/tools/gjdoc/dtd/gjdoc.dtd, + * tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/gjdochtml-clean-color1.css, + * tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/gjdochtml-clean-layout.css, + * tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/gjdochtml-vanilla.css, + * tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/gjdoc.js, + * tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/help.xhtml, + * tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/HtmlDoclet.properties, + * tools/resource/gnu/classpath/tools/gjdoc/htmldoclet/xhtml11-target10.dtd, + * tools/resource/gnu/classpath/tools/gjdoc/java.lang-classes-1.2.txt, + * tools/resource/gnu/classpath/tools/gjdoc/java.lang-classes-1.3.txt, + * tools/resource/gnu/classpath/tools/gjdoc/java.lang-classes-1.4.txt, + * tools/resource/gnu/classpath/tools/gjdoc/java.lang-classes-1.5.txt, + * tools/resource/gnu/classpath/tools/gjdoc/rng/gjdoc-classdoc.rng, + * tools/resource/gnu/classpath/tools/gjdoc/rng/gjdoc-common.rng, + * tools/resource/gnu/classpath/tools/gjdoc/rng/gjdoc-index.rng, + * tools/resource/gnu/classpath/tools/gjdoc/version.properties, + * tools/resource/gnu/classpath/tools/gjdoc/version.properties.in: + New files, taken from gjdoc source tree. + + +2008-05-26 Andrew John Hughes + + * tools/gnu/classpath/tools/jar/Creator.java: + (writeCommandLineEntries(Main,OutputStream)): + Add default value for manifest version and + include Created-By property. + +2008-05-19 Mario Torre + + * gnu/java/awt/peer/x/XEventPump.java (handleExpose): new method. + (handleDestroyNotify): likewise. + (handleClientMessage): likewise. + (handleButtonRelease): likewise. + (handleMotionNotify): likewise. + (handleKeyEvent): likewise. + (handleButtonPress): likewise. + (handleEvent): refactored to use new methods instead of a big switch + block. Fixed resizing of windows. + * gnu/java/awt/peer/x/XWindowPeer.java (standardSelect): update list + of flags for X11 events handling. + (callback): removed now unused flag. + +2008-05-16 Mario Torre + + * native/jni/java-math/java_math_VMBigInteger.c + (Java_java_math_VMBigInteger_natModInverse): fix variable res not + initialized. + +2008-05-15 Robert Schuster + + * java/net/NetworkInterface.java: + (isUp): New method. + (isPointToPoint): Dito. + (isLoopback): Dito. + (supportsMulticast): Dito. + * vm/reference/java/net/VMNetworkInterface.java: + (isUp): New method. + (isPointToPoint): Dito. + (isLoopback): Dito. + (supportsMulticast): Dito. + * native/jni/java-net/java_net_VMNetworkInterface.c: + (isUp): New method. + (isPointToPoint): Dito. + (isLoopback): Dito. + (supportsMulticast): Dito. + +2008-05-11 Andrew John Hughes + + Reported by Nicolas Geoffray + * java/lang/Integer.java: + (parseInt(String,int,boolean)): Parse +x + as x, not -x. + +2008-05-11 Andrew John Hughes + + * java/util/regex/Matcher.java: + (regionStart): New variable. + (regionEnd): Likewise. + (transparentBounds): Likewise. + (anchoringBounds): Likewise. + (Matcher()): Initialise new variables. + (find()): Alter to use new settings. + (find(int)): Likewise. + (lookingAt()): Likewise. + (matches()): Likewise. + (reset()): Reset region. + (reset(CharSequence)): Documented. + (toString()): Include new variables. + (region(int,int)): Implemented. + (regionStart()): Likewise. + (regionEnd()): Likewise. + (hasTransparentBounds()): Likewise. + (useTransparentBounds(boolean)): Likewise. + (hasAnchoringBounds()): Likewise. + (useAnchoringBounds(boolean)): Likewise. + +2008-05-11 Andrew John Hughes + + * gnu/java/lang/CPStringBuilder.java: + (toString()): Fix comments to reflect copying changes. + * vm/reference/gnu/java/lang/VMCPStringBuilder.java: + (toString()): Likewise. + +2008-05-11 Andrew John Hughes + + * NEWS: + Mention GMP and CPStringBuilder. + +2008-05-11 Andrew John Hughes + + PR classpath/36147 + * gnu/java/lang/CPStringBuilder.java: + (allocated): New flag to mark whether or + not the array has been allocated to a String object. + (ensureCapacity(int)): Removed. + (ensureCapacity_unsynchronized(int)): Renamed to + ensureCapacity, and creates an array when allocated + is true. + (allocateArray(int)): Added. + (trimToSize()): Use allocateArray method. + (toString()): Set allocated to true; + (substring(int,int)): Likewise. + +2008-05-11 Andrew John Hughes + + * gnu/java/lang/CPStringBuilder.java: + Make default capacity configurable. + +2008-05-10 Andrew John Hughes + + * vm/reference/gnu/java/lang/VMCPStringBuilder.java, + * vm/reference/gnu/java/lang/management/VMMemoryMXBeanImpl.java, + * vm/reference/java/net/VMNetworkInterface.java: + Remove use of 1.5 language constructs. + +2008-05-10 Andrew John Hughes + + * gnu/java/util/regex/RE.java: + Switch to use generic ArrayLists. + * gnu/java/util/regex/REMatchEnumeration.java: + Make the enumeration implementation generic. + * gnu/java/util/regex/RETokenLookBehind.java: + Remove unused variables. + +2008-05-07 Andrew John Hughes + + Add generics to these classes. + * gnu/java/util/regex/RETokenOneOf.java: + Use an ArrayList and a Deque instead of + a Vector and a Stack to remove unnecessary + synchronisation. + * gnu/java/util/regex/RETokenRepeated.java: + Replace custom FindMatchControlStack class + with a generic Deque. + * java/util/regex/Pattern.java: + Use a generic ArrayList instance. + +2008-05-07 Mario Torre + + * gnu/java/awt/peer/x/XEventPump.java (handleEvent): + Fixed mouse dragging and movement in XEventPump. Patch from Roman Kennke. + +2008-05-07 Mario Torre + + * gnu/java/awt/peer/x/XEventPump.java (handleEvent): xEvent.code is now + masked to identify and react to syntetic events. + Added UnmapNotify, DestroyNotify and ClientMessage to the list of event + handled. + * gnu/java/awt/peer/x/XFramePeer.java (getState): initial implementation. + * gnu/java/awt/peer/x/XGraphics2D.java (setPaint): fix NPE, this is a + workaround, the code have to be fixed in a better way. + * gnu/java/awt/peer/x/XWindowPeer.java (getXwindow): new method to allow + access to the underling xwindow. + (standardSelect): add more events for notification. + (XWindowPeer): call set_wm_delete_window to ask the WM to notify us + when a delete event occur. + +2008-05-07 Andrew John Hughes + + PR classpath/21869 + * tools/gnu/classpath/tools/jar/Indexer.java, + * tools/gnu/classpath/tools/javah/JniHelper.java, + * tools/gnu/classpath/tools/native2ascii/Native2ASCII.java, + * tools/gnu/classpath/tools/orbd/PersistentMap.java, + * tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java, + * tools/gnu/classpath/tools/rmic/Generator.java, + * tools/gnu/classpath/tools/rmic/MethodGenerator.java, + * tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java, + * tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java, + * tools/gnu/classpath/tools/rmic/SourceRmicCompiler.java: + Swap use of StringBuffer for StringBuilder. + +2008-05-07 Andrew John Hughes + + PR classpath/21869 + * javax/swing/AbstractButton.java, + * javax/swing/JButton.java, + * javax/swing/JComboBox.java, + * javax/swing/JComponent.java, + * javax/swing/JDesktopPane.java, + * javax/swing/JFileChooser.java, + * javax/swing/JFrame.java, + * javax/swing/JLabel.java, + * javax/swing/JList.java, + * javax/swing/JMenuBar.java, + * javax/swing/JPopupMenu.java, + * javax/swing/JProgressBar.java, + * javax/swing/JScrollBar.java, + * javax/swing/JSlider.java, + * javax/swing/JSplitPane.java, + * javax/swing/JTabbedPane.java, + * javax/swing/JToolBar.java, + * javax/swing/JToolTip.java, + * javax/swing/UIManager.java, + * javax/swing/event/EventListenerList.java, + * javax/swing/table/AbstractTableModel.java, + * javax/swing/text/AbstractDocument.java, + * javax/swing/text/DefaultEditorKit.java, + * javax/swing/text/DefaultStyledDocument.java, + * javax/swing/text/JTextComponent.java, + * javax/swing/text/MaskFormatter.java, + * javax/swing/text/TabSet.java, + * javax/swing/text/html/CSSParser.java, + * javax/swing/text/html/HTMLWriter.java, + * javax/swing/tree/DefaultTreeSelectionModel.java, + * javax/xml/namespace/QName.java, + * javax/xml/transform/TransformerException.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-07 Andrew John Hughes + + PR classpath/21869 + * javax/accessibility/AccessibleRelationSet.java, + * javax/accessibility/AccessibleStateSet.java, + * javax/imageio/plugins/jpeg/JPEGHuffmanTable.java, + * javax/imageio/plugins/jpeg/JPEGQTable.java, + * javax/imageio/stream/ImageInputStreamImpl.java, + * javax/management/ObjectName.java, + * javax/naming/BinaryRefAddr.java, + * javax/naming/CompositeName.java, + * javax/naming/CompoundName.java, + * javax/naming/NamingException.java, + * javax/naming/spi/NamingManager.java, + * javax/security/auth/x500/X500Principal.java, + * javax/security/sasl/SaslException.java, + * javax/sound/sampled/AudioFormat.java, + * javax/sound/sampled/CompoundControl.java, + * javax/sound/sampled/DataLine.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-06 Andrew John Hughes + + PR classpath/21869 + * java/util/AbstractCollection.java, + * java/util/BitSet.java, + * java/util/Collections.java, + * java/util/Locale.java, + * java/util/ResourceBundle.java, + * java/util/TimeZone.java, + * java/util/logging/FileHandler.java, + * java/util/logging/Logger.java, + * java/util/logging/SimpleFormatter.java, + * java/util/logging/XMLFormatter.java, + * java/util/prefs/AbstractPreferences.java, + * java/util/regex/PatternSyntaxException.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-06 Andrew John Hughes + + PR classpath/21869 + * java/text/AttributedString.java, + * java/text/ChoiceFormat.java, + * java/text/CollationElementIterator.java, + * java/text/Collator.java, + * java/text/DecimalFormat.java, + * java/text/MessageFormat.java, + * java/text/RuleBasedCollator.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-06 Andrew John Hughes + + PR classpath/21869 + * java/security/CodeSource.java, + * java/security/MessageDigest.java, + * java/security/Permission.java, + * java/security/PermissionCollection.java, + * java/security/ProtectionDomain.java, + * java/security/cert/CertPath.java, + * java/security/cert/PKIXBuilderParameters.java, + * java/security/cert/PKIXCertPathBuilderResult.java, + * java/security/cert/X509CRLSelector.java, + * java/security/cert/X509CertSelector.java, + * org/ietf/jgss/Oid.java, + * org/omg/CORBA/portable/Delegate.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-06 Andrew John Hughes + + PR classpath/21869 + * java/beans/Statement.java, + * java/io/File.java, + * java/io/StreamTokenizer.java, + * java/lang/Throwable.java, + * java/math/BigDecimal.java, + * java/math/BigInteger.java, + * java/net/Inet4Address.java, + * java/net/Inet6Address.java, + * java/net/NetworkInterface.java, + * java/net/SocketPermission.java, + * java/net/URLDecoder.java, + * java/net/URLStreamHandler.java, + * java/nio/channels/FileLock.java, + * java/rmi/dgc/VMID.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-06 Andrew John Hughes + + PR classpath/21869 + * java/awt/Component.java, + * java/awt/Container.java, + * java/awt/JobAttributes.java, + * java/awt/event/ActionEvent.java, + * java/awt/event/ComponentEvent.java, + * java/awt/event/HierarchyEvent.java, + * java/awt/event/InputEvent.java, + * java/awt/event/InputMethodEvent.java, + * java/awt/event/KeyEvent.java, + * java/awt/event/MouseEvent.java, + * java/awt/event/WindowEvent.java, + * java/awt/font/TextLayout.java, + * java/awt/image/BandedSampleModel.java, + * java/awt/image/BufferedImage.java, + * java/awt/image/MultiPixelPackedSampleModel.java, + * java/awt/image/Raster.java, + * java/awt/image/SinglePixelPackedSampleModel.java: + Swap use of StringBuffer for CPStringBuilder. 2008-05-06 Andrew John Hughes @@ -147,6 +2402,385 @@ of characters to copy. (toLowerCaseTurkish()): Likewise. +2008-05-06 Andrew John Hughes + + PR classpath/21869 + * gnu/xml/stream/XMLEventImpl.java, + * gnu/xml/stream/XMLParser.java, + * gnu/xml/validation/datatype/EntitiesType.java, + * gnu/xml/validation/datatype/NMTokensType.java: + Swap use of StringBuffer for CPStringBuilder, + +2008-05-06 Andrew John Hughes + + PR classpath/21869 + * gnu/javax/swing/text/html/parser/htmlValidator.java, + * gnu/javax/swing/text/html/parser/models/list.java, + * gnu/javax/swing/text/html/parser/models/node.java, + * gnu/javax/swing/text/html/parser/support/Parser.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-05 Andrew John Hughes + + PR classpath/21869 + * gnu/java/lang/CPStringBuilder.java: + (substring(int)): Added. + * gnu/javax/naming/giop/CorbalocParser.java, + * gnu/javax/naming/giop/GiopNamingServiceFactory.java, + * gnu/javax/naming/giop/ListBindingsEnumeration.java, + * gnu/javax/naming/giop/ListEnumeration.java, + * gnu/javax/naming/ictxImpl/trans/GnuName.java, + * gnu/javax/net/ssl/PrivateCredentials.java, + * gnu/javax/net/ssl/Session.java, + * gnu/javax/net/ssl/provider/HelloRequest.java, + * gnu/javax/net/ssl/provider/Util.java, + * gnu/javax/print/ipp/attribute/RequestedAttributes.java, + * gnu/javax/rmi/CORBA/RmiUtilities.java, + * gnu/javax/security/auth/callback/AWTCallbackHandler.java, + * gnu/javax/security/auth/login/ConfigFileTokenizer.java, + * gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java: + Swap use of StringBuffer for CPStringBuilder, + +2008-05-05 Andrew John Hughes + + PR classpath/21869 + * gnu/javax/crypto/assembly/TransformerException.java, + * gnu/javax/crypto/cipher/BaseCipher.java, + * gnu/javax/crypto/jce/sig/DHParameters.java, + * gnu/javax/crypto/key/KeyAgreementException.java, + * gnu/javax/crypto/mode/BaseMode.java, + * gnu/javax/crypto/pad/BasePad.java, + * gnu/javax/crypto/sasl/crammd5/CramMD5Util.java, + * gnu/javax/crypto/sasl/crammd5/PasswordFile.java, + * gnu/javax/crypto/sasl/plain/PasswordFile.java, + * gnu/javax/crypto/sasl/plain/PlainClient.java, + * gnu/javax/crypto/sasl/srp/PasswordFile.java, + * gnu/javax/crypto/sasl/srp/SRPClient.java, + * gnu/javax/crypto/sasl/srp/SRPServer.java, + * gnu/javax/crypto/sasl/srp/ServerStore.java: + Swap use of StringBuffer for CPStringBuilder, + +2008-05-05 Andrew John Hughes + + PR classpath/21869 + * gnu/java/util/Base64.java, + * gnu/java/util/prefs/NodeWriter.java, + * gnu/java/util/regex/RE.java, + * gnu/java/util/regex/REException.java, + * gnu/java/util/regex/REMatch.java, + * gnu/java/util/regex/REMatchEnumeration.java, + * gnu/java/util/regex/REToken.java, + * gnu/java/util/regex/RETokenAny.java, + * gnu/java/util/regex/RETokenBackRef.java, + * gnu/java/util/regex/RETokenChar.java, + * gnu/java/util/regex/RETokenEnd.java, + * gnu/java/util/regex/RETokenEndOfPreviousMatch.java, + * gnu/java/util/regex/RETokenEndSub.java, + * gnu/java/util/regex/RETokenIndependent.java, + * gnu/java/util/regex/RETokenLookAhead.java, + * gnu/java/util/regex/RETokenLookBehind.java, + * gnu/java/util/regex/RETokenNamedProperty.java, + * gnu/java/util/regex/RETokenOneOf.java, + * gnu/java/util/regex/RETokenPOSIX.java, + * gnu/java/util/regex/RETokenRange.java, + * gnu/java/util/regex/RETokenRepeated.java, + * gnu/java/util/regex/RETokenStart.java, + * gnu/java/util/regex/RETokenWordBoundary.java: + Swap use of StringBuffer for CPStringBuilder, + +2008-05-05 Andrew John Hughes + + PR classpath/21869 + * gnu/java/lang/CPStringBuilder.java: + (CPStringBuilder(StringBuffer)): Added. + (CPStringBuulder(StringBuilder)): Likewise. + * gnu/java/text/AttributedFormatBuffer.java: + Swap use of StringBuffer for CPStringBuilder, + and make fields final. + * gnu/java/text/StringFormatBuffer.java: + Make fields final. + * java/text/SimpleDateFormat.java: + Add thread safety warning. + +2008-05-05 Andrew John Hughes + + PR classpath/21869 + * gnu/java/security/OID.java, + * gnu/java/security/PolicyFile.java, + * gnu/java/security/der/BitString.java, + * gnu/java/security/der/DERReader.java, + * gnu/java/security/jce/sig/DSSParameters.java, + * gnu/java/security/provider/X509CertificateFactory.java, + * gnu/java/security/util/ByteArray.java, + * gnu/java/security/util/Util.java, + * gnu/java/security/x509/PolicyNodeImpl.java, + * gnu/java/security/x509/Util.java, + * gnu/java/security/x509/X500DistinguishedName.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-05 Andrew John Hughes + + PR classpath/21869 + * gnu/java/net/protocol/ftp/FTPConnection.java, + * gnu/java/net/protocol/jar/Handler.java, + * gnu/java/rmi/server/RMIClassLoaderImpl.java, + * gnu/java/rmi/server/RMIHashes.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-05 Andrew John Hughes + + PR classpath/21869 + * gnu/classpath/jdwp/util/Signature.java, + * gnu/java/awt/font/opentype/GlyphNamer.java, + * gnu/java/awt/font/opentype/truetype/Fixed.java, + * gnu/java/awt/font/opentype/truetype/VirtualMachine.java, + * gnu/java/awt/peer/gtk/GdkFontPeer.java, + * gnu/java/awt/peer/gtk/GtkClipboard.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-05 Andrew John Hughes + + PR classpath/21869 + * gnu/CORBA/BigDecimalHelper.java, + * gnu/CORBA/CDR/LittleEndianInputStream.java, + * gnu/CORBA/CDR/Vio.java, + * gnu/CORBA/CDR/gnuRuntime.java, + * gnu/CORBA/GIOP/MessageHeader.java, + * gnu/CORBA/GIOP/RequestHeader.java, + * gnu/CORBA/GIOP/v1_0/ReplyHeader.java, + * gnu/CORBA/GIOP/v1_0/RequestHeader.java, + * gnu/CORBA/IOR.java, + * gnu/CORBA/NamingService/NameParser.java, + * gnu/CORBA/NamingService/NameTransformer.java, + * gnu/CORBA/Poa/gnuPOA.java, + * gnu/CORBA/Poa/gnuServantObject.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-05-01 Andrew John Hughes + + PR classpath/21869 + * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoServant.java, + * examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java, + * examples/gnu/classpath/examples/CORBA/swing/x5/IorReader.java, + * examples/gnu/classpath/examples/CORBA/swing/x5/X5Server.java, + * examples/gnu/classpath/examples/html/Demo.java: + Swap use of StringBuffer for StringBuilder. + +2008-05-01 Andrew John Hughes + + PR classpath/21869 + * gnu/xml/libxmlj/dom/GnomeAttr.java, + * gnu/xml/libxmlj/dom/GnomeCharacterData.java, + * gnu/xml/libxmlj/dom/GnomeDocument.java, + * gnu/xml/libxmlj/dom/GnomeDocumentType.java, + * gnu/xml/libxmlj/dom/GnomeElement.java, + * gnu/xml/libxmlj/dom/GnomeEntity.java, + * gnu/xml/libxmlj/dom/GnomeNode.java, + * gnu/xml/libxmlj/dom/GnomeNotation.java, + * gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java, + * gnu/xml/libxmlj/dom/GnomeText.java, + * gnu/xml/libxmlj/dom/GnomeXPathResult.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-04-28 Andrew John Hughes + + PR classpath/21869 + * gnu/xml/util/XMLWriter.java, + * gnu/xml/xpath/ArithmeticExpr.java, + * gnu/xml/xpath/ConcatFunction.java, + * gnu/xml/xpath/Expr.java, + * gnu/xml/xpath/FunctionCall.java, + * gnu/xml/xpath/NormalizeSpaceFunction.java, + * gnu/xml/xpath/Selector.java, + * gnu/xml/xpath/Steps.java, + * gnu/xml/xpath/TranslateFunction.java, + * gnu/xml/xpath/VariableReference.java, + * gnu/xml/xpath/XPathTokenizer.java: + Swap use of StringBuffer for CPStringBuilder. + +2008-04-26 Ian Rogers + + * java/util/ArrayList (raiseBoundsError): new method to raise bound + exceptions in uncommon case. + (checkBoundInclusive): use raiseBoundsError. + (checkBoundExclusive): likewise. + * java/util/ArrayList (raiseBoundsError): new method to raise bound + exceptions in uncommon case. + (checkBoundInclusive): use raiseBoundsError. + (checkBoundExclusive): likewise. + +2008-04-21 Andrew John Hughes + + * java/lang/Byte.java: + Use int instead of short as a loop counter + for efficiency. + +2008-04-21 Andrew John Hughes + + * java/lang/Byte.java: + (static): Use a short as the loop counter, not + a byte as this can't exceed MAX_VALUE. + +2008-04-18 Ian Rogers + + * java/nio/Buffer.java (cap): make field private and final. + (address): make field final. + (Buffer): add address argument to package protected constructor thereby + allowing it to be made final. + * java/nio/ByteBuffer.java (backing_buffer): make field final. + (array_offset): make field final. + (ByteBuffer): add address, backing_buffer and array_offset to + constructor, allowing fields to be made final. + * java/nio/ByteBufferImpl.java (readOnly): make field final. + (ByteBufferImpl): modify call to super class constructor to pass + backing_buffer and array_offset. + * java/nio/CharBuffer.java (array_offset): make field final. + (backing_buffer): make field final. + (CharBuffer): add address, backing_buffer and array_offset to + constructor, allowing fields to be made final. + * java/nio/CharBufferImpl.java (readOnly): make field final. + (CharBufferImpl): modify call to super class constructor to pass + backing_buffer and array_offset. + (CharBufferImpl(CharBufferImpl)): likewise. + * java/nio/CharSequenceBuffer.java (charSequence): make field final. + (CharSequenceBuffer): modify call to super class constructor, allowing + fields to be made final. + (duplicate): use capacity call rather than cap, to allow better + encapsulation. + * java/nio/CharViewBufferImpl.java (offset): make field final. + (bb): likewise. + (readOnly): likewise. + (endian): likewise. + (CharViewBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/DirectByteBufferImpl.java: modify calls to super class + constructors, allowing fields to be made final. + * java/nio/DoubleBuffer.java (array_offset): make field final. + (backing_buffer): make field final. + (DoubleBuffer): add address, backing_buffer and array_offset to + constructor, allowing fields to be made final. + * java/nio/DoubleBufferImpl.java (readOnly): make field final. + (DoubleBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/DoubleViewBufferImpl.java (offset): make field final. + (bb): likewise. + (readOnly): likewise. + (endian): likewise. + (DoubleViewBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/FloatBuffer.java (array_offset): make field final. + (backing_buffer): make field final. + (FloatBuffer): add address, backing_buffer and array_offset to + constructor, allowing fields to be made final. + * java/nio/FloatBufferImpl.java (readOnly): make field final. + (FloatBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/FloatViewBufferImpl.java (offset): make field final. + (bb): likewise. + (readOnly): likewise. + (endian): likewise. + (FloatViewBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/IntBuffer.java (array_offset): make field final. + (backing_buffer): make field final. + (IntBuffer): add address, backing_buffer and array_offset to + constructor, allowing fields to be made final. + * java/nio/IntBufferImpl.java (readOnly): make field final. + (IntBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/IntViewBufferImpl.java (offset): make field final. + (bb): likewise. + (readOnly): likewise. + (endian): likewise. + (IntViewBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/LongBuffer.java (array_offset): make field final. + (backing_buffer): make field final. + (LongBuffer): add address, backing_buffer and array_offset to + constructor, allowing fields to be made final. + * java/nio/LongBufferImpl.java (readOnly): make field final. + (LongBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/LongViewBufferImpl.java (offset): make field final. + (bb): likewise. + (readOnly): likewise. + (endian): likewise. + (LongViewBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/MappedByteBuffer.java (MappedByteBuffer): modify arguments + add call to constructor, allowing fields to be final. + * java/nio/MappedByteBufferImpl.java (readOnly): make field final. + (MappedByteBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/ShortBuffer.java (array_offset): make field final. + (backing_buffer): make field final. + (ShortBuffer): add address, backing_buffer and array_offset to + constructor, allowing fields to be made final. + * java/nio/ShortBufferImpl.java (readOnly): make field final. + (ShortBufferImpl): modify call to super class constructor, allowing + fields to be made final. + * java/nio/ShortViewBufferImpl.java (offset): make field final. + (bb): likewise. + (readOnly): likewise. + (endian): likewise. + (ShortViewBufferImpl): modify call to super class constructor, allowing + fields to be made final. + +2008-04-18 Ian Rogers + + * java/lang/Byte.java (static): initialize byteCache. + (valueOf(String,int)): use valueOf(byte) rather than new. + (valueOf(String)): likewise. + (valueOf(byte)): Switch from lazy initialization of cached values to + initialization at class initialization time. This removes the need for + synchronization in the common case. + (decode): use valueOf(byte) rather than new. + * java/lang/Character.java (static): initialize charCache. + (valueOf): Switch from lazy initialization of cached values to + initialization at class initialization time. This removes the need for + synchronization in the common case. + * java/lang/Double.java (ZERO): new private field. + (ONE): likewise. + (valueOf(double)): don't create new doubles for the case of 0 and 1. + (valueOf(String)): use valueOf(double) rather than new. + (equals): use raw bits for comparison to avoid division. + * java/lang/Float.java (ZERO): new private field. + (ONE): likewise. + (valueOf(float)): don't create new floats for the case of 0 and 1. + (valueOf(String)): use valueOf(float) rather than new. + (equals): use raw bits for comparison to avoid division. + * java/lang/Integer.java (static): initialize intCache. + (stringSize): new private method to estimate size of string for an int. + (toString): reuse digits for single character strings, for multiple + character strings estimate their length using string size method. + (valueOf(String,int)): use valueOf(int) rather than new. + (valueOf(String)): likewise. + (valueOf(int)): Switch from lazy initialization of cached values to + initialization at class initialization time. This removes the need for + synchronization in the common case. + (getInteger): use valueOf(int) rather than new. + (decode): use valueOf(int) rather than new. + (signum): use shift and subtract to compute value. + (toUnsignedString): calculate string size rather than using 32 chars. + * java/lang/Long.java (longCache): new private field. + (stringSize): new private method to estimate size of string for a long. + (toString): reuse digits for single character strings, for multiple + character strings estimate their length using string size method. + (valueOf(String,int)): use valueOf(long) rather than new. + (valueOf(String)): likewise. + (valueOf(long)): use cache of values. + (decode): use valueOf(long) rather than new. + (getLong): likewise. + (signum): use shift and subtract to compute value. + (toUnsignedString): calculate string size rather than using 64 chars. + * java/lang/Short.java (static): initialize shortCache. + (valueOf(String,int)): use valueOf(short) rather than new. + (valueOf(String)): likewise. + (valueOf(short)): Switch from lazy initialization of cached values to + initialization at class initialization time. This removes the need for + synchronization in the common case. + (decode): use valueOf(short) rather than new. + 2008-04-18 Mario Torre PR classpath/35974 @@ -154,6 +2788,24 @@ Now all the methods of the class get a lock on a static lock, this avoids a lock when getLogger and log are used concurrently. +2008-04-18 Tom Tromey + + * lib/gen-classlist.sh.in: Skip 'sed' steps if no vm_omitlist + found. + +2008-04-17 Ralf Wildenhues + + * lib/gen-classlist.sh.in: Avoid grepping each omission, by + building an awk script with a hash for literal files, and + awk regular expressions for the rest. + * configure.ac: Call AC_PROG_AWK. + +2008-04-16 Tom Tromey + + * tools/gnu/classpath/tools/orbd/Main.java: Bump copyright year. + * tools/resource/gnu/classpath/tools/common/Messages.properties + (ClasspathToolParser.VersionFormat): Bump copyright year. + 2008-04-16 Ralf Wildenhues * m4/gcc_attribute.m4 (GCC_ATTRIBUTE): Fix cache variable name. @@ -163,17 +2815,35 @@ for these scripts, to trick automake into hiding the respective rules for the programs below the CREATE_WRAPPERS conditional. -2008-04-18 Tom Tromey +2008-04-09 Mario Torre + + * java/io/File.java (canWrite): use canWriteDirectory(String). + * vm/reference/java/io/VMFile.java (canWriteDirectory): new native method. + * native/jni/java-io/java_io_VMFile.c: correct indentation, sync function + names with header file definition. + (Java_java_io_VMFile_canRead): use cpio_checkAccess to get access + permission. Removed unused variable. + (Java_java_io_VMFile_canWrite): likewise. + (Java_java_io_VMFile_canWriteDirectory): new function. + - * lib/gen-classlist.sh.in: Skip 'sed' steps if no vm_omitlist - found. +2008-03-31 Andrew John Hughes -2008-04-17 Ralf Wildenhues + * doc/www.gnu.org/events/events.wml: + Correct layout and fix GSoC link. - * lib/gen-classlist.sh.in: Avoid grepping each omission, by - building an awk script with a hash for literal files, and - awk regular expressions for the rest. - * configure.ac: Call AC_PROG_AWK. +2008-03-30 Andrew John Hughes + + * doc/www.gnu.org/external.wml: + Corrected Jalopy tag name. + * doc/www.gnu.org/home.wml: + Update link to tasks. + * doc/www.gnu.org/announce/20080222.wml: + Correct IcedTea and builder links. + * doc/www.gnu.org/downloads/downloads.wml: + Add 0.97 and 0.97.1. + * doc/www.gnu.org/events/events.wml: + Fix links and add FOSDEMs/GSoC. 2008-03-27 Mario Torre @@ -218,32 +2888,17 @@ (equals): new method, override from base class. (toString): likewise. -2008-03-12 Andrew John Hughes - - * java/util/concurrent/CopyOnWriteArrayList.java: - Don't extend AbstractList. - (containsAll(Collection)): Implemented. - (listIterator()): Likewise. - (subList(int,int)): Likewise. - -2008-03-31 Andrew John Hughes - - * doc/www.gnu.org/events/events.wml: - Correct layout and fix GSoC link. - -2008-03-30 Andrew John Hughes - - * doc/www.gnu.org/external.wml: - Corrected Jalopy tag name. - * doc/www.gnu.org/home.wml: - Update link to tasks. - * doc/www.gnu.org/announce/20080222.wml: - Correct IcedTea and builder links. - * doc/www.gnu.org/downloads/downloads.wml: - Add 0.97 and 0.97.1. - * doc/www.gnu.org/events/events.wml: - Fix links and add FOSDEMs/GSoC. +2008-03-25 Andrew John Hughes + * java/awt/image/ColorModel.java: + (coerceDataWorker(WritableRaster,boolean)): + Make package-private, not protected. + * java/awt/image/ComponentColorModel.java: + Call coerceDataWorker directly. + * java/awt/image/DirectColorModel.java: + Likewise. + (coerceData(WritableRaster,boolean)): Made final. + 2008-03-24 Andrew John Hughes PR classpath/22883 @@ -253,14 +2908,153 @@ Fix links to point to current versions of vmintegration and hacking, and add links to tools. - + 2008-03-24 Andrew John Hughes PR classpath/22883 * doc/www.gnu.org/home.wml: Update home page to reflect current state of affairs. + +2008-03-24 Andrew John Hughes + + * java/text/SimpleDateFormat.java: + (standardChars): Corrected. + (RFC822_TIMEZONE_FIELD): Added. + (formatWithAttribute(Date,FormatBuffer,FieldPosition)): + Support RFC822 timezone field ('Z'). + +2008-03-20 Tom Tromey + + * tools/gnu/classpath/tools/getopt/Parser.java (options): Don't + initialize. + (add, addFinal): Don't update options. + (requireOptions): New method. + (printHelp): Synchronize. Call requireOptions. + (parse): Call requireOptions. + +2008-03-17 Andrew John Hughes + + PR classpath/21869 + * gnu/java/lang/CPStringBuilder.java: + (indexOf(String,int)): Use regionMatches from String. + (lastIndexOf(String,int)): Likewise. + (regionMatches(int,String)): Removed broken code. + (substring(int,int)): Rearrange index computation so + it is only computed if valid. + +2008-03-17 Andrew John Hughes + + PR classpath/21869 + * gnu/xml/transform/AbstractNumberNode.java, + * gnu/xml/transform/ApplyTemplatesNode.java, + * gnu/xml/transform/AttributeNode.java, + * gnu/xml/transform/Bindings.java, + * gnu/xml/transform/CallTemplateNode.java, + * gnu/xml/transform/ChooseNode.java, + * gnu/xml/transform/CopyNode.java, + * gnu/xml/transform/CopyOfNode.java, + * gnu/xml/transform/ElementNode.java, + * gnu/xml/transform/ForEachNode.java, + * gnu/xml/transform/IfNode.java, + * gnu/xml/transform/MessageNode.java, + * gnu/xml/transform/ParameterNode.java, + * gnu/xml/transform/ProcessingInstructionNode.java, + * gnu/xml/transform/StreamSerializer.java, + * gnu/xml/transform/Template.java, + * gnu/xml/transform/TextNode.java, + * gnu/xml/transform/TransformerImpl.java, + * gnu/xml/transform/TransformerOutputProperties.java, + * gnu/xml/transform/ValueOfNode.java, + * gnu/xml/transform/WhenNode.java: + Use CPStringBuilder in preference to StringBuffer. + +2008-03-17 Andrew John Hughes + + PR classpath/21869 + * gnu/java/lang/CPStringBuilder.java: + Replace reflection code with calls to + VMCPStringBuilder. + * vm/reference/gnu/java/lang/VMCPStringBuilder.java: + Default implementation of constructor call + using reflection. + +2008-03-16 Andrew John Hughes + + PR classpath/21869 + * gnu/xml/dom/DomAttr.java, + * gnu/xml/dom/DomEvent.java, + * gnu/xml/dom/DomNode.java, + * gnu/xml/dom/DomText.java, + * gnu/xml/dom/ls/DomLSInput.java, + * gnu/xml/util/DoParse.java, + * gnu/xml/util/XCat.java: + Use CPStringBuilder in preference to StringBuffer. + +2008-03-16 Andrew John Hughes + + PR classpath/21869 + * java/security/AlgorithmParameterGenerator.java, + * java/security/AlgorithmParameters.java, + * java/security/KeyFactory.java, + * java/security/KeyPairGenerator.java, + * java/security/MessageDigest.java, + * java/security/SecureRandom.java, + * java/security/Signature.java, + * java/security/cert/CertPathBuilder.java, + * java/security/cert/CertPathValidator.java, + * java/security/cert/CertStore.java, + * java/text/SimpleDateFormat.java, + * java/util/AbstractMap.java, + * java/util/Arrays.java, + * java/util/Calendar.java, + * java/util/Date.java, + * java/util/Formatter.java, + * java/util/Hashtable.java, + * java/util/Properties.java, + * java/util/TreeMap.java, + * java/util/regex/Matcher.java: + Use CPStringBuilder in preference to StringBuilder. + +2008-03-16 Andrew John Hughes + PR classpath/21869 + * gnu/java/security/Engine.java, + * gnu/java/security/hash/Whirlpool.java, + * gnu/java/security/key/dss/DSSKey.java, + * gnu/java/security/key/dss/DSSPrivateKey.java, + * gnu/java/security/key/dss/DSSPublicKey.java, + * gnu/java/security/key/rsa/GnuRSAKey.java, + * gnu/java/security/key/rsa/GnuRSAPrivateKey.java, + * gnu/java/security/key/rsa/GnuRSAPublicKey.java, + * java/awt/datatransfer/MimeType.java, + * java/io/BufferedReader.java, + * java/io/DataInputStream.java, + * java/lang/Double.java, + * java/lang/Float.java, + * java/lang/String.java, + * java/lang/reflect/Proxy.java, + * java/math/BigDecimal.java, + * java/net/URI.java, + * java/net/URLClassLoader.java, + * java/net/URLEncoder.java: + Use CPStringBuilder in preference to StringBuilder. + +2008-03-16 Andrew John Hughes + + * vm/reference/java/lang/reflect/VMField.java: + Consistently use 'clazz' as the name of the variable + containing the declaring class. + * vm/reference/java/lang/reflect/VMMethod.java: + Likewise. + +2008-03-14 Andrew John Hughes + + PR classpath/34840 + * java/lang/AbstractStringBuffer.java: + (append(CharSequence,int,int)): Just set + sequence to "null" don't append it. + 2008-03-11 Andrew John Hughes * doc/www.gnu.org/newsitems.txt: @@ -269,7 +3063,82 @@ Added. * doc/www.gnu.org/cp-tools/.cvsignore: Ignore generated HTML files. + +2008-03-12 Andrew John Hughes + * java/beans/beancontext/BeanContextServicesSupport.java: + (BCSSProxyServiceProvider(BeanContextServiceProvider)): + Add package-private constructor. + * java/lang/StringBuffer.java: + (ensureCapacity_unsynchronized(int)): Make package-private. + * java/rmi/activation/Activatable.java: + (export(ActivationID, Remote, int, RMIServerSocketFactory)): + Make private. + (makeId(ActivationID)): Likewise. + * java/security/MessageDigest.java: + (update(ByteBuffer)): Make final. + * java/security/cert/PolicyQualifierInfo.java: + (getPolicyQualifierId()): Likewise. + (getEncoded()): Likewise. + (getPolicyQualifier()): Likewise. + * java/text/DateFormat.java: + (ISO_YEAR_FIELD): Removed. + (LOCALIZED_DAY_OF_WEEK_FIELD): Likewise. + (EXTENDED_YEAR_FIELD): Likewise. + (MODIFIED_JULIAN_DAY_FIELD): Likewise. + (MILLISECOND_IN_DAY_FIELD): Likewise. + (RFC822_TIMEZONE_FIELD): Likewise. + (Field.ISO_YEAR_FIELD): Likewise. + (Field.LOCALIZED_DAY_OF_WEEK_FIELD): Likewise. + (Field.EXTENDED_YEAR_FIELD): Likewise. + (Field.MODIFIED_JULIAN_DAY_FIELD): Likewise. + (Field.MILLISECOND_IN_DAY_FIELD): Likewise. + (Field.RFC822_TIMEZONE_FIELD): Likewise. + * java/text/DecimalFormat.java: + (format(Object,StringBuffer,FieldPosition)): Make final. + * java/text/Format.java: + (Format()): Make protected. + * java/text/NumberFormat.java: + (NumberFormat()): Likewise. + * java/text/SimpleDateFormat.java: + Remove code using RFC822_TIMEZONE_FIELD. + * java/util/Stack.java: + Use array of Objects rather than instances of T. + * java/util/Vector.java: + Likewise. + * java/util/concurrent/CopyOnWriteArrayList.java: + Don't extend AbstractList. + (containsAll(Collection)): Implemented. + (listIterator()): Likewise. + (subList(int,int)): Likewise. + * java/util/zip/Deflater.java: + (getTotalIn()): Remove deprecation. + (getTotalOut()): Likewise. + * java/util/zip/Inflater.java, + (getTotalIn()): Likewise. + (getTotalOut()): Likewise. + +2008-03-11 Andrew John Hughes + + * java/awt/MouseInfo.java: + (MouseInfo()): Private constructor to prevent + instance creation. + * java/lang/AbstractStringBuilder.java: + (ensureCapacity_unsynchronized(int)): Make + package-private, not protected. + +2008-03-10 Andrew John Hughes + + PR classpath/28664 + * native/jni/java-math/Makefile.am: Add + AM_LDFLAGS to the local LDFLAGS definition + so gmp is linked. + +2008-03-10 Andrew John Hughes + + PR classpath/35422 + * doc/api/Makefile.am: Include external/jsr166. + 2008-03-10 Jim Meyering Don't leak upon failed realloc. @@ -288,90 +3157,239 @@ * doc/cp-tools.texinfo: Likewise. * doc/cp-vmintegration.texinfo: Likewise. -2008-02-27 Andrew John Hughes +2008-03-05 Andrew John Hughes - * configure.ac: - Check for sys/loadavg.h. - * native/jni/java-lang/gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c: - Include sys/loadavg.h if found. + * java/lang/reflect/Constructor.java: + (cons): Make package-private. + (Constructor(VMConstructor)): Set cons in + VM interface. + * java/lang/reflect/Field.java: + (f): Make package-private. + (Field(VMField)): Set f in VM interface. + * java/lang/reflect/Method.java: + (m): Make package-private. + (Method(VMMethod)): Set m in VM interface. + * vm/reference/java/lang/reflect/VMConstructor.java: + (cons): Added reference to Constructor instance. + * vm/reference/java/lang/reflect/VMField.java: + (f): Added reference to Field instance. + * vm/reference/java/lang/reflect/VMMethod.java, + (m): Added reference to Method instance. + +2008-03-04 Andrew John Hughes + + * java/lang/reflect/AccessibleObject.java: + (getAnnotation(Class)): Documented. + (getAnnotations()): Likewise. + (getDeclaredAnnotations()): Likewise. + (isAnnotationPresent(Class)): Likewise. + * java/lang/reflect/Constructor.java, + * java/lang/reflect/Field.java, + * java/lang/reflect/Method.java, + * vm/reference/java/lang/reflect/VMConstructor.java, + * vm/reference/java/lang/reflect/VMField.java, + * vm/reference/java/lang/reflect/VMMethod.java: + (getAnnotation(Class)): Added. + (getDeclaredAnnotations()): Likewise. -2008-06-02 Andrew John Hughes +2008-03-03 Andrew John Hughes - * include/Makefile.am: Don't delete headers - when not rebuilding them. + * tools/Makefile.am: + Distribute property files. -2008-06-01 Andrew John Hughes +2008-03-04 Robert Schuster - * configure.ac: Only regenerate headers by - default if the headers aren't in the source tree. + * gnu/xml/stream/AttributeImpl.java: Changed type field to String. + (getDTDType): Changed return type to String. + * gnu/xml/stream/XMLEventAllocatorImpl.java: + (allocate): Removed wrapping of string in QName object. + * gnu/xml/stream/XMLEventFactoryImpl.java: + (createAttribute(String, String)): Removed wrapping of string in + QName object. + (createAttribute(QName, String)): Ditto. + (createAttribute(String, String, String, String)): Ditto. + * javax/xml/stream/events/Attribute.java: + (getDTDType): Changed return type to String. -2008-06-01 Andrew John Hughes +2008-03-03 Andrew John Hughes - * configure.ac: Only run javac check - if examples, tools and/or class library are - being built. - * scripts/check_jni_methods.sh.in: - Remove duplicates in the list of JNI methods - for when builddir==srcdir. + * java/lang/reflect/Constructor.java, + * java/lang/reflect/Field.java, + * java/lang/reflect/Method.java, + * vm/reference/java/lang/reflect/VMConstructor.java: + (equals(Object)): Added. + * vm/reference/java/lang/reflect/VMField.java: + (equals(Object)): Added. + * vm/reference/java/lang/reflect/VMMethod.java: + (equals(Object)): Added. + Move variables from Classpath classes to VM classes + and make class methods into instance methods. -2008-06-01 Andrew John Hughes +2008-02-30 Andrew John Hughes - * lib/Makefile.am: - Replace explicit mkinstalldirs with $(mkinstalldirs). + * java/lang/reflect/Constructor.java, + * java/lang/reflect/Field.java, + * java/lang/reflect/Method.java: + New classes within GNU Classpath that provide + common reflection functionality. + * vm/reference/java/lang/reflect/Constructor.java, + * vm/reference/java/lang/reflect/Field.java, + * vm/reference/java/lang/reflect/Method.java: + Removed. + * vm/reference/java/lang/reflect/VMConstructor.java, + * vm/reference/java/lang/reflect/VMField.java, + * vm/reference/java/lang/reflect/VMMethod.java: + New VM interface for reflection. -2008-06-01 Andrew John Hughes +2008-03-03 Andrew John Hughes - * scripts/check_jni_methods.sh.in: - Search the source directory as well for - when headers are in the tarball. + PR classpath/28664 + * native/jni/Makefile.am: Check CREATE_GMPBI_LIBRARY + and only compile GMP libraries if set. -2008-06-01 Andrew John Hughes +2008-03-02 Mark Wielaard - * Makefile.am: Replace tools with - $(TOOLSDIR). - * m4/acinclude.m4: Include option - to disable building the tools. - -2008-06-01 Andrew John Hughes + * native/jni/Makefile.am (DIST_SUBDIRS): Add java-math. - * Makefile.am: Use default makedistcheck - flags that test all optional dependencies. - * configure.ac: Set version to 0.97.2-pre. - * include/Makefile.am: Add header files to dist. - * lib/Makefile.am: Trick class files into being - built for dist, so headers can be generated. +2008-02-30 Andrew John Hughes + + PR classpath/21869 + * gnu/classpath/CPStringBuilder.java: + Make the constructor accessible. -2008-03-11 Andrew John Hughes +2008-02-30 Andrew John Hughes + + PR classpath/21869 + * gnu/classpath/CPStringBuilder.java: + Removed. + * gnu/java/awt/font/OpenTypeFontPeer.java, + * gnu/java/awt/font/autofit/Edge.java, + * gnu/java/awt/font/autofit/LatinBlue.java, + * gnu/java/awt/font/autofit/Segment.java, + * gnu/java/awt/font/autofit/Width.java, + * gnu/java/awt/font/opentype/truetype/Point.java, + * gnu/java/awt/java2d/ActiveEdges.java, + * gnu/java/awt/peer/GnomeDesktopPeer.java, + * gnu/java/awt/peer/KDEDesktopPeer.java, + * gnu/java/awt/peer/x/XFontPeer.java: + Use CPStringBuilder. + * gnu/java/lang/CPStringBuilder.java: + Moved from gnu.classpath. + * gnu/java/lang/ClassHelper.java, + * gnu/java/lang/reflect/GenericSignatureParser.java, + * gnu/java/lang/reflect/TypeSignature.java, + * gnu/java/net/protocol/http/ChunkedInputStream.java, + * gnu/java/net/protocol/http/Cookie.java, + * gnu/java/net/protocol/http/HTTPConnection.java, + * gnu/java/net/protocol/http/Headers.java, + * gnu/java/net/protocol/http/Request.java: + Use CPStringBuilder. + * java/lang/reflect/Modifier.java: + Corrected import to point to correct package. + * java/util/Formatter.java: + Use CPStringBuilder. + * vm/reference/java/lang/reflect/Constructor.java, + * vm/reference/java/lang/reflect/Field.java, + * vm/reference/java/lang/reflect/Method.java: + Corrected import to point to correct package. + +2008-02-30 Andrew John Hughes - * configure.ac: Set version to 0.97.1 - * NEWS: Add 0.97.1. + PR classpath/21869 + * gnu/classpath/CPStringBuffer.java, + * gnu/classpath/CPStringBuilder.java: + Rename class to CPStringBuilder. + * java/lang/reflect/Modifier.java, + * vm/reference/java/lang/reflect/Constructor.java, + * vm/reference/java/lang/reflect/Field.java, + * vm/reference/java/lang/reflect/Method.java: + Use CPStringBuilder. + +2008-02-29 Andrew John Hughes + + * gnu/classpath/CPStringBuffer.java: + New non-copying string buffer. + * java/lang/AbstractStringBuffer.java: + Add note about CPStringBuffer. + +2008-02-28 Andrew John Hughes + + * gnu/java/util/EmptyEnumeration.java: + Add generic type parameter. + * java/lang/ClassLoader.java: + Use EmptyEnumeration with type parameter. + * java/util/zip/ZipFile.java: + Likewise. + * javax/swing/text/html/StyleSheet.java, + * javax/swing/text/html/ViewAttributeSet.java: + Add generics. + * javax/swing/tree/DefaultMutableTreeNode.java: + Use EmptyEnumeration with type parameter. + +2008-02-28 Andrew John Hughes + + PR classpath/28664 + * include/Makefile.am: + Add generation of header file java_math_VMBigInteger.h + * java/math/BigInteger.java: Separate NativeMPI into + VMBigInteger. + * native/jni/Makefile.am: Add java-math. + * native/jni/java-math/java_math_VMBigInteger.c: + Renamed from java_math_BigInteger.c. + * vm/reference/java/math/VMBigInteger.java: + Former NativeMPI class from java.math.BigInteger. + +2006-11-28 Raif S. Naffah + Jeroen Frijters + + PR classpath/28664 + * configure.ac: Add support for configuring GNU MP. + * native/jni/Makefile.am: Include java-math directory if required. + * native/jni/java-math/.cvsignore: New file. + * native/jni/java-math/Makefile.am: Likewise. + * native/jni/java-math/java_math_BigInteger.c: Likewise. + * java/math/BigInteger.java: Added support for native methods. + * gnu/classpath/Configuration.java.in (WANT_NATIVE_BIG_INTEGER): New field. + +2008-02-27 Andrew John Hughes + + * configure.ac: + Check for sys/loadavg.h. + * native/jni/java-lang/gnu_java_lang_management_VMOperatingSystemMXBeanImpl.c: + Include sys/loadavg.h if found. -2008-03-10 Andrew John Hughes +2008-02-26 Andrew John Hughes - PR classpath/35422 - * doc/api/Makefile.am: Include external/jsr166. + PR classpath/21869: + * java/lang/AbstractStringBuffer.java: New class. + * java/lang/StringBuffer.java, + * java/lang/StringBuilder.java: + Changed to use AbstractStringBuffer. -2008-03-04 Robert Schuster +2008-02-26 Andrew John Hughes - * gnu/xml/stream/AttributeImpl.java: Changed type field to String. - (getDTDType): Changed return type to String. - * gnu/xml/stream/XMLEventAllocatorImpl.java: - (allocate): Removed wrapping of string in QName object. - * gnu/xml/stream/XMLEventFactoryImpl.java: - (createAttribute(String, String)): Removed wrapping of string in - QName object. - (createAttribute(QName, String)): Ditto. - (createAttribute(String, String, String, String)): Ditto. - * javax/xml/stream/events/Attribute.java: - (getDTDType): Changed return type to String. + * gnu/java/util/prefs/EventDispatcher.java: + Removed again. + * gnu/java/util/prefs/GConfBasedPreferences.java, + * gnu/java/util/prefs/gconf/GConfNativePeer.java, + * java/util/prefs/AbstractPreferences.java, + * native/jni/gconf-peer/GConfNativePeer.c: + Revert to pre-release versions. -2008-03-03 Andrew John Hughes +2008-02-26 Andrew John Hughes - * tools/Makefile.am: - Distribute property files. + * doc/www.gnu.org/newsitems.txt: + Add 20080222 announcement. + * doc/www.gnu.org/announce/20080222.wml: + Add announcement of 0.97. 2008-02-22 Andrew John Hughes + * NEWS: Add 0.98. + * configure.ac: Set version to 0.98-pre. + +2008-02-22 Andrew John Hughes + * NEWS: Set date for 0.97. * configure.ac: Set version to 0.97 diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj index c07666c6c79..7e7c40a1c54 100644 --- a/libjava/classpath/ChangeLog.gcj +++ b/libjava/classpath/ChangeLog.gcj @@ -1,3 +1,87 @@ +2008-10-21 Matthias Klose + + * classpath/tools/gnu/classpath/tools/gjdoc/expr/Java*: Move from ... + * classpath/tools/generated/gnu/classpath/tools/gjdoc/expr/ ... here. + * Update .class files. + +2008-10-21 Andrew John Hughes + + * tools/Makefile.am: + Always generate parser in the srcdir. + +2008-10-21 Matthias Klose + + * doc/Makefile.am (MAINTAINERCLEANFILES): Add gjdoc.1. + * doc/Makefile.in: Regenerate. + +2008-10-20 Matthias Klose + + * configure.ac: Fix path name in check for generated gjdoc parser files. + * configure: Regenerate. + +2008-10-20 Matthias Klose + + * configure.ac: Don't check for working java, if not configured + with --enable-java-maintainer-mode. + * configure: Regenerate. + +2008-10-19 Matthias Klose + + * m4/ac_prog_java.m4: Revert previous change. + * m4/ac_prog_javac.m4: Apply it here. + * configure: Regenerate. + +2008-10-19 Matthias Klose + + * m4/ac_prog_javac.m4: Don't check for working javac, if not configured + with --enable-java-maintainer-mode. + * configure: Regenerate. + * Makefile.in, */Makefile.in: Regenerate. + +2008-09-30 Matthias Klose + + * m4/ac_prog_antlr.m4: Check for cantlr binary as well. + +2008-09-29 Matthias Klose + + * m4/ac_prog_antlr.m4: Check for antlr binary as well. + +2008-09-28 Matthias Klose + + * PR libgcj/37636. Revert: + 2008-02-20 Matthias Klose + + * tools/Makefile.am ($(TOOLS_ZIP)): Revert part of previous change, + Do copy resource files in JAVA_MAINTAINER_MODE only. + * tools/Makefile.in: Regenerate. + +2008-09-14 Matthias Klose + + * m4/ac_prog_javac_works.m4, m4/ac_prog_javac.m4, m4/acinclude.m4: + Revert local changes. + * m4/ac_prog_antlr.m4: Check for an runantlr binary. + * tools/Makefile.am, lib/Makefile.am: Revert local changes (JCOMPILER). + * tools/Makefile.am: Remove USE_JAVAC_FLAGS, pass ANTLR_JAR in + GLIBJ_CLASSPATH. + +2008-09-14 Matthias Klose + + Revert: + Daniel Frampton + + * AUTHORS: Added. + * java/lang/InheritableThreadLocal.java, + * java/lang/Thread.java, + * java/lang/ThreadLocal.java: + Modified to use java.lang.ThreadLocalMap. + * java/lang/ThreadLocalMap.java: + New cheaper ThreadLocal-specific WeakHashMap. + +2008-08-15 Matthias Klose + + * m4/acinclude.m4 (CLASSPATH_JAVAC_MEM_CHECK): Remove unknown + args for javac. + 2008-08-17 Mark Wielaard * gnu/java/awt/peer/gtk/CairoGraphics2D.java: Always loadLibrary diff --git a/libjava/classpath/Makefile.am b/libjava/classpath/Makefile.am index fec369bad7f..af47684b185 100644 --- a/libjava/classpath/Makefile.am +++ b/libjava/classpath/Makefile.am @@ -11,7 +11,7 @@ ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config ${LOCAL_AUTORECONF_FLAGS} native: lib -EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE \ +EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE ChangeLog-2007 \ ChangeLog-2003 ChangeLog-2004 ChangeLog-2005 ChangeLog-2006 \ ChangeLog.gnujaxp.1 ChangeLog.gnujaxp.2 ChangeLog.libxmlj \ autogen.sh diff --git a/libjava/classpath/Makefile.in b/libjava/classpath/Makefile.in index e25c5ff380a..068771a85a2 100644 --- a/libjava/classpath/Makefile.in +++ b/libjava/classpath/Makefile.in @@ -68,6 +68,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \ $(top_srcdir)/../../ltsugar.m4 \ $(top_srcdir)/../../ltversion.m4 \ $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/m4/ac_prog_antlr.m4 \ + $(top_srcdir)/m4/ac_prog_java.m4 \ + $(top_srcdir)/m4/ac_prog_java_works.m4 \ $(top_srcdir)/m4/ac_prog_javac.m4 \ $(top_srcdir)/m4/ac_prog_javac_works.m4 \ $(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \ @@ -120,6 +123,8 @@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANTLR = @ANTLR@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -151,6 +156,12 @@ CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@ CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@ CREATE_GCONF_PEER_LIBRARIES_FALSE = @CREATE_GCONF_PEER_LIBRARIES_FALSE@ CREATE_GCONF_PEER_LIBRARIES_TRUE = @CREATE_GCONF_PEER_LIBRARIES_TRUE@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_PARSER_FALSE = @CREATE_GJDOC_PARSER_FALSE@ +CREATE_GJDOC_PARSER_TRUE = @CREATE_GJDOC_PARSER_TRUE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ +CREATE_GMPBI_LIBRARY_FALSE = @CREATE_GMPBI_LIBRARY_FALSE@ +CREATE_GMPBI_LIBRARY_TRUE = @CREATE_GMPBI_LIBRARY_TRUE@ CREATE_GSTREAMER_PEER_LIBRARIES_FALSE = @CREATE_GSTREAMER_PEER_LIBRARIES_FALSE@ CREATE_GSTREAMER_PEER_LIBRARIES_TRUE = @CREATE_GSTREAMER_PEER_LIBRARIES_TRUE@ CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@ @@ -189,11 +200,12 @@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXAMPLESDIR = @EXAMPLESDIR@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ -FASTJAR = @FASTJAR@ FGREP = @FGREP@ FIND = @FIND@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GCJ_JAVAC_FALSE = @GCJ_JAVAC_FALSE@ +GCJ_JAVAC_TRUE = @GCJ_JAVAC_TRUE@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GDK_CFLAGS = @GDK_CFLAGS@ @@ -203,6 +215,8 @@ GENINSRC_TRUE = @GENINSRC_TRUE@ GJDOC = @GJDOC@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ +GMP_CFLAGS = @GMP_CFLAGS@ +GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ GSTREAMER_BASE_CFLAGS = @GSTREAMER_BASE_CFLAGS@ GSTREAMER_BASE_LIBS = @GSTREAMER_BASE_LIBS@ @@ -224,7 +238,10 @@ INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVA = @JAVA@ JAVAC = @JAVAC@ +JAVAC_IS_GCJ = @JAVAC_IS_GCJ@ JAVAC_MEM_OPT = @JAVAC_MEM_OPT@ JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@ JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@ @@ -290,8 +307,10 @@ USE_ESCHER_TRUE = @USE_ESCHER_TRUE@ USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@ USE_PREBUILT_GLIBJ_ZIP_TRUE = @USE_PREBUILT_GLIBJ_ZIP_TRUE@ VERSION = @VERSION@ -VM_BINARY = @VM_BINARY@ +WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@ WARNING_CFLAGS = @WARNING_CFLAGS@ +WITH_JAR_FALSE = @WITH_JAR_FALSE@ +WITH_JAR_TRUE = @WITH_JAR_TRUE@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ XSLT_CFLAGS = @XSLT_CFLAGS@ @@ -302,6 +321,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP = @ZIP@ +ac_ct_ANTLR = @ac_ct_ANTLR@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -361,6 +381,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ +uudecode = @uudecode@ vm_classes = @vm_classes@ # lib first, to compile .class files before native code, last examples @@ -369,7 +390,7 @@ DIST_SUBDIRS = lib doc external include native resource scripts tools examples # Allow users to pass site-specific flags to autoreconf via an env var. ACLOCAL_AMFLAGS = -I m4 -I ../.. -I ../../config ${LOCAL_AUTORECONF_FLAGS} -EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE \ +EXTRA_DIST = HACKING BUGS THANKYOU mauve-classpath LICENSE ChangeLog-2007 \ ChangeLog-2003 ChangeLog-2004 ChangeLog-2005 ChangeLog-2006 \ ChangeLog.gnujaxp.1 ChangeLog.gnujaxp.2 ChangeLog.libxmlj \ autogen.sh diff --git a/libjava/classpath/NEWS b/libjava/classpath/NEWS index 0a9e4620e87..4be4d60434c 100644 --- a/libjava/classpath/NEWS +++ b/libjava/classpath/NEWS @@ -1,3 +1,19 @@ +New in release 0.98 + +* Native support for BigInteger is now provided using the GMP +library. A new option, --enable/disable-gmp is provided, and +the option is enabled by default if GMP is found. +* Classpath now makes use of a new StringBuilder implementation +internally called CPStringBuilder. In addition to being +unsynchronised, like StringBuilder, this also avoids copying the +array when toString or substring is called. While StringBuffer/Builder +always retain their own array, which is only altered during resizing, +CPStringBuilder gives away its array when the result is generated +by toString()/substring() and starts afresh. The default capacity of +CPStringBuilder can also be configured using the +gnu.classpath.cpstringbuilder.capacity property. +* gjdoc is now built as part of tools.zip. + Bug fixes in release 0.97.2 (Jun 06, 2007) * Include headers in the release tarball. diff --git a/libjava/classpath/THANKYOU b/libjava/classpath/THANKYOU index 036bd0857b4..21e75c84e47 100644 --- a/libjava/classpath/THANKYOU +++ b/libjava/classpath/THANKYOU @@ -26,6 +26,7 @@ Andrew Haley (aph@redhat.com) Steven Hugg (hugg@pobox.com) jockey@aromasoft.com Isaac Jones (ijones@cis.ohio-state.edu) +Byeogncheol Lee (lineonking@gmail.com) Oskar Liljeblad (osk@hem.passagen.se) Trevor Linton (tlinton@xmission.com) Casey Marshall (rsdio@metastatic.org) diff --git a/libjava/classpath/aclocal.m4 b/libjava/classpath/aclocal.m4 index 297f30de2e5..84b45a46eca 100644 --- a/libjava/classpath/aclocal.m4 +++ b/libjava/classpath/aclocal.m4 @@ -912,6 +912,9 @@ m4_include([../../ltoptions.m4]) m4_include([../../ltsugar.m4]) m4_include([../../ltversion.m4]) m4_include([../../lt~obsolete.m4]) +m4_include([m4/ac_prog_antlr.m4]) +m4_include([m4/ac_prog_java.m4]) +m4_include([m4/ac_prog_java_works.m4]) m4_include([m4/ac_prog_javac.m4]) m4_include([m4/ac_prog_javac_works.m4]) m4_include([m4/acattribute.m4]) diff --git a/libjava/classpath/configure b/libjava/classpath/configure index 0fa80888448..5907cf80902 100755 --- a/libjava/classpath/configure +++ b/libjava/classpath/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for GNU Classpath 0.97.2. +# Generated by GNU Autoconf 2.59 for GNU Classpath 0.98-pre. # # Report bugs to . # @@ -418,8 +418,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='GNU Classpath' PACKAGE_TARNAME='classpath' -PACKAGE_VERSION='0.97.2' -PACKAGE_STRING='GNU Classpath 0.97.2' +PACKAGE_VERSION='0.98-pre' +PACKAGE_STRING='GNU Classpath 0.98-pre' PACKAGE_BUGREPORT='classpath@gnu.org' ac_unique_file="java/lang/System.java" @@ -461,7 +461,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE GENINSRC_TRUE GENINSRC_FALSE multi_basedir LIBVERSION CLASSPATH_MODULE CLASSPATH_CONVENIENCE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CREATE_COLLECTIONS_TRUE CREATE_COLLECTIONS_FALSE CREATE_JNI_LIBRARIES_TRUE CREATE_JNI_LIBRARIES_FALSE CREATE_CORE_JNI_LIBRARIES_TRUE CREATE_CORE_JNI_LIBRARIES_FALSE CREATE_GCONF_PEER_LIBRARIES_TRUE CREATE_GCONF_PEER_LIBRARIES_FALSE CREATE_GSTREAMER_PEER_LIBRARIES_TRUE CREATE_GSTREAMER_PEER_LIBRARIES_FALSE default_toolkit CREATE_XMLJ_LIBRARY_TRUE CREATE_XMLJ_LIBRARY_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP CREATE_ALSA_LIBRARIES_TRUE CREATE_ALSA_LIBRARIES_FALSE CREATE_DSSI_LIBRARIES_TRUE CREATE_DSSI_LIBRARIES_FALSE CREATE_GTK_PEER_LIBRARIES_TRUE CREATE_GTK_PEER_LIBRARIES_FALSE CREATE_QT_PEER_LIBRARIES_TRUE CREATE_QT_PEER_LIBRARIES_FALSE CREATE_PLUGIN_TRUE CREATE_PLUGIN_FALSE toolexeclibdir nativeexeclibdir glibjdir VM_BINARY CREATE_JNI_HEADERS_TRUE CREATE_JNI_HEADERS_FALSE CREATE_WRAPPERS_TRUE CREATE_WRAPPERS_FALSE LN_S LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM OBJDUMP ac_ct_OBJDUMP AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP PERL COLLECTIONS_PREFIX LIBMAGIC LIBICONV LTLIBICONV WARNING_CFLAGS EXTRA_CFLAGS STRICT_WARNING_CFLAGS ERROR_CFLAGS PKG_CONFIG XML_CFLAGS XML_LIBS XSLT_CFLAGS XSLT_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS GTK_CFLAGS GTK_LIBS FREETYPE2_CFLAGS FREETYPE2_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS CAIRO_CFLAGS CAIRO_LIBS XTEST_LIBS GCONF_CFLAGS GCONF_LIBS GDK_CFLAGS GDK_LIBS GSTREAMER_CFLAGS GSTREAMER_LIBS GSTREAMER_BASE_CFLAGS GSTREAMER_BASE_LIBS GSTREAMER_PLUGINS_BASE_CFLAGS GSTREAMER_PLUGINS_BASE_LIBS GST_PLUGIN_LDFLAGS GSTREAMER_FILE_READER GSTREAMER_MIXER_PROVIDER QT_CFLAGS QT_LIBS MOC MOZILLA_CFLAGS MOZILLA_LIBS GLIB_CFLAGS GLIB_LIBS PLUGIN_DIR USER_JAVAH CLASSPATH_INCLUDES vm_classes MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBDEBUG INIT_LOAD_LIBRARY ECJ_JAR JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION REMOVE MKDIR CP DATE FIND ZIP FASTJAR INSTALL_GLIBJ_ZIP_TRUE INSTALL_GLIBJ_ZIP_FALSE INSTALL_CLASS_FILES_TRUE INSTALL_CLASS_FILES_FALSE BUILD_CLASS_FILES_TRUE BUILD_CLASS_FILES_FALSE EXAMPLESDIR TOOLSDIR GJDOC CREATE_API_DOCS_TRUE CREATE_API_DOCS_FALSE JAY JAY_SKELETON REGEN_PARSERS_TRUE REGEN_PARSERS_FALSE USE_PREBUILT_GLIBJ_ZIP_TRUE USE_PREBUILT_GLIBJ_ZIP_FALSE PATH_TO_GLIBJ_ZIP JAVAC JAVAC_MEM_OPT USE_ESCHER_TRUE USE_ESCHER_FALSE PATH_TO_ESCHER ENABLE_LOCAL_SOCKETS_TRUE ENABLE_LOCAL_SOCKETS_FALSE DEFAULT_PREFS_PEER LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE GENINSRC_TRUE GENINSRC_FALSE multi_basedir LIBVERSION CLASSPATH_MODULE CLASSPATH_CONVENIENCE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CREATE_COLLECTIONS_TRUE CREATE_COLLECTIONS_FALSE CREATE_JNI_LIBRARIES_TRUE CREATE_JNI_LIBRARIES_FALSE CREATE_CORE_JNI_LIBRARIES_TRUE CREATE_CORE_JNI_LIBRARIES_FALSE CREATE_GCONF_PEER_LIBRARIES_TRUE CREATE_GCONF_PEER_LIBRARIES_FALSE CREATE_GSTREAMER_PEER_LIBRARIES_TRUE CREATE_GSTREAMER_PEER_LIBRARIES_FALSE default_toolkit CREATE_XMLJ_LIBRARY_TRUE CREATE_XMLJ_LIBRARY_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP CREATE_ALSA_LIBRARIES_TRUE CREATE_ALSA_LIBRARIES_FALSE CREATE_DSSI_LIBRARIES_TRUE CREATE_DSSI_LIBRARIES_FALSE CREATE_GTK_PEER_LIBRARIES_TRUE CREATE_GTK_PEER_LIBRARIES_FALSE CREATE_QT_PEER_LIBRARIES_TRUE CREATE_QT_PEER_LIBRARIES_FALSE CREATE_PLUGIN_TRUE CREATE_PLUGIN_FALSE CREATE_GJDOC_TRUE CREATE_GJDOC_FALSE toolexeclibdir nativeexeclibdir glibjdir CREATE_JNI_HEADERS_TRUE CREATE_JNI_HEADERS_FALSE CREATE_GJDOC_PARSER_TRUE CREATE_GJDOC_PARSER_FALSE CREATE_WRAPPERS_TRUE CREATE_WRAPPERS_FALSE LN_S LIBTOOL SED FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM OBJDUMP ac_ct_OBJDUMP AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO DSYMUTIL ac_ct_DSYMUTIL NMEDIT ac_ct_NMEDIT LIPO ac_ct_LIPO OTOOL ac_ct_OTOOL OTOOL64 ac_ct_OTOOL64 CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP PERL COLLECTIONS_PREFIX LIBMAGIC LIBICONV LTLIBICONV WARNING_CFLAGS EXTRA_CFLAGS STRICT_WARNING_CFLAGS ERROR_CFLAGS PKG_CONFIG XML_CFLAGS XML_LIBS XSLT_CFLAGS XSLT_LIBS X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS GTK_CFLAGS GTK_LIBS FREETYPE2_CFLAGS FREETYPE2_LIBS PANGOFT2_CFLAGS PANGOFT2_LIBS CAIRO_CFLAGS CAIRO_LIBS XTEST_LIBS GCONF_CFLAGS GCONF_LIBS GDK_CFLAGS GDK_LIBS GSTREAMER_CFLAGS GSTREAMER_LIBS GSTREAMER_BASE_CFLAGS GSTREAMER_BASE_LIBS GSTREAMER_PLUGINS_BASE_CFLAGS GSTREAMER_PLUGINS_BASE_LIBS GST_PLUGIN_LDFLAGS GSTREAMER_FILE_READER GSTREAMER_MIXER_PROVIDER QT_CFLAGS QT_LIBS MOC MOZILLA_CFLAGS MOZILLA_LIBS GLIB_CFLAGS GLIB_LIBS PLUGIN_DIR GMP_CFLAGS GMP_LIBS USER_JAVAH CLASSPATH_INCLUDES vm_classes MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBDEBUG INIT_LOAD_LIBRARY ECJ_JAR JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION REMOVE MKDIR CP DATE FIND ZIP JAR WITH_JAR_TRUE WITH_JAR_FALSE INSTALL_GLIBJ_ZIP_TRUE INSTALL_GLIBJ_ZIP_FALSE INSTALL_CLASS_FILES_TRUE INSTALL_CLASS_FILES_FALSE BUILD_CLASS_FILES_TRUE BUILD_CLASS_FILES_FALSE EXAMPLESDIR TOOLSDIR GJDOC CREATE_API_DOCS_TRUE CREATE_API_DOCS_FALSE JAY JAY_SKELETON REGEN_PARSERS_TRUE REGEN_PARSERS_FALSE USE_PREBUILT_GLIBJ_ZIP_TRUE USE_PREBUILT_GLIBJ_ZIP_FALSE PATH_TO_GLIBJ_ZIP JAVA uudecode JAVAC JAVAC_IS_GCJ GCJ_JAVAC_TRUE GCJ_JAVAC_FALSE ANTLR_JAR ANTLR ac_ct_ANTLR JAVAC_MEM_OPT USE_ESCHER_TRUE USE_ESCHER_FALSE PATH_TO_ESCHER ENABLE_LOCAL_SOCKETS_TRUE ENABLE_LOCAL_SOCKETS_FALSE DEFAULT_PREFS_PEER WANT_NATIVE_BIG_INTEGER CREATE_GMPBI_LIBRARY_TRUE CREATE_GMPBI_LIBRARY_FALSE LIBOBJS LTLIBOBJS' ac_subst_files='' ac_pwd=`pwd` @@ -943,7 +943,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU Classpath 0.97.2 to adapt to many kinds of systems. +\`configure' configures GNU Classpath 0.98-pre to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1014,7 +1014,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU Classpath 0.97.2:";; + short | recursive ) echo "Configuration of GNU Classpath 0.98-pre:";; esac cat <<\_ACEOF @@ -1059,8 +1059,15 @@ Optional Features: default=no --disable-plugin compile gcjwebplugin (disabled by --disable-plugin) default=yes + --enable-gmp compile native java.math.BigInteger library + (disabled by --disable-gmp) default=yes + --disable-gjdoc compile GJDoc (disabled by --disable-gjdoc) + default=yes --enable-regen-headers automatically regenerate JNI headers default=yes if headers don't exist + --enable-regen-gjdoc-parser + automatically regenerate the GJDoc parser + default=yes if generated source doesn't exist --enable-tool-wrappers create tool wrapper binaries default=no --enable-static[=PKGS] build static libraries [default=no] @@ -1090,8 +1097,7 @@ Optional Packages: default='${libdir}/${PACKAGE}' --with-glibj-dir sets the installation directory for glibj.zip default='${libdir}/${PACKAGE}' - --with-vm sets the VM binary name - default='${prefix}/bin/jamvm' + --with-antlr-jar=file Use ANTLR from the specified jar file --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] @@ -1105,7 +1111,7 @@ Optional Packages: --with-vm-classes specify path to VM override source files --with-ecj-jar=ABS.PATH specify jar file containing the Eclipse Java Compiler - --with-fastjar=PATH define to use a fastjar style tool + --with-jar=PATH define to use a jar style tool --with-glibj define what to install (zip|flat|both|none|build) [default=zip] --with-gjdoc generate documentation using gjdoc (default is NO) @@ -1225,7 +1231,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -GNU Classpath configure 0.97.2 +GNU Classpath configure 0.98-pre generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1239,7 +1245,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU Classpath $as_me 0.97.2, which was +It was created by GNU Classpath $as_me 0.98-pre, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -2100,7 +2106,7 @@ fi # Define the identity of the package. PACKAGE='classpath' - VERSION='0.97.2' + VERSION='0.98-pre' cat >>confdefs.h <<_ACEOF @@ -4787,6 +4793,40 @@ else fi +# Check whether --enable-gmp or --disable-gmp was given. +if test "${enable_gmp+set}" = set; then + enableval="$enable_gmp" + case "${enableval}" in + yes|true) COMPILE_GMP=yes ;; + no|false) COMPILE_GMP=no ;; + *) COMPILE_GMP=yes ;; + esac +else + COMPILE_GMP=yes +fi; + +# Check whether --enable-gjdoc or --disable-gjdoc was given. +if test "${enable_gjdoc+set}" = set; then + enableval="$enable_gjdoc" + case "${enableval}" in + yes) COMPILE_GJDOC=yes ;; + no) COMPILE_GJDOC=no ;; + *) COMPILE_GJDOC=yes ;; + esac +else + COMPILE_GJDOC=yes +fi; + + +if test "x${COMPILE_GJDOC}" = xyes; then + CREATE_GJDOC_TRUE= + CREATE_GJDOC_FALSE='#' +else + CREATE_GJDOC_TRUE='#' + CREATE_GJDOC_FALSE= +fi + + multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in @@ -4827,20 +4867,20 @@ fi; -# Check whether --with-vm or --without-vm was given. -if test "${with_vm+set}" = set; then - withval="$with_vm" +# Check whether --with-antlr-jar or --without-antlr-jar was given. +if test "${with_antlr_jar+set}" = set; then + withval="$with_antlr_jar" - VM_BINARY=${withval} + ANTLR_JAR=$withval else - VM_BINARY='${prefix}/bin/jamvm' + ANTLR_JAR="$ANTLR_JAR" fi; - - +echo "$as_me:$LINENO: checking whether to regenerate the headers" >&5 +echo $ECHO_N "checking whether to regenerate the headers... $ECHO_C" >&6 # Check whether --enable-regen-headers or --disable-regen-headers was given. if test "${enable_regen_headers+set}" = set; then enableval="$enable_regen_headers" @@ -4850,12 +4890,14 @@ if test "${enable_regen_headers+set}" = set; then *) REGENERATE_JNI_HEADERS=yes ;; esac else - if test -e include/java_lang_VMSystem.h; then + if test -e ${srcdir}/include/java_lang_VMSystem.h; then REGENERATE_JNI_HEADERS=no ; else REGENERATE_JNI_HEADERS=yes ; fi fi; +echo "$as_me:$LINENO: result: ${REGENERATE_JNI_HEADERS}" >&5 +echo "${ECHO_T}${REGENERATE_JNI_HEADERS}" >&6 if test "x${REGENERATE_JNI_HEADERS}" = xyes; then @@ -4867,6 +4909,36 @@ else fi +echo "$as_me:$LINENO: checking whether to regenerate the GJDoc parser" >&5 +echo $ECHO_N "checking whether to regenerate the GJDoc parser... $ECHO_C" >&6 +# Check whether --enable-regen-gjdoc-parser or --disable-regen-gjdoc-parser was given. +if test "${enable_regen_gjdoc_parser+set}" = set; then + enableval="$enable_regen_gjdoc_parser" + case "${enableval}" in + yes) REGENERATE_GJDOC_PARSER=yes ;; + no) REGENERATE_GJDOC_PARSER=no ;; + *) REGENERATE_GJDOC_PARSER=yes ;; + esac +else + if test -e ${srcdir}/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaLexer.java; then + REGENERATE_GJDOC_PARSER=no ; + else + REGENERATE_GJDOC_PARSER=yes ; + fi +fi; +echo "$as_me:$LINENO: result: ${REGENERATE_GJDOC_PARSER}" >&5 +echo "${ECHO_T}${REGENERATE_GJDOC_PARSER}" >&6 + + +if test "x${REGENERATE_GJDOC_PARSER}" = xyes; then + CREATE_GJDOC_PARSER_TRUE= + CREATE_GJDOC_PARSER_FALSE='#' +else + CREATE_GJDOC_PARSER_TRUE='#' + CREATE_GJDOC_PARSER_FALSE= +fi + + # Check whether --enable-tool-wrappers or --disable-tool-wrappers was given. if test "${enable_tool_wrappers+set}" = set; then enableval="$enable_tool_wrappers" @@ -5670,13 +5742,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5673: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5745: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5676: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5748: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5679: output\"" >&5) + (eval echo "\"\$as_me:5751: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6822,7 +6894,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6825 "configure"' > conftest.$ac_ext + echo '#line 6897 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -8108,11 +8180,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8111: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8183: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8115: \$? = $ac_status" >&5 + echo "$as_me:8187: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8447,11 +8519,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8450: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8522: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8454: \$? = $ac_status" >&5 + echo "$as_me:8526: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8552,11 +8624,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8555: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8627: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8559: \$? = $ac_status" >&5 + echo "$as_me:8631: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8607,11 +8679,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8610: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8682: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8614: \$? = $ac_status" >&5 + echo "$as_me:8686: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11459,7 +11531,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11462 "configure" +#line 11534 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11555,7 +11627,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11558 "configure" +#line 11630 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15986,11 +16058,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15989: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16061: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15993: \$? = $ac_status" >&5 + echo "$as_me:16065: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16085,11 +16157,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16088: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16160: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16092: \$? = $ac_status" >&5 + echo "$as_me:16164: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16137,11 +16209,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16140: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16212: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16144: \$? = $ac_status" >&5 + echo "$as_me:16216: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17798,6 +17870,7 @@ fi + for ac_header in unistd.h sys/types.h sys/config.h sys/ioctl.h \ asm/ioctls.h \ inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \ @@ -17810,7 +17883,7 @@ for ac_header in unistd.h sys/types.h sys/config.h sys/ioctl.h \ sys/event.h sys/epoll.h \ ifaddrs.h \ netinet/in_systm.h netinet/ip.h net/if.h \ - sys/loadavg.h + sys/loadavg.h sys/sockio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -18174,6 +18247,85 @@ if test "$ac_cv_search_inet_pton" != no; then fi +echo "$as_me:$LINENO: checking for gethostname in -lsocket" >&5 +echo $ECHO_N "checking for gethostname in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_gethostname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +if test x$gcc_no_link = xyes; then + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} + { (exit 1); exit 1; }; } +fi +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostname (); +int +main () +{ +gethostname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_gethostname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_gethostname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gethostname" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_gethostname" >&6 +if test $ac_cv_lib_socket_gethostname = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + + @@ -24548,6 +24700,242 @@ echo "$as_me: error: Library requirements (gtk+-2.0 >= 2.8 gthread-2.0 >= 2.2 gd PLUGIN_DIR=$HOME/.mozilla/plugins/ fi + + if test "x${COMPILE_GMP}" = xyes; then + echo "$as_me:$LINENO: checking for __gmpz_mul_si in -lgmp" >&5 +echo $ECHO_N "checking for __gmpz_mul_si in -lgmp... $ECHO_C" >&6 +if test "${ac_cv_lib_gmp___gmpz_mul_si+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgmp $LIBS" +if test x$gcc_no_link = xyes; then + { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5 +echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;} + { (exit 1); exit 1; }; } +fi +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char __gmpz_mul_si (); +int +main () +{ +__gmpz_mul_si (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gmp___gmpz_mul_si=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_gmp___gmpz_mul_si=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_gmp___gmpz_mul_si" >&5 +echo "${ECHO_T}$ac_cv_lib_gmp___gmpz_mul_si" >&6 +if test $ac_cv_lib_gmp___gmpz_mul_si = yes; then + GMP_CFLAGS=-I/usr/include + GMP_LIBS=-lgmp +else + GMP_CFLAGS= + GMP_LIBS= +fi + + + + + +for ac_header in gmp.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## -------------------------------- ## +## Report this to classpath@gnu.org ## +## -------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + fi + +else + COMPILE_GMP=no fi if test "x${REGENERATE_JNI_HEADERS}" = xyes; then @@ -25194,29 +25582,57 @@ echo "${ECHO_T}no" >&6 fi -# Check whether --with-fastjar or --without-fastjar was given. -if test "${with_fastjar+set}" = set; then - withval="$with_fastjar" - - echo "$as_me:$LINENO: checking for user supplied fastjar" >&5 -echo $ECHO_N "checking for user supplied fastjar... $ECHO_C" >&6 - FASTJAR=${withval} - echo "$as_me:$LINENO: result: ${FASTJAR}" >&5 -echo "${ECHO_T}${FASTJAR}" >&6 + echo "$as_me:$LINENO: checking for a jar-like tool" >&5 +echo $ECHO_N "checking for a jar-like tool... $ECHO_C" >&6 + +# Check whether --with-jar or --without-jar was given. +if test "${with_jar+set}" = set; then + withval="$with_jar" + + case "${withval}" in + yes) + JAR=yes + ;; + no) + JAR=no + echo "$as_me:$LINENO: result: ${JAR}" >&5 +echo "${ECHO_T}${JAR}" >&6 + ;; + *) + if test -f "${withval}"; then + JAR="${withval}" + echo "$as_me:$LINENO: result: ${JAR}" >&5 +echo "${ECHO_T}${JAR}" >&6 + else + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 + { { echo "$as_me:$LINENO: error: The jar tool ${withval} was not found." >&5 +echo "$as_me: error: The jar tool ${withval} was not found." >&2;} + { (exit 1); exit 1; }; } + fi + ;; + esac else - for ac_prog in fastjar gjar jar + + JAR=yes + +fi; + if test x"${JAR}" = "xyes"; then + echo "$as_me:$LINENO: result: trying fastjar, gjar and jar" >&5 +echo "${ECHO_T}trying fastjar, gjar and jar" >&6 + for ac_prog in fastjar gjar jar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_FASTJAR+set}" = set; then +if test "${ac_cv_path_JAR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - case $FASTJAR in + case $JAR in [\\/]* | ?:[\\/]*) - ac_cv_path_FASTJAR="$FASTJAR" # Let the user override the test with a path. + ac_cv_path_JAR="$JAR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -25226,7 +25642,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_FASTJAR="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -25236,25 +25652,42 @@ done ;; esac fi -FASTJAR=$ac_cv_path_FASTJAR +JAR=$ac_cv_path_JAR -if test -n "$FASTJAR"; then - echo "$as_me:$LINENO: result: $FASTJAR" >&5 -echo "${ECHO_T}$FASTJAR" >&6 +if test -n "$JAR"; then + echo "$as_me:$LINENO: result: $JAR" >&5 +echo "${ECHO_T}$JAR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi - test -n "$FASTJAR" && break + test -n "$JAR" && break done -fi; - if test x"${FASTJAR}" != x; then - ZIP="" + if test x"${RHINO_JAR}" = "xyes"; then + echo "$as_me:$LINENO: result: not found" >&5 +echo "${ECHO_T}not found" >&6 + fi + fi + if test x"${JAR}" = "xno" && test x"${ZIP}" = ""; then + { { echo "$as_me:$LINENO: error: No zip or jar tool found." >&5 +echo "$as_me: error: No zip or jar tool found." >&2;} + { (exit 1); exit 1; }; } fi +if test x"${JAR}" != "xno" && test x"${JAR}" != "xyes"; then + WITH_JAR_TRUE= + WITH_JAR_FALSE='#' +else + WITH_JAR_TRUE='#' + WITH_JAR_FALSE= +fi + + + + # Check whether --with-glibj or --without-glibj was given. if test "${with_glibj+set}" = set; then withval="$with_glibj" @@ -25335,7 +25768,7 @@ echo "$as_me: error: bad value ${enableval} for --enable-examples" >&2;} else EXAMPLESDIR="examples" fi; - if test "x${use_zip}" = xno && test "x${install_class_files}" = xno; then + if test "x${build_class_files}" = xno; then EXAMPLESDIR="" fi @@ -25353,7 +25786,7 @@ echo "$as_me: error: bad value ${enableval} for --enable-tools" >&2;} else TOOLSDIR="tools" fi; - if test "x${use_zip}" = xno && test "x${install_class_files}" = xno; then + if test "x${build_class_files}" = xno; then TOOLSDIR="" fi @@ -25448,7 +25881,6 @@ else fi; - if test "x${WITH_GJDOC}" = xyes; then CREATE_API_DOCS_TRUE= CREATE_API_DOCS_FALSE='#' @@ -25457,6 +25889,20 @@ else CREATE_API_DOCS_FALSE= fi + if test "x${WITH_GJDOC}" = xyes; then + echo "$as_me:$LINENO: checking version of GJDoc" >&5 +echo $ECHO_N "checking version of GJDoc... $ECHO_C" >&6 + gjdoc_version=$(${GJDOC} --version|cut -d ' ' -f2) + echo "$as_me:$LINENO: result: ${gjdoc_version}" >&5 +echo "${ECHO_T}${gjdoc_version}" >&6 + case ${gjdoc_version} in + 0.7.9) ;; + 0.8*) ;; + *) { { echo "$as_me:$LINENO: error: Building documentation requires GJDoc >= 0.7.9, ${gjdoc_version} found." >&5 +echo "$as_me: error: Building documentation requires GJDoc >= 0.7.9, ${gjdoc_version} found." >&2;} + { (exit 1); exit 1; }; } ;; + esac + fi @@ -28537,6 +28983,924 @@ fi +if test "x${TOOLSDIR}" != x; then + if test "x${COMPILE_WRAPPERS}" = xno && test "x${enable_java_maintainer_mode}" = xyes; then + + +if test "x$JAVAPREFIX" = x; then + test "x$JAVA" = x && for ac_prog in cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_JAVA+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$JAVA"; then + ac_cv_prog_JAVA="$JAVA" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_JAVA="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +JAVA=$ac_cv_prog_JAVA +if test -n "$JAVA"; then + echo "$as_me:$LINENO: result: $JAVA" >&5 +echo "${ECHO_T}$JAVA" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$JAVA" && break +done + +else + test "x$JAVA" = x && for ac_prog in cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_JAVA+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$JAVA"; then + ac_cv_prog_JAVA="$JAVA" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_JAVA="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +JAVA=$ac_cv_prog_JAVA +if test -n "$JAVA"; then + echo "$as_me:$LINENO: result: $JAVA" >&5 +echo "${ECHO_T}$JAVA" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$JAVA" && break +done +test -n "$JAVA" || JAVA="$JAVAPREFIX" + +fi +test "x$JAVA" = x && { { echo "$as_me:$LINENO: error: no acceptable Java virtual machine found in \$PATH" >&5 +echo "$as_me: error: no acceptable Java virtual machine found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +# Extract the first word of "uudecode$EXEEXT", so it can be a program name with args. +set dummy uudecode$EXEEXT; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_uudecode+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$uudecode"; then + ac_cv_prog_uudecode="$uudecode" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_uudecode="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +uudecode=$ac_cv_prog_uudecode +if test -n "$uudecode"; then + echo "$as_me:$LINENO: result: $uudecode" >&5 +echo "${ECHO_T}$uudecode" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test x$uudecode = xyes; then +echo "$as_me:$LINENO: checking if uudecode can decode base 64 file" >&5 +echo $ECHO_N "checking if uudecode can decode base 64 file... $ECHO_C" >&6 +if test "${ac_cv_prog_uudecode_base64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat << \EOF > Test.uue +begin-base64 644 Test.class +yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE +bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51 +bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s +YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG +aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB +AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB +AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ= +==== +EOF +if uudecode$EXEEXT Test.uue; then + ac_cv_prog_uudecode_base64=yes +else + echo "configure: 29134: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 + echo "configure: failed file was:" >&5 + cat Test.uue >&5 + ac_cv_prog_uudecode_base64=no +fi +rm -f Test.uue +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_uudecode_base64" >&5 +echo "${ECHO_T}$ac_cv_prog_uudecode_base64" >&6 +fi +if test x$ac_cv_prog_uudecode_base64 != xyes; then + rm -f Test.class + { echo "$as_me:$LINENO: WARNING: I have to compile Test.class from scratch" >&5 +echo "$as_me: WARNING: I have to compile Test.class from scratch" >&2;} + if test x$ac_cv_prog_javac_works = xno; then + { { echo "$as_me:$LINENO: error: Cannot compile java source. $JAVAC does not work properly" >&5 +echo "$as_me: error: Cannot compile java source. $JAVAC does not work properly" >&2;} + { (exit 1); exit 1; }; } + fi + if test x$ac_cv_prog_javac_works = x; then + +ECJ_OPTS="-warn:-deprecation,serial,unusedImport" +JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides" +GCJ_OPTS="-g" +if test "x$JAVAPREFIX" = x; then + test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_JAVAC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$JAVAC"; then + ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_JAVAC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +JAVAC=$ac_cv_prog_JAVAC +if test -n "$JAVAC"; then + echo "$as_me:$LINENO: result: $JAVAC" >&5 +echo "${ECHO_T}$JAVAC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$JAVAC" && break +done + +else + test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_JAVAC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$JAVAC"; then + ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_JAVAC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +JAVAC=$ac_cv_prog_JAVAC +if test -n "$JAVAC"; then + echo "$as_me:$LINENO: result: $JAVAC" >&5 +echo "${ECHO_T}$JAVAC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$JAVAC" && break +done +test -n "$JAVAC" || JAVAC="$JAVAPREFIX" + +fi +test "x$JAVAC" = x && { { echo "$as_me:$LINENO: error: no acceptable Java compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable Java compiler found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if $JAVAC is a version of gcj" >&5 +echo $ECHO_N "checking if $JAVAC is a version of gcj... $ECHO_C" >&6 +if test "${ac_cv_prog_javac_is_gcj+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if $JAVAC --version | grep gcj > /dev/null; then + ac_cv_prog_javac_is_gcj=yes; + JAVAC="$JAVAC $GCJ_OPTS"; +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_javac_is_gcj" >&5 +echo "${ECHO_T}$ac_cv_prog_javac_is_gcj" >&6 +JAVAC_IS_GCJ=$ac_cv_prog_javac_is_gcj + + + +if test x"${JAVAC_IS_GCJ}" = xyes; then + GCJ_JAVAC_TRUE= + GCJ_JAVAC_FALSE='#' +else + GCJ_JAVAC_TRUE='#' + GCJ_JAVAC_FALSE= +fi + +if test "$enable_java_maintainer_mode" = yes; then + +echo "$as_me:$LINENO: checking if $JAVAC works" >&5 +echo $ECHO_N "checking if $JAVAC works... $ECHO_C" >&6 +if test "${ac_cv_prog_javac_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +JAVA_TEST=Object.java +CLASS_TEST=Object.class +cat << \EOF > $JAVA_TEST +/* #line 29281 "configure" */ +package java.lang; + +public class Object +{ + static void doStuff() + { + } +} +EOF +if test x$JAVAC_IS_GCJ = xyes; then + CMD="$JAVAC $JAVACFLAGS -fsource=1.5 -ftarget=1.5 $JAVA_TEST" +else + CMD="$JAVAC $JAVACFLAGS -source 1.5 -target 1.5 $JAVA_TEST" +fi +if { ac_try='$CMD' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null 2>&1; then + ac_cv_prog_javac_works=yes +else + { { echo "$as_me:$LINENO: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 +echo "$as_me: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} + { (exit 1); exit 1; }; } + echo "configure: failed program was:" >&5 + cat $JAVA_TEST >&5 +fi +rm -f $JAVA_TEST $CLASS_TEST + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_javac_works" >&5 +echo "${ECHO_T}$ac_cv_prog_javac_works" >&6 + +fi + + fi +fi +echo "$as_me:$LINENO: checking if $JAVA works" >&5 +echo $ECHO_N "checking if $JAVA works... $ECHO_C" >&6 +if test "${ac_cv_prog_java_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +JAVA_TEST=Test.java +CLASS_TEST=Test.class +TEST=Test +cat << \EOF > $JAVA_TEST +/* [#]line 29330 "configure" */ +public class Test { +public static void main (String args[]) { + System.exit (0); +} } +EOF +if test x$ac_cv_prog_uudecode_base64 != xyes; then + if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && test -s $CLASS_TEST; then + : + else + echo "configure: failed program was:" >&5 + cat $JAVA_TEST >&5 + { { echo "$as_me:$LINENO: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 +echo "$as_me: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} + { (exit 1); exit 1; }; } + fi +fi +if { ac_try='CLASSPATH=.:$CLASSPATH $JAVA $JAVAFLAGS $TEST' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null 2>&1; then + ac_cv_prog_java_works=yes +else + echo "configure: failed program was:" >&5 + cat $JAVA_TEST >&5 + { { echo "$as_me:$LINENO: error: The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" >&5 +echo "$as_me: error: The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" >&2;} + { (exit 1); exit 1; }; } +fi +rm -fr $JAVA_TEST $CLASS_TEST Test.uue + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_java_works" >&5 +echo "${ECHO_T}$ac_cv_prog_java_works" >&6 + + + + fi + if test "x${COMPILE_GJDOC}" = xyes; then + + echo "$as_me:$LINENO: checking for the ANTLR parser generator JAR file" >&5 +echo $ECHO_N "checking for the ANTLR parser generator JAR file... $ECHO_C" >&6 + if test -z "$ANTLR_JAR"; then + for antlr_lib_home in `ls -d /usr/local/share/antlr* 2> /dev/null` \ + /usr/share/antlr/lib /usr/share/java /usr/lib; + do + if test -f "$antlr_lib_home/antlr.jar"; then + ANTLR_JAR="$antlr_lib_home/antlr.jar" + break + fi + done + fi + test -f $ANTLR_JAR || { { echo "$as_me:$LINENO: error: specified ANTLR jar file $ANTLR_JAR not found." >&5 +echo "$as_me: error: specified ANTLR jar file $ANTLR_JAR not found." >&2;} + { (exit 1); exit 1; }; } \ + && echo "$as_me:$LINENO: result: $ANTLR_JAR" >&5 +echo "${ECHO_T}$ANTLR_JAR" >&6 + + + if test "x${REGENERATE_GJDOC_PARSER}" = xyes; then + if test "x${enable_java_maintainer_mode}" = xyes; then + +if test "x$JAVAPREFIX" = x; then + test "x$JAVA" = x && for ac_prog in cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_JAVA+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$JAVA"; then + ac_cv_prog_JAVA="$JAVA" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_JAVA="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +JAVA=$ac_cv_prog_JAVA +if test -n "$JAVA"; then + echo "$as_me:$LINENO: result: $JAVA" >&5 +echo "${ECHO_T}$JAVA" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$JAVA" && break +done + +else + test "x$JAVA" = x && for ac_prog in cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_JAVA+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$JAVA"; then + ac_cv_prog_JAVA="$JAVA" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_JAVA="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +JAVA=$ac_cv_prog_JAVA +if test -n "$JAVA"; then + echo "$as_me:$LINENO: result: $JAVA" >&5 +echo "${ECHO_T}$JAVA" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$JAVA" && break +done +test -n "$JAVA" || JAVA="$JAVAPREFIX" + +fi +test "x$JAVA" = x && { { echo "$as_me:$LINENO: error: no acceptable Java virtual machine found in \$PATH" >&5 +echo "$as_me: error: no acceptable Java virtual machine found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +# Extract the first word of "uudecode$EXEEXT", so it can be a program name with args. +set dummy uudecode$EXEEXT; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_uudecode+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$uudecode"; then + ac_cv_prog_uudecode="$uudecode" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_uudecode="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +uudecode=$ac_cv_prog_uudecode +if test -n "$uudecode"; then + echo "$as_me:$LINENO: result: $uudecode" >&5 +echo "${ECHO_T}$uudecode" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test x$uudecode = xyes; then +echo "$as_me:$LINENO: checking if uudecode can decode base 64 file" >&5 +echo $ECHO_N "checking if uudecode can decode base 64 file... $ECHO_C" >&6 +if test "${ac_cv_prog_uudecode_base64+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +cat << \EOF > Test.uue +begin-base64 644 Test.class +yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE +bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51 +bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s +YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG +aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB +AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB +AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ= +==== +EOF +if uudecode$EXEEXT Test.uue; then + ac_cv_prog_uudecode_base64=yes +else + echo "configure: 29543: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 + echo "configure: failed file was:" >&5 + cat Test.uue >&5 + ac_cv_prog_uudecode_base64=no +fi +rm -f Test.uue +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_uudecode_base64" >&5 +echo "${ECHO_T}$ac_cv_prog_uudecode_base64" >&6 +fi +if test x$ac_cv_prog_uudecode_base64 != xyes; then + rm -f Test.class + { echo "$as_me:$LINENO: WARNING: I have to compile Test.class from scratch" >&5 +echo "$as_me: WARNING: I have to compile Test.class from scratch" >&2;} + if test x$ac_cv_prog_javac_works = xno; then + { { echo "$as_me:$LINENO: error: Cannot compile java source. $JAVAC does not work properly" >&5 +echo "$as_me: error: Cannot compile java source. $JAVAC does not work properly" >&2;} + { (exit 1); exit 1; }; } + fi + if test x$ac_cv_prog_javac_works = x; then + +ECJ_OPTS="-warn:-deprecation,serial,unusedImport" +JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides" +GCJ_OPTS="-g" +if test "x$JAVAPREFIX" = x; then + test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_JAVAC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$JAVAC"; then + ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_JAVAC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +JAVAC=$ac_cv_prog_JAVAC +if test -n "$JAVAC"; then + echo "$as_me:$LINENO: result: $JAVAC" >&5 +echo "${ECHO_T}$JAVAC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$JAVAC" && break +done + +else + test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_JAVAC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$JAVAC"; then + ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_JAVAC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +JAVAC=$ac_cv_prog_JAVAC +if test -n "$JAVAC"; then + echo "$as_me:$LINENO: result: $JAVAC" >&5 +echo "${ECHO_T}$JAVAC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$JAVAC" && break +done +test -n "$JAVAC" || JAVAC="$JAVAPREFIX" + +fi +test "x$JAVAC" = x && { { echo "$as_me:$LINENO: error: no acceptable Java compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable Java compiler found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if $JAVAC is a version of gcj" >&5 +echo $ECHO_N "checking if $JAVAC is a version of gcj... $ECHO_C" >&6 +if test "${ac_cv_prog_javac_is_gcj+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if $JAVAC --version | grep gcj > /dev/null; then + ac_cv_prog_javac_is_gcj=yes; + JAVAC="$JAVAC $GCJ_OPTS"; +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_javac_is_gcj" >&5 +echo "${ECHO_T}$ac_cv_prog_javac_is_gcj" >&6 +JAVAC_IS_GCJ=$ac_cv_prog_javac_is_gcj + + + +if test x"${JAVAC_IS_GCJ}" = xyes; then + GCJ_JAVAC_TRUE= + GCJ_JAVAC_FALSE='#' +else + GCJ_JAVAC_TRUE='#' + GCJ_JAVAC_FALSE= +fi + +if test "$enable_java_maintainer_mode" = yes; then + +echo "$as_me:$LINENO: checking if $JAVAC works" >&5 +echo $ECHO_N "checking if $JAVAC works... $ECHO_C" >&6 +if test "${ac_cv_prog_javac_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +JAVA_TEST=Object.java +CLASS_TEST=Object.class +cat << \EOF > $JAVA_TEST +/* #line 29690 "configure" */ +package java.lang; + +public class Object +{ + static void doStuff() + { + } +} +EOF +if test x$JAVAC_IS_GCJ = xyes; then + CMD="$JAVAC $JAVACFLAGS -fsource=1.5 -ftarget=1.5 $JAVA_TEST" +else + CMD="$JAVAC $JAVACFLAGS -source 1.5 -target 1.5 $JAVA_TEST" +fi +if { ac_try='$CMD' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null 2>&1; then + ac_cv_prog_javac_works=yes +else + { { echo "$as_me:$LINENO: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 +echo "$as_me: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} + { (exit 1); exit 1; }; } + echo "configure: failed program was:" >&5 + cat $JAVA_TEST >&5 +fi +rm -f $JAVA_TEST $CLASS_TEST + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_javac_works" >&5 +echo "${ECHO_T}$ac_cv_prog_javac_works" >&6 + +fi + + fi +fi +echo "$as_me:$LINENO: checking if $JAVA works" >&5 +echo $ECHO_N "checking if $JAVA works... $ECHO_C" >&6 +if test "${ac_cv_prog_java_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +JAVA_TEST=Test.java +CLASS_TEST=Test.class +TEST=Test +cat << \EOF > $JAVA_TEST +/* [#]line 29739 "configure" */ +public class Test { +public static void main (String args[]) { + System.exit (0); +} } +EOF +if test x$ac_cv_prog_uudecode_base64 != xyes; then + if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && test -s $CLASS_TEST; then + : + else + echo "configure: failed program was:" >&5 + cat $JAVA_TEST >&5 + { { echo "$as_me:$LINENO: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 +echo "$as_me: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} + { (exit 1); exit 1; }; } + fi +fi +if { ac_try='CLASSPATH=.:$CLASSPATH $JAVA $JAVAFLAGS $TEST' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null 2>&1; then + ac_cv_prog_java_works=yes +else + echo "configure: failed program was:" >&5 + cat $JAVA_TEST >&5 + { { echo "$as_me:$LINENO: error: The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" >&5 +echo "$as_me: error: The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" >&2;} + { (exit 1); exit 1; }; } +fi +rm -fr $JAVA_TEST $CLASS_TEST Test.uue + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_java_works" >&5 +echo "${ECHO_T}$ac_cv_prog_java_works" >&6 + + + + + if test -n "$ac_tool_prefix"; then + for ac_prog in cantlr runantlr antlr + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ANTLR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ANTLR"; then + ac_cv_prog_ANTLR="$ANTLR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ANTLR="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ANTLR=$ac_cv_prog_ANTLR +if test -n "$ANTLR"; then + echo "$as_me:$LINENO: result: $ANTLR" >&5 +echo "${ECHO_T}$ANTLR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ANTLR" && break + done +fi +if test -z "$ANTLR"; then + ac_ct_ANTLR=$ANTLR + for ac_prog in cantlr runantlr antlr +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_ANTLR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_ANTLR"; then + ac_cv_prog_ac_ct_ANTLR="$ac_ct_ANTLR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_ANTLR="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_ANTLR=$ac_cv_prog_ac_ct_ANTLR +if test -n "$ac_ct_ANTLR"; then + echo "$as_me:$LINENO: result: $ac_ct_ANTLR" >&5 +echo "${ECHO_T}$ac_ct_ANTLR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_ANTLR" && break +done + + ANTLR=$ac_ct_ANTLR +fi + + if test "x$ANTLR" = x; then + if test -z "$JAVA"; then + { { echo "$as_me:$LINENO: error: Failed to find either an antlr binary or a suitable Java runtime for ANTLR." >&5 +echo "$as_me: error: Failed to find either an antlr binary or a suitable Java runtime for ANTLR." >&2;} + { (exit 1); exit 1; }; } + else + ANTLR="$JAVA -classpath $ANTLR_JAR antlr.Tool" + fi + fi + + echo "$as_me:$LINENO: checking for antlr 2.7.1 or better" >&5 +echo $ECHO_N "checking for antlr 2.7.1 or better... $ECHO_C" >&6 + antlr_version_str=`$ANTLR 2>&1 | head -n 1 | sed '/.*Version */!d; s///;q'` + if test "$antlr_version_str"; then + antlr_version_regex='s/\([[:digit:]]\+\)\.\([[:digit:]]\+\)\.\([[:digit:]]\+\).*$/' + antlr_version_major=`echo $antlr_version_str | sed "$antlr_version_regex\\1/"` + antlr_version_minor=`echo $antlr_version_str | sed "$antlr_version_regex\\2/"` + antlr_version_micro=`echo $antlr_version_str | sed "$antlr_version_regex\\3/"` + (test $antlr_version_major -gt 2 || \ + (test $antlr_version_major -eq 2 && \ + test $antlr_version_minor -gt 7) || \ + (test $antlr_version_major -eq 2 && \ + test $antlr_version_minor -eq 7 && \ + test $antlr_version_micro -ge 1)) + fi + echo "$as_me:$LINENO: result: $antlr_version_major.$antlr_version_minor.$antlr_version_micro" >&5 +echo "${ECHO_T}$antlr_version_major.$antlr_version_minor.$antlr_version_micro" >&6 + + fi + fi + fi +fi + + # Check for javac if we need to build either the class library, # the examples or the tools if test "x${use_glibj_zip}" = xfalse || \ @@ -28544,9 +29908,11 @@ if test "x${use_glibj_zip}" = xfalse || \ test "x${TOOLSDIR}" != x && \ test "x${build_class_files}" != xno; then - +ECJ_OPTS="-warn:-deprecation,serial,unusedImport" +JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides" +GCJ_OPTS="-g" if test "x$JAVAPREFIX" = x; then - test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT -warn:-deprecation,serial,unusedImport" "ecj-3.3$EXEEXT -warn:-deprecation,serial,unusedImport" "ecj-3.2$EXEEXT -warn:-deprecation,serial,unusedImport" "javac$EXEEXT -Xlint:unchecked" "gcj$EXEEXT -C" + test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -28587,7 +29953,7 @@ fi done else - test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT -warn:-deprecation,serial,unusedImport" "ecj-3.3$EXEEXT -warn:-deprecation,serial,unusedImport" "ecj-3.2$EXEEXT -warn:-deprecation,serial,unusedImport" "javac$EXEEXT -Xlint:unchecked" "gcj$EXEEXT -C" + test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -28632,6 +29998,31 @@ fi test "x$JAVAC" = x && { { echo "$as_me:$LINENO: error: no acceptable Java compiler found in \$PATH" >&5 echo "$as_me: error: no acceptable Java compiler found in \$PATH" >&2;} { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if $JAVAC is a version of gcj" >&5 +echo $ECHO_N "checking if $JAVAC is a version of gcj... $ECHO_C" >&6 +if test "${ac_cv_prog_javac_is_gcj+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if $JAVAC --version | grep gcj > /dev/null; then + ac_cv_prog_javac_is_gcj=yes; + JAVAC="$JAVAC $GCJ_OPTS"; +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_javac_is_gcj" >&5 +echo "${ECHO_T}$ac_cv_prog_javac_is_gcj" >&6 +JAVAC_IS_GCJ=$ac_cv_prog_javac_is_gcj + + + +if test x"${JAVAC_IS_GCJ}" = xyes; then + GCJ_JAVAC_TRUE= + GCJ_JAVAC_FALSE='#' +else + GCJ_JAVAC_TRUE='#' + GCJ_JAVAC_FALSE= +fi + if test "$enable_java_maintainer_mode" = yes; then echo "$as_me:$LINENO: checking if $JAVAC works" >&5 @@ -28643,7 +30034,7 @@ else JAVA_TEST=Object.java CLASS_TEST=Object.class cat << \EOF > $JAVA_TEST -/* #line 28646 "configure" */ +/* #line 30037 "configure" */ package java.lang; public class Object @@ -28653,7 +30044,12 @@ public class Object } } EOF -if { ac_try='$JAVAC $JAVA_TEST' +if test x$JAVAC_IS_GCJ = xyes; then + CMD="$JAVAC $JAVACFLAGS -fsource=1.5 -ftarget=1.5 $JAVA_TEST" +else + CMD="$JAVAC $JAVACFLAGS -source 1.5 -target 1.5 $JAVA_TEST" +fi +if { ac_try='$CMD' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -28679,7 +30075,7 @@ fi JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST - /* #line 28682 "configure" */ + /* #line 30078 "configure" */ public class Test { public static void main(String args) @@ -28688,17 +30084,19 @@ fi } } EOF - echo "$as_me:$LINENO: checking whether javac supports -J" >&5 + if test x$JAVAC_IS_GCJ != xyes; then + echo "$as_me:$LINENO: checking whether javac supports -J" >&5 echo $ECHO_N "checking whether javac supports -J... $ECHO_C" >&6 - $JAVAC $JAVACFLAGS -J-Xmx768M -sourcepath '' $JAVA_TEST - javac_result=$? - if test "x$javac_result" = "x0"; then - echo "$as_me:$LINENO: result: yes" >&5 + $JAVAC $JAVACFLAGS -J-Xmx768M -sourcepath '' $JAVA_TEST + javac_result=$? + if test "x$javac_result" = "x0"; then + echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 - JAVAC_MEM_OPT="-J-Xmx768M" - else - echo "$as_me:$LINENO: result: no" >&5 + JAVAC_MEM_OPT="-J-Xmx768M" + else + echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 + fi fi rm -f $JAVA_TEST $CLASS_TEST @@ -29029,7 +30427,36 @@ fi - ac_config_files="$ac_config_files Makefile doc/Makefile doc/api/Makefile external/Makefile external/sax/Makefile external/w3c_dom/Makefile external/relaxngDatatype/Makefile external/jsr166/Makefile gnu/classpath/Configuration.java gnu/java/security/Configuration.java include/Makefile native/Makefile native/fdlibm/Makefile native/jawt/Makefile native/jni/Makefile native/jni/classpath/Makefile native/jni/java-io/Makefile native/jni/java-lang/Makefile native/jni/java-net/Makefile native/jni/java-nio/Makefile native/jni/java-util/Makefile native/jni/gtk-peer/Makefile native/jni/gconf-peer/Makefile native/jni/gstreamer-peer/Makefile native/jni/qt-peer/Makefile native/jni/xmlj/Makefile native/jni/midi-alsa/Makefile native/jni/midi-dssi/Makefile native/jni/native-lib/Makefile native/plugin/Makefile resource/Makefile resource/META-INF/services/java.util.prefs.PreferencesFactory resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader resource/META-INF/services/javax.sound.sampled.spi.MixerProvider scripts/Makefile scripts/classpath.spec lib/Makefile lib/gen-classlist.sh lib/copy-vmresources.sh scripts/check_jni_methods.sh tools/Makefile examples/Makefile examples/Makefile.jawt examples/Makefile.java2d" +WANT_NATIVE_BIG_INTEGER=false +if test "x${COMPILE_GMP}" = xyes; then + if test "x${ac_cv_lib_gmp___gmpz_mul_si}" = xyes; then + if test "x${ac_cv_header_gmp_h}" = xyes; then + WANT_NATIVE_BIG_INTEGER=true + +cat >>confdefs.h <<\_ACEOF +#define WITH_GNU_MP 1 +_ACEOF + + else + COMPILE_GMP=no + fi + else + COMPILE_GMP=no + fi +fi + + + +if test "x${COMPILE_GMP}" = xyes; then + CREATE_GMPBI_LIBRARY_TRUE= + CREATE_GMPBI_LIBRARY_FALSE='#' +else + CREATE_GMPBI_LIBRARY_TRUE='#' + CREATE_GMPBI_LIBRARY_FALSE= +fi + + + ac_config_files="$ac_config_files Makefile doc/Makefile doc/api/Makefile external/Makefile external/sax/Makefile external/w3c_dom/Makefile external/relaxngDatatype/Makefile external/jsr166/Makefile gnu/classpath/Configuration.java gnu/java/security/Configuration.java include/Makefile native/Makefile native/fdlibm/Makefile native/jawt/Makefile native/jni/Makefile native/jni/classpath/Makefile native/jni/java-io/Makefile native/jni/java-lang/Makefile native/jni/java-math/Makefile native/jni/java-net/Makefile native/jni/java-nio/Makefile native/jni/java-util/Makefile native/jni/gtk-peer/Makefile native/jni/gconf-peer/Makefile native/jni/gstreamer-peer/Makefile native/jni/qt-peer/Makefile native/jni/xmlj/Makefile native/jni/midi-alsa/Makefile native/jni/midi-dssi/Makefile native/jni/native-lib/Makefile native/plugin/Makefile resource/Makefile resource/META-INF/services/java.util.prefs.PreferencesFactory resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader resource/META-INF/services/javax.sound.sampled.spi.MixerProvider scripts/Makefile scripts/classpath.spec lib/Makefile lib/gen-classlist.sh lib/copy-vmresources.sh scripts/check_jni_methods.sh tools/Makefile examples/Makefile examples/Makefile.jawt examples/Makefile.java2d" if test "x${COMPILE_WRAPPERS}" = xyes; then @@ -29066,6 +30493,14 @@ if test "x${COMPILE_WRAPPERS}" = xyes; then fi +if test "x${COMPILE_GJDOC}" = xyes +then + ac_config_files="$ac_config_files tools/gjdoc" + + ac_config_commands="$ac_config_commands gjdoc" + +fi + ac_config_commands="$ac_config_commands gen-classlist" ac_config_commands="$ac_config_commands copy-vmresources" @@ -29266,6 +30701,13 @@ echo "$as_me: error: conditional \"CREATE_PLUGIN\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${CREATE_GJDOC_TRUE}" && test -z "${CREATE_GJDOC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CREATE_GJDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CREATE_GJDOC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${CREATE_JNI_HEADERS_TRUE}" && test -z "${CREATE_JNI_HEADERS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CREATE_JNI_HEADERS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -29273,6 +30715,13 @@ echo "$as_me: error: conditional \"CREATE_JNI_HEADERS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${CREATE_GJDOC_PARSER_TRUE}" && test -z "${CREATE_GJDOC_PARSER_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CREATE_GJDOC_PARSER\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CREATE_GJDOC_PARSER\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${CREATE_WRAPPERS_TRUE}" && test -z "${CREATE_WRAPPERS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CREATE_WRAPPERS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -29308,6 +30757,13 @@ echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${WITH_JAR_TRUE}" && test -z "${WITH_JAR_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"WITH_JAR\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"WITH_JAR\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${INSTALL_GLIBJ_ZIP_TRUE}" && test -z "${INSTALL_GLIBJ_ZIP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"INSTALL_GLIBJ_ZIP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -29350,6 +30806,27 @@ echo "$as_me: error: conditional \"USE_PREBUILT_GLIBJ_ZIP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${GCJ_JAVAC_TRUE}" && test -z "${GCJ_JAVAC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"GCJ_JAVAC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"GCJ_JAVAC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${GCJ_JAVAC_TRUE}" && test -z "${GCJ_JAVAC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"GCJ_JAVAC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"GCJ_JAVAC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${GCJ_JAVAC_TRUE}" && test -z "${GCJ_JAVAC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"GCJ_JAVAC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"GCJ_JAVAC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${USE_ESCHER_TRUE}" && test -z "${USE_ESCHER_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"USE_ESCHER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -29364,6 +30841,13 @@ echo "$as_me: error: conditional \"ENABLE_LOCAL_SOCKETS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${CREATE_GMPBI_LIBRARY_TRUE}" && test -z "${CREATE_GMPBI_LIBRARY_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CREATE_GMPBI_LIBRARY\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CREATE_GMPBI_LIBRARY\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files @@ -29635,7 +31119,7 @@ _ASBOX } >&5 cat >&5 <<_CSEOF -This file was extended by GNU Classpath $as_me 0.97.2, which was +This file was extended by GNU Classpath $as_me 0.98-pre, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -29701,7 +31185,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -GNU Classpath config.status 0.97.2 +GNU Classpath config.status 0.98-pre configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" @@ -30210,6 +31694,7 @@ do "native/jni/classpath/Makefile" ) CONFIG_FILES="$CONFIG_FILES native/jni/classpath/Makefile" ;; "native/jni/java-io/Makefile" ) CONFIG_FILES="$CONFIG_FILES native/jni/java-io/Makefile" ;; "native/jni/java-lang/Makefile" ) CONFIG_FILES="$CONFIG_FILES native/jni/java-lang/Makefile" ;; + "native/jni/java-math/Makefile" ) CONFIG_FILES="$CONFIG_FILES native/jni/java-math/Makefile" ;; "native/jni/java-net/Makefile" ) CONFIG_FILES="$CONFIG_FILES native/jni/java-net/Makefile" ;; "native/jni/java-nio/Makefile" ) CONFIG_FILES="$CONFIG_FILES native/jni/java-nio/Makefile" ;; "native/jni/java-util/Makefile" ) CONFIG_FILES="$CONFIG_FILES native/jni/java-util/Makefile" ;; @@ -30248,6 +31733,7 @@ do "tools/grmid" ) CONFIG_FILES="$CONFIG_FILES tools/grmid" ;; "tools/grmic" ) CONFIG_FILES="$CONFIG_FILES tools/grmic" ;; "tools/gjavah" ) CONFIG_FILES="$CONFIG_FILES tools/gjavah" ;; + "tools/gjdoc" ) CONFIG_FILES="$CONFIG_FILES tools/gjdoc" ;; "$ac_config_links_1" ) CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;; "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; @@ -30266,6 +31752,7 @@ do "grmid" ) CONFIG_COMMANDS="$CONFIG_COMMANDS grmid" ;; "grmic" ) CONFIG_COMMANDS="$CONFIG_COMMANDS grmic" ;; "gjavah" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gjavah" ;; + "gjdoc" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gjdoc" ;; "gen-classlist" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gen-classlist" ;; "copy-vmresources" ) CONFIG_COMMANDS="$CONFIG_COMMANDS copy-vmresources" ;; "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; @@ -30438,12 +31925,15 @@ s,@CREATE_QT_PEER_LIBRARIES_TRUE@,$CREATE_QT_PEER_LIBRARIES_TRUE,;t t s,@CREATE_QT_PEER_LIBRARIES_FALSE@,$CREATE_QT_PEER_LIBRARIES_FALSE,;t t s,@CREATE_PLUGIN_TRUE@,$CREATE_PLUGIN_TRUE,;t t s,@CREATE_PLUGIN_FALSE@,$CREATE_PLUGIN_FALSE,;t t +s,@CREATE_GJDOC_TRUE@,$CREATE_GJDOC_TRUE,;t t +s,@CREATE_GJDOC_FALSE@,$CREATE_GJDOC_FALSE,;t t s,@toolexeclibdir@,$toolexeclibdir,;t t s,@nativeexeclibdir@,$nativeexeclibdir,;t t s,@glibjdir@,$glibjdir,;t t -s,@VM_BINARY@,$VM_BINARY,;t t s,@CREATE_JNI_HEADERS_TRUE@,$CREATE_JNI_HEADERS_TRUE,;t t s,@CREATE_JNI_HEADERS_FALSE@,$CREATE_JNI_HEADERS_FALSE,;t t +s,@CREATE_GJDOC_PARSER_TRUE@,$CREATE_GJDOC_PARSER_TRUE,;t t +s,@CREATE_GJDOC_PARSER_FALSE@,$CREATE_GJDOC_PARSER_FALSE,;t t s,@CREATE_WRAPPERS_TRUE@,$CREATE_WRAPPERS_TRUE,;t t s,@CREATE_WRAPPERS_FALSE@,$CREATE_WRAPPERS_FALSE,;t t s,@LN_S@,$LN_S,;t t @@ -30527,6 +32017,8 @@ s,@MOZILLA_LIBS@,$MOZILLA_LIBS,;t t s,@GLIB_CFLAGS@,$GLIB_CFLAGS,;t t s,@GLIB_LIBS@,$GLIB_LIBS,;t t s,@PLUGIN_DIR@,$PLUGIN_DIR,;t t +s,@GMP_CFLAGS@,$GMP_CFLAGS,;t t +s,@GMP_LIBS@,$GMP_LIBS,;t t s,@USER_JAVAH@,$USER_JAVAH,;t t s,@CLASSPATH_INCLUDES@,$CLASSPATH_INCLUDES,;t t s,@vm_classes@,$vm_classes,;t t @@ -30543,7 +32035,9 @@ s,@CP@,$CP,;t t s,@DATE@,$DATE,;t t s,@FIND@,$FIND,;t t s,@ZIP@,$ZIP,;t t -s,@FASTJAR@,$FASTJAR,;t t +s,@JAR@,$JAR,;t t +s,@WITH_JAR_TRUE@,$WITH_JAR_TRUE,;t t +s,@WITH_JAR_FALSE@,$WITH_JAR_FALSE,;t t s,@INSTALL_GLIBJ_ZIP_TRUE@,$INSTALL_GLIBJ_ZIP_TRUE,;t t s,@INSTALL_GLIBJ_ZIP_FALSE@,$INSTALL_GLIBJ_ZIP_FALSE,;t t s,@INSTALL_CLASS_FILES_TRUE@,$INSTALL_CLASS_FILES_TRUE,;t t @@ -30562,7 +32056,15 @@ s,@REGEN_PARSERS_FALSE@,$REGEN_PARSERS_FALSE,;t t s,@USE_PREBUILT_GLIBJ_ZIP_TRUE@,$USE_PREBUILT_GLIBJ_ZIP_TRUE,;t t s,@USE_PREBUILT_GLIBJ_ZIP_FALSE@,$USE_PREBUILT_GLIBJ_ZIP_FALSE,;t t s,@PATH_TO_GLIBJ_ZIP@,$PATH_TO_GLIBJ_ZIP,;t t +s,@JAVA@,$JAVA,;t t +s,@uudecode@,$uudecode,;t t s,@JAVAC@,$JAVAC,;t t +s,@JAVAC_IS_GCJ@,$JAVAC_IS_GCJ,;t t +s,@GCJ_JAVAC_TRUE@,$GCJ_JAVAC_TRUE,;t t +s,@GCJ_JAVAC_FALSE@,$GCJ_JAVAC_FALSE,;t t +s,@ANTLR_JAR@,$ANTLR_JAR,;t t +s,@ANTLR@,$ANTLR,;t t +s,@ac_ct_ANTLR@,$ac_ct_ANTLR,;t t s,@JAVAC_MEM_OPT@,$JAVAC_MEM_OPT,;t t s,@USE_ESCHER_TRUE@,$USE_ESCHER_TRUE,;t t s,@USE_ESCHER_FALSE@,$USE_ESCHER_FALSE,;t t @@ -30570,6 +32072,9 @@ s,@PATH_TO_ESCHER@,$PATH_TO_ESCHER,;t t s,@ENABLE_LOCAL_SOCKETS_TRUE@,$ENABLE_LOCAL_SOCKETS_TRUE,;t t s,@ENABLE_LOCAL_SOCKETS_FALSE@,$ENABLE_LOCAL_SOCKETS_FALSE,;t t s,@DEFAULT_PREFS_PEER@,$DEFAULT_PREFS_PEER,;t t +s,@WANT_NATIVE_BIG_INTEGER@,$WANT_NATIVE_BIG_INTEGER,;t t +s,@CREATE_GMPBI_LIBRARY_TRUE@,$CREATE_GMPBI_LIBRARY_TRUE,;t t +s,@CREATE_GMPBI_LIBRARY_FALSE@,$CREATE_GMPBI_LIBRARY_FALSE,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF @@ -32717,6 +34222,7 @@ echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} grmid ) chmod 755 tools/grmid ;; grmic ) chmod 755 tools/grmic ;; gjavah ) chmod 755 tools/gjavah ;; + gjdoc ) chmod 755 tools/gjdoc ;; gen-classlist ) chmod 755 lib/gen-classlist.sh ;; copy-vmresources ) chmod 755 lib/copy-vmresources.sh ;; esac diff --git a/libjava/classpath/configure.ac b/libjava/classpath/configure.ac index 54a3efce22f..18311eab50a 100644 --- a/libjava/classpath/configure.ac +++ b/libjava/classpath/configure.ac @@ -6,7 +6,7 @@ dnl ----------------------------------------------------------- dnl define([AC_CACHE_LOAD], )dnl dnl define([AC_CACHE_SAVE], )dnl -AC_INIT([GNU Classpath],[0.97.2],[classpath@gnu.org],[classpath]) +AC_INIT([GNU Classpath],[0.98-pre],[classpath@gnu.org],[classpath]) AC_CONFIG_SRCDIR(java/lang/System.java) dnl GCJ LOCAL @@ -284,6 +284,31 @@ AC_ARG_ENABLE([plugin], AM_CONDITIONAL(CREATE_PLUGIN, test "x${COMPILE_PLUGIN}" = xyes) dnl ----------------------------------------------------------- +dnl Native java.math.BigInteger (enabled by default) +dnl ----------------------------------------------------------- +AC_ARG_ENABLE([gmp], + [AS_HELP_STRING(--enable-gmp, + compile native java.math.BigInteger library (disabled by --disable-gmp) [default=yes])], + [case "${enableval}" in + yes|true) COMPILE_GMP=yes ;; + no|false) COMPILE_GMP=no ;; + *) COMPILE_GMP=yes ;; + esac], + [COMPILE_GMP=yes]) + +dnl ----------------------------------------------------------- +dnl GJDoc (enabled by default) +dnl ----------------------------------------------------------- +AC_ARG_ENABLE([gjdoc], + [AS_HELP_STRING(--disable-gjdoc,compile GJDoc (disabled by --disable-gjdoc) [default=yes])], + [case "${enableval}" in + yes) COMPILE_GJDOC=yes ;; + no) COMPILE_GJDOC=no ;; + *) COMPILE_GJDOC=yes ;; + esac], + [COMPILE_GJDOC=yes]) +AM_CONDITIONAL(CREATE_GJDOC, test "x${COMPILE_GJDOC}" = xyes) + dnl GCJ LOCAL: Calculates and substitutes toolexeclibdir. $libdir is dnl defined to the same value for all multilibs. We define toolexeclibdir dnl so that we can refer to the multilib installation directories from @@ -321,22 +346,21 @@ AC_ARG_WITH([glibj-dir], AC_SUBST(glibjdir) dnl ----------------------------------------------------------- -dnl Sets the VM name for use in tool wrapper scripts +dnl Sets the Antlr jar to use for compiling gjdoc dnl ----------------------------------------------------------- -AC_ARG_WITH([vm], - [AS_HELP_STRING(--with-vm,sets the VM binary name [default='${prefix}/bin/jamvm'])], - [ - VM_BINARY=${withval} - ], - [ - VM_BINARY='${prefix}/bin/jamvm' - ]) - -AC_SUBST(VM_BINARY) +AC_ARG_WITH([antlr-jar], + [AS_HELP_STRING([--with-antlr-jar=file],[Use ANTLR from the specified jar file])], + [ + ANTLR_JAR=$withval + ], + [ + ANTLR_JAR="$ANTLR_JAR" + ]) dnl ----------------------------------------------------------- -dnl Regenerate headers at build time (disabled by default) +dnl Regenerate headers at build time (enabled if not found) dnl ----------------------------------------------------------- +AC_MSG_CHECKING([whether to regenerate the headers]) AC_ARG_ENABLE([regen-headers], [AS_HELP_STRING(--enable-regen-headers,automatically regenerate JNI headers [default=yes if headers don't exist])], [case "${enableval}" in @@ -344,13 +368,33 @@ AC_ARG_ENABLE([regen-headers], no) REGENERATE_JNI_HEADERS=no ;; *) REGENERATE_JNI_HEADERS=yes ;; esac], - [if test -e include/java_lang_VMSystem.h; then + [if test -e ${srcdir}/include/java_lang_VMSystem.h; then REGENERATE_JNI_HEADERS=no ; else REGENERATE_JNI_HEADERS=yes ; fi]) +AC_MSG_RESULT(${REGENERATE_JNI_HEADERS}) AM_CONDITIONAL(CREATE_JNI_HEADERS, test "x${REGENERATE_JNI_HEADERS}" = xyes) +dnl ------------------------------------------------------------------------ +dnl Regenerate GJDoc parser at build time (enabled if not found) +dnl ------------------------------------------------------------------------ +AC_MSG_CHECKING([whether to regenerate the GJDoc parser]) +AC_ARG_ENABLE([regen-gjdoc-parser], + [AS_HELP_STRING(--enable-regen-gjdoc-parser,automatically regenerate the GJDoc parser [default=yes if generated source doesn't exist])], + [case "${enableval}" in + yes) REGENERATE_GJDOC_PARSER=yes ;; + no) REGENERATE_GJDOC_PARSER=no ;; + *) REGENERATE_GJDOC_PARSER=yes ;; + esac], + [if test -e ${srcdir}/tools/generated/gnu/classpath/tools/gjdoc/expr/JavaLexer.java; then + REGENERATE_GJDOC_PARSER=no ; + else + REGENERATE_GJDOC_PARSER=yes ; + fi]) +AC_MSG_RESULT(${REGENERATE_GJDOC_PARSER}) +AM_CONDITIONAL(CREATE_GJDOC_PARSER, test "x${REGENERATE_GJDOC_PARSER}" = xyes) + dnl ----------------------------------------------------------- dnl Enable tool wrapper binaries (disabled by default) dnl ----------------------------------------------------------- @@ -422,6 +466,7 @@ if test "x${COMPILE_JNI}" = xyes; then dnl Check for crt_externs.h on Darwin. dnl Check for netinet/in_systm.h, netinet/ip.h and net/if.h for Windows CE. dnl Check for sys/loadavg.h for getloadavg() on Solaris 9. + dnl Check for sys/sockio.h for SIOCGIFFLAGS on OpenSolaris. AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \ asm/ioctls.h \ inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \ @@ -434,14 +479,15 @@ if test "x${COMPILE_JNI}" = xyes; then sys/event.h sys/epoll.h \ ifaddrs.h \ netinet/in_systm.h netinet/ip.h net/if.h \ - sys/loadavg.h]) + sys/loadavg.h sys/sockio.h]) AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t])) AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t])) AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t])) AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t])) - AC_SEARCH_LIBS([inet_pton],[nsl]) + AC_SEARCH_LIBS([inet_pton],[nsl]) + AC_CHECK_LIB([socket], [gethostname]) AC_CHECK_FUNCS([ftruncate fsync select \ gethostname socket strerror fork pipe execve open close \ lseek fstat read readv write writev htonl memset htons connect \ @@ -755,6 +801,26 @@ if test "x${COMPILE_JNI}" = xyes; then AC_SUBST(PLUGIN_DIR, $HOME/.mozilla/plugins/) fi + + dnl Check for GNU MP library and header file + dnl for GNU MP versions >= 4.2 use __gmpz_combit; otherwise look for + dnl __gmpz_mul_si for earlier versions (>= 3.1). + dnl IMPORTANT: if you decide to look for __gmpz_combit, don't forget to + dnl change the name of the corresponding ac_ variable on lines 860... + if test "x${COMPILE_GMP}" = xyes; then + AC_CHECK_LIB(gmp, __gmpz_mul_si, + [GMP_CFLAGS=-I/usr/include + GMP_LIBS=-lgmp ], + [GMP_CFLAGS= + GMP_LIBS= ]) + AC_SUBST(GMP_CFLAGS) + AC_SUBST(GMP_LIBS) + + AC_CHECK_HEADERS([gmp.h]) + fi + +else + COMPILE_GMP=no fi if test "x${REGENERATE_JNI_HEADERS}" = xyes; then @@ -948,6 +1014,24 @@ esac; AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue) AC_SUBST(PATH_TO_GLIBJ_ZIP) +if test "x${TOOLSDIR}" != x; then + if test "x${COMPILE_WRAPPERS}" = xno && test "x${enable_java_maintainer_mode}" = xyes; then + AC_PROG_JAVA + fi + if test "x${COMPILE_GJDOC}" = xyes; then + AC_LIB_ANTLR + if test "x${REGENERATE_GJDOC_PARSER}" = xyes; then +dnl GCJ LOCAL + if test "x${enable_java_maintainer_mode}" = xyes; then + AC_PROG_JAVA + AC_PROG_ANTLR(2,7,1) + fi +dnl END GCJ LOCAL + fi + fi +fi + + # Check for javac if we need to build either the class library, # the examples or the tools if test "x${use_glibj_zip}" = xfalse || \ @@ -1012,6 +1096,25 @@ dnl ----------------------------------------------------------- AC_SUBST(DEFAULT_PREFS_PEER) dnl ----------------------------------------------------------- +dnl Set GNU MP related params +dnl ----------------------------------------------------------- +WANT_NATIVE_BIG_INTEGER=false +if test "x${COMPILE_GMP}" = xyes; then + if test "x${ac_cv_lib_gmp___gmpz_mul_si}" = xyes; then + if test "x${ac_cv_header_gmp_h}" = xyes; then + WANT_NATIVE_BIG_INTEGER=true + AC_DEFINE(WITH_GNU_MP, 1, [Define to 1 if gmp is usable]) + else + COMPILE_GMP=no + fi + else + COMPILE_GMP=no + fi +fi +AC_SUBST(WANT_NATIVE_BIG_INTEGER) +AM_CONDITIONAL(CREATE_GMPBI_LIBRARY, test "x${COMPILE_GMP}" = xyes) + +dnl ----------------------------------------------------------- dnl output files dnl ----------------------------------------------------------- AC_CONFIG_FILES([Makefile @@ -1032,6 +1135,7 @@ native/jni/Makefile native/jni/classpath/Makefile native/jni/java-io/Makefile native/jni/java-lang/Makefile +native/jni/java-math/Makefile native/jni/java-net/Makefile native/jni/java-nio/Makefile native/jni/java-util/Makefile @@ -1087,6 +1191,12 @@ AC_CONFIG_COMMANDS([grmic],[chmod 755 tools/grmic]) AC_CONFIG_COMMANDS([gjavah], [chmod 755 tools/gjavah]) ]) +if test "x${COMPILE_GJDOC}" = xyes +then +AC_CONFIG_FILES([tools/gjdoc]) +AC_CONFIG_COMMANDS([gjdoc], [chmod 755 tools/gjdoc]) +fi + AC_CONFIG_COMMANDS([gen-classlist],[chmod 755 lib/gen-classlist.sh]) AC_CONFIG_COMMANDS([copy-vmresources],[chmod 755 lib/copy-vmresources.sh]) AC_OUTPUT diff --git a/libjava/classpath/doc/Makefile.am b/libjava/classpath/doc/Makefile.am index 5f9eb68cf48..aca54315859 100644 --- a/libjava/classpath/doc/Makefile.am +++ b/libjava/classpath/doc/Makefile.am @@ -28,7 +28,8 @@ TOOLS_MANFILES = \ grmid.1 \ grmiregistry.1 \ gserialver.1 \ - gtnameserv.1 + gtnameserv.1 \ + gjdoc.1 POD2MAN = pod2man --center="GNU" --release="$(VERSION)" TEXI2POD = perl $(srcdir)/texi2pod.pl @@ -42,7 +43,7 @@ STAMP = echo timestamp > .INTERMEDIATE: gappletviewer.pod gjarsigner.pod gjar.pod gjavah.pod \ gkeytool.pod gnative2ascii.pod gorbd.pod grmid.pod grmiregistry.pod \ - gserialver.pod gtnameserv.pod gcjh.pod + gserialver.pod gtnameserv.pod gcjh.pod gjdoc.pod gappletviewer.pod: $(srcdir)/cp-tools.texinfo -$(TEXI2POD) -D gappletviewer < $< > $@ @@ -84,6 +85,12 @@ gserialver.pod: $(srcdir)/cp-tools.texinfo gtnameserv.pod: $(srcdir)/cp-tools.texinfo -$(TEXI2POD) -D gtnameserv < $< > $@ +gjdoc.pod: $(srcdir)/cp-tools.texinfo + -$(TEXI2POD) -D gjdoc < $< > $@ + +# GCJ LOCAL CHANGE +#CLEANFILES = $(TOOLS_MANFILES) + # GCJ LOCAL CHANGE # The following commands allow us to release tarballs with the man pages # and info documentation prebuilt. This feature is enabled via @@ -102,6 +109,7 @@ stamp-geninsrc: $(TOOLS_MANFILES) cp-tools.info -cp -p gjar.1 $(srcdir)/gjar.1 -cp -p gjarsigner.1 $(srcdir)/gjarsigner.1 -cp -p gjavah.1 $(srcdir)/gjavah.1 + -cp -p gjdoc.1 $(srcdir)/gjdoc.1 -cp -p gkeytool.1 $(srcdir)/gkeytool.1 -cp -p gnative2ascii.1 $(srcdir)/gnative2ascii.1 -cp -p gorbd.1 $(srcdir)/gorbd.1 @@ -118,6 +126,7 @@ MAINTAINERCLEANFILES = \ $(srcdir)/gjar.1 \ $(srcdir)/gjarsigner.1 \ $(srcdir)/gjavah.1 \ + $(srcdir)/gjdoc.1 \ $(srcdir)/gkeytool.1 \ $(srcdir)/gnative2ascii.1 \ $(srcdir)/gorbd.1 \ diff --git a/libjava/classpath/doc/Makefile.in b/libjava/classpath/doc/Makefile.in index 157cf7619d9..e2bfd66d2a7 100644 --- a/libjava/classpath/doc/Makefile.in +++ b/libjava/classpath/doc/Makefile.in @@ -50,6 +50,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \ $(top_srcdir)/../../ltsugar.m4 \ $(top_srcdir)/../../ltversion.m4 \ $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/m4/ac_prog_antlr.m4 \ + $(top_srcdir)/m4/ac_prog_java.m4 \ + $(top_srcdir)/m4/ac_prog_java_works.m4 \ $(top_srcdir)/m4/ac_prog_javac.m4 \ $(top_srcdir)/m4/ac_prog_javac_works.m4 \ $(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \ @@ -97,6 +100,8 @@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANTLR = @ANTLR@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -128,6 +133,12 @@ CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@ CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@ CREATE_GCONF_PEER_LIBRARIES_FALSE = @CREATE_GCONF_PEER_LIBRARIES_FALSE@ CREATE_GCONF_PEER_LIBRARIES_TRUE = @CREATE_GCONF_PEER_LIBRARIES_TRUE@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_PARSER_FALSE = @CREATE_GJDOC_PARSER_FALSE@ +CREATE_GJDOC_PARSER_TRUE = @CREATE_GJDOC_PARSER_TRUE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ +CREATE_GMPBI_LIBRARY_FALSE = @CREATE_GMPBI_LIBRARY_FALSE@ +CREATE_GMPBI_LIBRARY_TRUE = @CREATE_GMPBI_LIBRARY_TRUE@ CREATE_GSTREAMER_PEER_LIBRARIES_FALSE = @CREATE_GSTREAMER_PEER_LIBRARIES_FALSE@ CREATE_GSTREAMER_PEER_LIBRARIES_TRUE = @CREATE_GSTREAMER_PEER_LIBRARIES_TRUE@ CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@ @@ -166,11 +177,12 @@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXAMPLESDIR = @EXAMPLESDIR@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ -FASTJAR = @FASTJAR@ FGREP = @FGREP@ FIND = @FIND@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GCJ_JAVAC_FALSE = @GCJ_JAVAC_FALSE@ +GCJ_JAVAC_TRUE = @GCJ_JAVAC_TRUE@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GDK_CFLAGS = @GDK_CFLAGS@ @@ -180,6 +192,8 @@ GENINSRC_TRUE = @GENINSRC_TRUE@ GJDOC = @GJDOC@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ +GMP_CFLAGS = @GMP_CFLAGS@ +GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ GSTREAMER_BASE_CFLAGS = @GSTREAMER_BASE_CFLAGS@ GSTREAMER_BASE_LIBS = @GSTREAMER_BASE_LIBS@ @@ -201,7 +215,10 @@ INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVA = @JAVA@ JAVAC = @JAVAC@ +JAVAC_IS_GCJ = @JAVAC_IS_GCJ@ JAVAC_MEM_OPT = @JAVAC_MEM_OPT@ JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@ JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@ @@ -267,8 +284,10 @@ USE_ESCHER_TRUE = @USE_ESCHER_TRUE@ USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@ USE_PREBUILT_GLIBJ_ZIP_TRUE = @USE_PREBUILT_GLIBJ_ZIP_TRUE@ VERSION = @VERSION@ -VM_BINARY = @VM_BINARY@ +WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@ WARNING_CFLAGS = @WARNING_CFLAGS@ +WITH_JAR_FALSE = @WITH_JAR_FALSE@ +WITH_JAR_TRUE = @WITH_JAR_TRUE@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ XSLT_CFLAGS = @XSLT_CFLAGS@ @@ -279,6 +298,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP = @ZIP@ +ac_ct_ANTLR = @ac_ct_ANTLR@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -338,6 +358,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ +uudecode = @uudecode@ vm_classes = @vm_classes@ SUBDIRS = api EXTRA_DIST = README.jaxp texi2pod.pl $(man_MANS) @@ -356,7 +377,8 @@ TOOLS_MANFILES = \ grmid.1 \ grmiregistry.1 \ gserialver.1 \ - gtnameserv.1 + gtnameserv.1 \ + gjdoc.1 POD2MAN = pod2man --center="GNU" --release="$(VERSION)" TEXI2POD = perl $(srcdir)/texi2pod.pl @@ -364,6 +386,9 @@ STAMP = echo timestamp > @GENINSRC_FALSE@STAMP_GENINSRC = # GCJ LOCAL CHANGE +#CLEANFILES = $(TOOLS_MANFILES) + +# GCJ LOCAL CHANGE # The following commands allow us to release tarballs with the man pages # and info documentation prebuilt. This feature is enabled via # --enable-generated-files-in-srcdir in the configure script. @@ -374,6 +399,7 @@ MAINTAINERCLEANFILES = \ $(srcdir)/gjar.1 \ $(srcdir)/gjarsigner.1 \ $(srcdir)/gjavah.1 \ + $(srcdir)/gjdoc.1 \ $(srcdir)/gkeytool.1 \ $(srcdir)/gnative2ascii.1 \ $(srcdir)/gorbd.1 \ @@ -892,7 +918,7 @@ docs: cp-hacking.ps cp-vmintegration.ps cp-tools.ps $(TOOLS_MANFILES) .INTERMEDIATE: gappletviewer.pod gjarsigner.pod gjar.pod gjavah.pod \ gkeytool.pod gnative2ascii.pod gorbd.pod grmid.pod grmiregistry.pod \ - gserialver.pod gtnameserv.pod gcjh.pod + gserialver.pod gtnameserv.pod gcjh.pod gjdoc.pod gappletviewer.pod: $(srcdir)/cp-tools.texinfo -$(TEXI2POD) -D gappletviewer < $< > $@ @@ -934,6 +960,9 @@ gserialver.pod: $(srcdir)/cp-tools.texinfo gtnameserv.pod: $(srcdir)/cp-tools.texinfo -$(TEXI2POD) -D gtnameserv < $< > $@ +gjdoc.pod: $(srcdir)/cp-tools.texinfo + -$(TEXI2POD) -D gjdoc < $< > $@ + all-local: $(STAMP_GENINSRC) stamp-geninsrc: $(TOOLS_MANFILES) cp-tools.info @@ -941,6 +970,7 @@ stamp-geninsrc: $(TOOLS_MANFILES) cp-tools.info -cp -p gjar.1 $(srcdir)/gjar.1 -cp -p gjarsigner.1 $(srcdir)/gjarsigner.1 -cp -p gjavah.1 $(srcdir)/gjavah.1 + -cp -p gjdoc.1 $(srcdir)/gjdoc.1 -cp -p gkeytool.1 $(srcdir)/gkeytool.1 -cp -p gnative2ascii.1 $(srcdir)/gnative2ascii.1 -cp -p gorbd.1 $(srcdir)/gorbd.1 diff --git a/libjava/classpath/doc/api/Makefile.in b/libjava/classpath/doc/api/Makefile.in index bbca5c38286..2256739d193 100644 --- a/libjava/classpath/doc/api/Makefile.in +++ b/libjava/classpath/doc/api/Makefile.in @@ -51,6 +51,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \ $(top_srcdir)/../../ltsugar.m4 \ $(top_srcdir)/../../ltversion.m4 \ $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/m4/ac_prog_antlr.m4 \ + $(top_srcdir)/m4/ac_prog_java.m4 \ + $(top_srcdir)/m4/ac_prog_java_works.m4 \ $(top_srcdir)/m4/ac_prog_javac.m4 \ $(top_srcdir)/m4/ac_prog_javac_works.m4 \ $(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \ @@ -74,6 +77,8 @@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANTLR = @ANTLR@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -105,6 +110,12 @@ CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@ CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@ CREATE_GCONF_PEER_LIBRARIES_FALSE = @CREATE_GCONF_PEER_LIBRARIES_FALSE@ CREATE_GCONF_PEER_LIBRARIES_TRUE = @CREATE_GCONF_PEER_LIBRARIES_TRUE@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_PARSER_FALSE = @CREATE_GJDOC_PARSER_FALSE@ +CREATE_GJDOC_PARSER_TRUE = @CREATE_GJDOC_PARSER_TRUE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ +CREATE_GMPBI_LIBRARY_FALSE = @CREATE_GMPBI_LIBRARY_FALSE@ +CREATE_GMPBI_LIBRARY_TRUE = @CREATE_GMPBI_LIBRARY_TRUE@ CREATE_GSTREAMER_PEER_LIBRARIES_FALSE = @CREATE_GSTREAMER_PEER_LIBRARIES_FALSE@ CREATE_GSTREAMER_PEER_LIBRARIES_TRUE = @CREATE_GSTREAMER_PEER_LIBRARIES_TRUE@ CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@ @@ -143,11 +154,12 @@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXAMPLESDIR = @EXAMPLESDIR@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ -FASTJAR = @FASTJAR@ FGREP = @FGREP@ FIND = @FIND@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GCJ_JAVAC_FALSE = @GCJ_JAVAC_FALSE@ +GCJ_JAVAC_TRUE = @GCJ_JAVAC_TRUE@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GDK_CFLAGS = @GDK_CFLAGS@ @@ -157,6 +169,8 @@ GENINSRC_TRUE = @GENINSRC_TRUE@ GJDOC = @GJDOC@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ +GMP_CFLAGS = @GMP_CFLAGS@ +GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ GSTREAMER_BASE_CFLAGS = @GSTREAMER_BASE_CFLAGS@ GSTREAMER_BASE_LIBS = @GSTREAMER_BASE_LIBS@ @@ -178,7 +192,10 @@ INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVA = @JAVA@ JAVAC = @JAVAC@ +JAVAC_IS_GCJ = @JAVAC_IS_GCJ@ JAVAC_MEM_OPT = @JAVAC_MEM_OPT@ JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@ JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@ @@ -244,8 +261,10 @@ USE_ESCHER_TRUE = @USE_ESCHER_TRUE@ USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@ USE_PREBUILT_GLIBJ_ZIP_TRUE = @USE_PREBUILT_GLIBJ_ZIP_TRUE@ VERSION = @VERSION@ -VM_BINARY = @VM_BINARY@ +WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@ WARNING_CFLAGS = @WARNING_CFLAGS@ +WITH_JAR_FALSE = @WITH_JAR_FALSE@ +WITH_JAR_TRUE = @WITH_JAR_TRUE@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ XSLT_CFLAGS = @XSLT_CFLAGS@ @@ -256,6 +275,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP = @ZIP@ +ac_ct_ANTLR = @ac_ct_ANTLR@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -315,6 +335,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ +uudecode = @uudecode@ vm_classes = @vm_classes@ @CREATE_API_DOCS_TRUE@noinst_DATA = html sourcepath = $(top_builddir):$(top_srcdir):$(top_srcdir)/vm/reference:$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:$(top_srcdir)/external/jsr166 diff --git a/libjava/classpath/doc/cp-tools.texinfo b/libjava/classpath/doc/cp-tools.texinfo index 9e370c09296..f7a2d245e7d 100644 --- a/libjava/classpath/doc/cp-tools.texinfo +++ b/libjava/classpath/doc/cp-tools.texinfo @@ -134,6 +134,59 @@ Other Tools * rmid Tool:: RMI activation daemon * rmiregistry Tool:: Remote object registry * tnameserv Tool:: Naming service +* gjdoc Tool:: Documenation generator tool. + +Generating HTML Documentation + +* Invoking the Standard Doclet:: How to generate HTML documentation. +* Invoking a Custom Doclet:: How to run third-party and other + built-in Doclets. + +* Option Summary by Type:: Brief list of all options, grouped by type. +* Gjdoc Option Summary:: List of all options accepted by Gjdoc. + +* Source Set Options:: Select the set of source codes to run Gjdoc on. +* Source Format Options:: Specify the format of the source codes to document. + +* Interlinking Options:: Connection your documentation with other projects. +* Output Control Options:: Specify the target directory and locale, and more. +* Generation Options:: Select which pieces of information to generate. +* Decoration Options:: Add or modify some titles, headers and footers or + override/amend static resources like stylesheets. +* Taglet Options:: Define your own javadoc @@tags. + +* Virtual Machine Options:: Controlling the kind of output: + an executable, object files, assembler files, + or preprocessed source. +* Verbosity Options:: +* Doclet Options:: + +* Other Doclets:: Generating Other Output Types. + +* Built-in Doclets:: Using the Built-in Doclets. +* Using XmlDoclet:: +* Using TexiDoclet:: +* Using IspellDoclet:: +* Using DebugDoclet:: + +* Third-party Doclets:: Using Third-Party Doclets. +* DocBook Doclet:: +* PDFDoclet:: +* JUnitDoclet:: + +* Gjdoc Concepts:: Advanced Concepts. +* Writing Doclets:: + +* Doclet Invocation Interface:: Implementing the Doclet Invocation Interface +* Using AbstractDoclet:: Deriving Your Doclet from AbstractDoclet. +* GNU Doclet SPI:: Preparing the GNU Doclet Service Provider + Interface. + +* Taglets:: Adding Custom Tags to the Documentation. +* XHTML Fragments:: Well-Formed Documentation Fragments. +* First Sentence Detector:: How Gjdoc Determines where the First + Sentence Ends. +* Adding Custom Resources:: Adding Images and Other Resources. I18N Issues @@ -1229,6 +1282,7 @@ and @b{tnameserv}. * rmid Tool:: RMI activation daemon * rmiregistry Tool:: Remote object registry * tnameserv Tool:: Naming service +* gjdoc Tool:: A documentation generator @end menu @comment ---------------------------------------------------------------------- @@ -1743,7 +1797,7 @@ java(1), @dots{} @comment ---------------------------------------------------------------------- -@node tnameserv Tool, , rmiregistry Tool, Other Tools +@node tnameserv Tool, gjdoc Tool, rmiregistry Tool, Other Tools @comment node-name, next, previous, up @section The @command{tnameserv} Tool @c man title gtnameserv Naming service @@ -1788,6 +1842,1364 @@ java(1), @dots{} @comment ---------------------------------------------------------------------- +@ignore +@c man begin SYNOPSIS gjdoc +gjdoc [@option{-sourcepath }@var{pathlist}] + [@option{-all}] [@option{-subpackages }@var{pkg:pkg:@dots{}}] [@option{-exclude }@var{pkglist}] + [@option{-encoding }@var{charset}] [@option{-locale }@var{name}] [@option{-source }@var{release}] + [@option{-public}] [@option{-protected}] [@option{-package}] [@option{-private}] + [@option{-doctitle }@var{text}] [@option{-header }@var{text}] [@option{-footer }@var{text}] [@option{-bottom }@var{text}] + [@option{-link }@var{url}] [@option{-linkoffline }@var{url} @var{path}] [@option{-noqualifier }@var{pkg:pkg:@dots{}}] + [@option{-tagletpath }@var{pathlist}] [@option{-taglet }@var{className}] [@option{-tag }@var{tagspec}] + [@option{-use}] [@option{-linksource}] [@option{-splitindex}] [@option{-noindex}] [@option{-notree}] + [@option{-version}] [@option{-author}] [@option{-nosince}] [@option{-addstylesheet }@var{file}] + [@option{-d }@var{targetdir}] + [@var{packages}@dots{}] [@var{sourcefiles}@dots{}] [@@@var{cmdfile}] + +gjdoc [@option{-sourcepath }@var{pathlist}] + [@option{-all}] [@option{-subpackages }@var{pkg:pkg:@dots{}}] [@option{-exclude }@var{pkglist}] + [@option{-encoding }@var{charset}] [@option{-locale }@var{name}] [@option{-source }@var{release}] + [@option{-public}] [@option{-protected}] [@option{-package}] [@option{-private}] + [@option{-docletpath }@var{pathlist}] [@option{-doclet }@var{className}] + [@var{packages}@dots{}] [@var{sourcefiles}@dots{}] [@@@var{cmdfile}] + [doclet options] + +gjdoc @option{--help} + +gjdoc @option{--version} + +Only the most useful options are listed here; see below for the +remainder. +@c man end +@end ignore +@c man begin SEEALSO gjdoc +Info entry for @file{gjdoc}. +@c man end +@c man begin BUGS gjdoc +Please report bugs to @w{@uref{http://savannah.gnu.org/bugs/?group=classpath}}. +@c man end +@c man begin AUTHOR gjdoc +Julian Scheid +@c man end + +@node gjdoc Tool, , tnameserv Tool, Other Tools +@chapter Generating HTML Documentation +@cindex Gjdoc command options +@cindex command options +@cindex options, Gjdoc command + +@c man begin DESCRIPTION gjdoc +Gjdoc can be used in two ways: as a stand-alone documentation tool, or +as a driver for a user-specified Doclet. @xref{Other Doclets}. + +In the default mode, Gjdoc will use the Standard Doclet +@samp{HtmlDoclet} to generate a set of HTML pages. The canonical +usage is: + +@smallexample +gjdoc -s src/java/ -all -d api-docs/ +@end smallexample + +Here, @samp{src/java/} is the root of your source code class +hierarchy, @option{-all} means that all valid Java files found under +this root directory should be processed, and @samp{api-docs/} is the +directory where the generated documentation should be placed. + +To learn more about running Doclets other than the Standard Doclet, +refer to the manual. @xref{Invoking a Custom Doclet}. + +@menu +* Invoking the Standard Doclet:: How to generate HTML documentation. +* Invoking a Custom Doclet:: How to run third-party and other + built-in Doclets. + +* Option Summary by Type:: Brief list of all options, grouped by type. +* Gjdoc Option Summary:: List of all options accepted by Gjdoc. + +* Source Set Options:: Select the set of source codes to run Gjdoc on. +* Source Format Options:: Specify the format of the source codes to document. + +* Interlinking Options:: Connection your documentation with other projects. +* Output Control Options:: Specify the target directory and locale, and more. +* Generation Options:: Select which pieces of information to generate. +* Decoration Options:: Add or modify some titles, headers and footers or + override/amend static resources like stylesheets. +* Taglet Options:: Define your own javadoc @@tags + +* Virtual Machine Options:: +* Verbosity Options:: +* Doclet Options:: + +* Other Doclets:: Generating Other Output Types +* Gjdoc Concepts:: Advanced Concepts + +@end menu + +@c man end + +@comment ---------------------------------------------------------------------- + +@node Invoking the Standard Doclet, Invoking a Custom Doclet, , gjdoc Tool +@section Invoking the Standard Doclet +@cindex Gjdoc command options +@cindex command options +@cindex options, Gjdoc command + +Running the Gjdoc Standard Doclet @samp{HtmlDoclet} is the default +mode of operation for Gjdoc. This section lists the command line +options you can specify in this mode. It doesn't distinguish between +general Gjdoc options and options specific to the Standard Doclet. + +If you want to learn which options are accepted when Gjdoc is used as +a doclet driver, @xref{Invoking a Custom Doclet}. + +@menu +* Source Set Options:: Select the set of source codes to run Gjdoc on. +* Source Format Options:: Specify the format of the source codes to document. + +* Output Control Options:: Specify the target directory and locale, and more. +* Generation Options:: Select which pieces of information to generate. +* Decoration Options:: Add or modify some titles, headers and footers or + override/amend static resources like stylesheets. +* Taglet Options:: Define your own javadoc @@tags + +* Virtual Machine Options:: +* Doclet Options:: + +@end menu + +@c man begin OPTIONS gjdoc + +@node Option Summary by Type, Gjdoc Option Summary, Invoking a Custom Doclet, gjdoc Tool +@section Option Summary by Type + +Here is a summary of all the options of both Gjdoc and the Standard +Doclet, grouped by type. Explanations are in the following sections. + +@table @emph +@item Source Set Options +@xref{Source Set Options,,Options For Specifying the Source Files To Operate on}. +@gccoptlist{-sourcepath @var{pathlist} -subpackages @var{pkglist} -exclude @var{pkglist}} + +@item Source Format Options +@xref{Source Format Options,,Options For Specifying the Source Format}. +@gccoptlist{-source @var{release} -encoding @var{encoding} -breakiterator} + +@item Interlinking Options +@xref{Interlinking Options,,Options For Specifying the Source Files To Operate on}. +@gccoptlist{-link @var{url} -linkoffline @var{url} @var{file} -noqualifier @var{pkg:pkg:...}} + +@item Generation Options +@xref{Generation Options,,Options Controlling What is Included in the Output}. +@gccoptlist{-author -licensetext -use -version -splitindex -noindex + -nodeprecated -nodeprecatedlist -nohelp -nonavbar + -nosince -notree -public -protected -package -private + -docfilessubdirs -excludedocfilessubdir @var{dirname} + -linksource} + +@item Output Options +@xref{Generation Options,,Options Controlling the Output}. +@gccoptlist{-d -locale @var{name} -charset @var{charset} -docencoding @var{charset} + -validhtml -baseurl @var{url}} + +@item Decoration Options +@gccoptlist{-windowtitle @var{text} -doctitle @var{text} -title @var{text} + -header @var{text} -footer @var{text} -bottom @var{text} + -helpfile @var{file} -stylesheetfile @var{file} -addstylesheet @var{file} + -group @var{groupheading} @var{pkgpattern:pkgpattern:@dots{}}} + +@item Taglet Options +@xref{Taglet Options,,Options For Specifying user-defined Taglets}. +@gccoptlist{-tagletpath -taglet @var{classname} -tag @var{tagspec}} + +@item Doclet Options +@xref{Doclet Options,,Options For Specifying the Doclet to use}. +@gccoptlist{-docletpath -doclet @var{classname}} + +@item Verbosity Options +@xref{Verbosity Options,,Options Controlling Gjdoc Behavior}. +@gccoptlist{-quiet -verbose} + +@item Virtual Machine Options +@xref{Virtual Machine Options,,Options Controlling Gjdoc Behavior}. +@gccoptlist{-classpath} @gccoptlist{-bootclasspath} @gccoptlist{-J}@var{vmopt} + +@end table + +@menu +* Virtual Machine Options:: Controlling the kind of output: + an executable, object files, assembler files, + or preprocessed source. +@end menu + +@node Source Set Options, Source Format Options, Gjdoc Option Summary, gjdoc Tool +@section Selecting which Source Files to Process + +@table @gcctabopt +@item -s @var{pathlist} +@item -sourcepath @var{pathlist} +Look for source files in the specified directory or directories. + +@var{pathlist} should be one or more directory paths separated by your +platform's path separator (usually @samp{:} or @samp{;}). + +If this option is not given, @command{gjdoc} will look for source +files in the current directory. + +The directories specified should be root directories in terms of the +Java package system. For example, if you want to generate +documentation for classes in package @samp{foo.bar}, you must specify +the directory containing the top-level @samp{@file{foo}} +sub-directory, not the directory @samp{@file{foo/bar/}} in which the +Java source files reside. + +The short-hand alias @option{-s} is specific to @command{gjdoc} and +not compatible to Sun @command{javadoc}. + +@item -all +@emph{[EXPERIMENTAL]} +Process all valid Java source files found in the directories listed in +the source path and their sub-directories. + +This is an option specific to @command{gjdoc} and not compatible to +Sun @command{javadoc}. + +@item -subpackages @var{pkg:pkg:@dots{}} +Process the classes in the given Java packages and all sub-packages, +recursively. Note that multiple package names must be separated with +colons instead of whitespace. + +@item -exclude @var{pkg:pkg:@dots{}} +Do not process classes in the given Java packages and all +sub-packages, recursively. This option can be used in conjunction +with @option{-all} or @option{-subpackages} in order to exclude +individual packages or package sub-trees from the output. + +@item @var{packages}@dots{} +Process all classes in the given Java packages. + +@item @var{sourcefiles}@dots{} +Process the classes in the given Java source files. +@end table + +@node Source Format Options, Interlinking Options, Source Set Options, gjdoc Tool +@section Specifying the Format of Input Files + +@table @gcctabopt +@item -source @var{release} +Assume that the source files are targeted at the given release of the +Java platform. + +@var{release} should be the version number of a Java platform release +in the format MAJOR.MINOR, for example @samp{1.4}. + +This option is currently ignored except that an error is raised if a +release number other than @samp{1.2}, @samp{1.3} or @samp{1.4} is +specified. + +@item -encoding @var{charset} +Assume that the source files are encoded using @var{charset}. + +Examples for @var{charset} are @samp{US-ASCII}, @samp{ISO-8859-1} or +@samp{UTF-8}. + +The semantics of @var{charset} are identical to those of @samp{java.nio.charset.Charset.forName(String)}. + +@item -breakiterator +Use the locale's java.text.BreakIterator instead of the internal +first sentence detector. + +By default, @command{gjdoc} uses an internal algorithm to determine +where a sentence ends. When this option is given, it will instead use +the @samp{java.text.BreakIterator} instance for the locale given with +@option{-locale} (or the default locale). + +This option should be specified when applying @command{gjdoc} to +source code commented in a non-latin language for which the default +first sentence detector does not work. For all other cases, the +default (do not use BreakIterator) produces better results at the time +of this writing. +@end table + +@node Interlinking Options, Output Control Options, Source Format Options, gjdoc Tool +@section Interlinking with other Documentation Sets + +@table @gcctabopt +@item -link @var{url} + +Create hyperlinks to another documentation set. + +By default, @command{gjdoc} will only create hyperlinks to classes in +the source set. Use this option to additionally create hyperlinks to +classes covered by the specified documentation set. + +@var{url} should be the root URL of the other documentation set. For +example, to add hyperlinks to GNU Classpath, specify the following: + +@smallexample +-link http://developer.classpath.org/doc/ +@end smallexample + +The @option{-link} option can be specified multiple times. + +Note that specifying the @option{-link} option will cause an HTTP +access every time gjdoc is invoked. You can use @option{-linkoffline} +instead to avoid this access. + +@item -linkoffline @var{url} @var{file} + +Create hyperlinks to another documentation set which is also present +on the local file system. + +This option works exactly like @option{-link}, except that it accesses +the local file system instead of the network for determining which +classes are covered by the linked documentation set. + +When using @option{-linkoffline} the remote documentation set is not +accessed at all, which can significantly speed up generation time +depending on your network connection. The generated hyperlinks to the +documentation set however refer to the remote set, not to the local +one, so that you can distribute the documentation without any further +dependencies. + +The @option{-linkoffline} option can be specified multiple times. + +@item -noqualifier @var{pkg:pkg:@dots{}} + +Do not qualify names of classes in the given packages with their +package name. + +By default, a class name is displayed unqualified only if the class is +part of the source set or a linked documentation set, and qualified +with the name of its containing package if it is not. You can use this +option to force unqualified names for classes even if they are not +part of the documentation set. + +For example, usually a reference to the String class is represented +fully-qualified as @samp{java.lang.String} (unless you link to the +appropriate documentation set using @option{-link}) because it isn't +part of the documentation set. You can specify @samp{-noqualifier +java.lang} to render the same references just as @samp{String}. + +Note that for all unqualified class names, a tooltip is provided when +you place your mouse pointer over it in the HTML documentation. + +@item -noqualifier @samp{all} +Omit package name qualifier from all class names. + +Specify this option to omit package name qualifiers altogether, + +@end table + +@node Generation Options, Decoration Options, Output Control Options, gjdoc Tool +@section Selecting which Information to Generate + +@table @gcctabopt +@item -public +Only include public members of public classes in the output. By +default, protected class members are included as well. + +@item -protected + +Include public or protected members of public classes in the output. +This is the default. + +@item -package + +Include public, protected and package-private members of public and +package-private classes. + +@item -private + +Include all classes and class members regardless of their access +level. + +@item -splitindex +Generate one index page per letter instead of a single, monolithic +index page. + +By default, the index created by the Standard Doclet contains all +entries on a single page. This is fine for small documentation sets, +but for large sets you should specify this option. + +@item -nosince +Ignore @samp{@@since} tags in javadoc comments. + +By default, the generated output contains sections listing the version +of your API since which the package, class or class member in question +exists when this tag is encountered. Specify this option to omit this +information. + +@item -notree +Do not generate any tree pages. + +By default, the generated output includes one inheritance tree per +package, and - if the documentation set consists of multiple packages +- a page with the full inheritance tree. Specify this option to omit +generation of these pages. + +@item -noindex +Do not output the alphabetical index. + +By default, gjdoc generates an alphabetical index of all program +elements in the documentation set (packages, classes, inner classes, +constructors, methods, and fields). Specify this option to omit this +information. + +@item -nohelp +Do not generate the help page. + +This option is currently ignored as the Standard Doclet doesn't +provide a help page. + +@item -nodeprecated +Do not output inline information about deprecated packages, classes or +class members. + +By default, the Standard Doclet adds a highlighted paragraph with +deprecation information to the description of each deprecated program +element. Specify this option to omit this information. + +@item -nodeprecatedlist +Do not output the summary page for deprecated API elements. + +By default, the Standard Doclet generates a page listing all +deprecated API elements along with a deprecation description which +usually includes the reason for deprecation and possible +alternatives. Specify this option to omit this information. + +@item -nonavbar +Do not output the navigation bar, header, and footer. + +By default, each output page is equipped with a top navigation bar +(which may include a user-specified header) and a bottom navigation +bar (which may include a user-specified footer). Specify this option +to omit this decoration. + +@item -nocomment + +Omit all documentation text from the generated files and output only +declarations and program element relationships. + +This option is here for compatibility with @command{javadoc}. If you +plan on extracting information about your project via @command{gjdoc}, +you should consider using a different Doclet for your purposes +instead, for example XmlDoclet. You could also use the Doclet API +directly by implementing a new Doclet. + +@item -linksource + +Generate a page with syntax-highlighted source code for each class. +By default, this page is not generated. + +The source code can be accessed by clicking on the button labelled +"Source" in the navigation bar, or by clicking on the name of a +constructor, field, method, or inner class in the detail section of a +class documentation page. + +@item -use + +Generate a page with cross-reference information. By default, this +page is not generated. + +The cross-reference information can be accessed by clicking on the +button labelled `Use' in the navigation bar. + +The `Use' page lists all classes/interfaces in the documentation set +that extend/implement the class (type) in question; fields of the +type; methods or constructors accepting a parameter of the type; +methods returning the type; and methods or constructors throwing the +type. + +@item -author +Include author information in the output. + +When specified, author information as specified using the +@samp{@@author} tag in javadoc comments is incorporated into the +output. By default, @samp{@@author} tags are ignored. + +@item -version +Include version information in the output. + +When specified, version information as specified using the +@samp{@@version} tag in javadoc comments is incorporated into the +output. By default, @samp{@@version} tags are ignored. + +@item -licensetext + +Assume that the first comment in each source file contains the license +text, and add license information to the footer of each generated +class page. + +This is an option specific to @command{gjdoc} and not compatible to +Sun @command{javadoc}. + +This option is intended for use with free and open source projects +where source code is typically prefixed with a boilerplate license +comment, when there are legal reasons for including the license in the +documentation. + +@item -docfilessubdirs + +Recursively copy all files in the @file{doc-files} sub-directory of each +package directory. + +Usually, only the files in the @file{doc-files} sub-directory are copied +without descending recursively. + +@xref{Adding Custom Resources}. + +@item -excludedocfilessubdir @var{name}:@var{name}:@dots{} + +Do not copy some directories directly under the @file{doc-files} +sub-directories when descending recursively. + +The argument to this option should be a colon-separated list of +directory names. + +This option only makes sense if @option{-docfilessubdirs} is also +specified. In this case, any sub-directory located directly beneath a +@file{doc-files} directory is omitted if listed. + +@end table + +@node Taglet Options, Virtual Machine Options, Decoration Options, gjdoc Tool +@section Custom Documentation Tags + +@table @gcctabopt +@item -tagletpath @var{pathlist} +Search @var{pathlist} when loading subsequent Taglet classes specified +using @option{-taglet}. + +@var{pathlist} should be one or more paths to a directory or jar file, +separated by your platform's path separator (usually @samp{:} or +@samp{;}). + +@item -taglet @var{classname} +Register a Taglet. + +@var{classname} should be the fully-qualified name of a Java class +implementing @samp{com.sun.tools.doclets.Taglet}. + +The Taglet classes will be loaded from the classpath specified using +@option{-tagletpath}, from the classpath specified using +@option{-classpath} and from the default classpath. + +See the documentation of @samp{com.sun.tools.doclets.Taglet} for +further information. + +Note that for simple tags, there is also @option{-tag}. + +@item -tag @var{tagspec} +Register a generic Taglet. + +The format of @var{tagspec} must be @samp{::""}. + +@var{tagname} is the tag name to match, without the leading @@ sign. + +@var{flags} is one or more of the following characters, where each +character specifies a source code context in which the tag is to be +recognized. + +@table @gcctabopt +@item a +all contexts +@item c +constructors +@item f +fields +@item m +methods +@item o +overview +@item p +packages +@item t +types (classes, interfaces, exceptions, errors) +@item X +special character which temporarily disables the +Taglet altogether. +@end table + +@var{taghead} is the string to display in the header of the section +devoted to the tag in question. + +For example, to define a tag matching @samp{@@cvsid} which is to be +accepted in overview, package and type pages and which is labelled +with the header @samp{CVS ID}, you would specify: + +@smallexample +-tag cvsid:tpo:"CVS ID" +@end smallexample + +Let's say that a class javadoc comment contains + +@smallexample +@@cvsid $Id: cp-tools.texinfo,v 1.7 2008/08/13 13:32:05 jsumali Exp $ +@end smallexample + +Then the HTML output will contain something like + +@smallexample +CVS ID: + $Id: cp-tools.texinfo,v 1.7 2008/08/13 13:32:05 jsumali Exp $ +@end smallexample +@end table + +@node Doclet Options, Other Doclets, Verbosity Options, gjdoc Tool +@section Running Other Doclets + +@table @gcctabopt + +@item -docletpath @var{pathlist} +Search @var{pathlist} when loading classes for the Doclet specified +using @option{-doclet}. + +@var{pathlist} should be one or more paths to a directory or jar file, +separated by your platform's path separator (usually @samp{:} or +@samp{;}). + +@item -doclet @var{className} +Run the specified doclet instead of the standard HtmlDoclet. + +@var{className} should be the fully-qualified name of a class which +has a public default constructor and contain a method with the +following signature: + +@smallexample + import com.sun.javadoc.RootDoc; + public static boolean start(RootDoc rootDoc) +@end smallexample + +The Doclet classes will be loaded from the classpath specified using +@option{-docletpath}, from the classpath specified using +@option{-classpath} and from the default classpath. + +The @samp{start} method should process the information exposed by the +Doclet API via @samp{rootDoc} and return @samp{true} on success, +@samp{false} on failure. + +If you are using a third-party doclet, refer to its documentation for +further instructions. Note that support for third-party doclets is +experimental. Please report any problems you encounter, or provide +feedback when successfully running third-party applets. + +This option can be specified multiple times, in which case all doclets +are executed with the same information tree exposed via the Doclet API +for each Doclet run. + +@end table + +@node Decoration Options, Taglet Options, Generation Options, gjdoc Tool +@section Adding Information to the Output + +@table @gcctabopt +@item -windowtitle @var{text} +Use @var{text} as the browser window title prefix. + +When specified, the browser window title for each page will be +prefixed with @var{text} instead of the default string @samp{Generated +API Documentation}. + +@var{text} should be plain text (it should not contain HTML tags). + +@item -doctitle @var{text} +Set the header text of the overview page to @var{text}. + +@var{text} should be a short plain text string. + +When generating documentation for a single package, specifying this +option forces generation of the overview page. + +@item -header @var{htmltext} + +Add @var{htmltext} to the right upper corner of every generated page. +@var{htmltext} is usually set to the name of the project being +documented. + +@item -footer @var{htmltext} + +Add @var{htmltext} to the right bottom corner of every generated page. +@var{htmltext} is often set to the same value as for @option{-header}. + +@item -bottom @var{htmltext} + +Add @var{htmltext} to the very bottom of every generated page, +spanning the whole width of the page. When specified, @var{htmltext} +usually consists of a copyright notice and/or links to other project +pages. + +@item -addstylesheet @var{file} + +Augment the default CSS style sheets with the user-specified +stylesheet @var{file}. + +The given stylesheet is simply loaded by each HTML page in addition to +the default ones, as the last stylesheet. + +Note that the CSS cascading rules apply. That is, your style +properties will only be assigned if they have a higher cascading order +than @command{gjdoc}'s default style. One simple way to make sure +that this is the case is to declare your overrides @samp{!important}. + +See @w{@uref{http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order}}. + +@item -group @var{heading} @var{pkgwildcard}:@var{pkgwildcard}:@dots{} + +Arrange the given packages in a separate group on the overview page. + +The first argument should be a short plain text which is used as the +title of the package group. The second argument should be a +colon-separated list of package wildcards. The group will consist of +all packages in the documentation set whose name matches any of the +given wildcards. + +There is only one wildcard character, @samp{*}, which matches both +letters in package name components and the @samp{.} separating package +name components. For example, @samp{j*regex} would match package +@samp{java.util.regex}. A more useful example would be +@samp{javax.swing*} to match @samp{javax.swing} and all of its +sub-packages. + +This option can be given multiple times. + +FIXME: Information about group nesting here. + +@smallexample +gjdoc -group "Core Classes" 'java*' \ + -group "Swing" 'javax.swing*' \ + -group "XML APIs" 'javax.xml*' \ + -group "Other Extensions" javax* \ + @dots{} +@end smallexample + +@item -overview @var{file} + +Add the XHTML body fragment from @var{file} to the overview page. + +@var{file} should contain an XHTML fragment with the HTML @samp{body} +tag as the root node. @xref{XHTML Fragments}. + +This option can be used to supply a description of the documentation +set as a whole. + +When specified, the first sentence of the fragment will be put above +the tables listing the documented packages, along with a link to the +full copy of the fragment which is put below the tables. +@xref{First Sentence Detector}. + +When generating documentation for a single package, specifying this +option forces generation of the overview page. + +@item -stylesheetfile @var{file} + +Use the CSS stylesheet in @var{file} instead of the default CSS +stylesheets. + +If you only want to override parts of the default stylesheets, use +@option{-addstylesheet} instead. + +@item -title @var{text} + +@emph{Deprecated.} Use @option{-doctitle} @var{text} instead. + +@item -helpfile @var{file} + +This option is currently ignored. + +When implemented, it will use the XHTML fragment in @var{file} for the +help page contents instead of the default help text. + +@end table + +@node Output Control Options, Generation Options, Interlinking Options, gjdoc Tool +@section Controlling the Output. + +@table @gcctabopt +@item -d @var{directory} +Place all output files into @var{directory} (and +sub-directories). @var{directory} will be created if it does not +exist, including all non-existing parent directories and all required +sub-directories. + +If not specified, output will be placed into the current directory. + +@item -locale @var{name} + +Use locale @var{name} instead of the default locale for all purposes. + +@var{name} should be a locale specifier in the form @samp{ll_CC[_VAR]} +where @samp{ll} is a lowercase two-letter ISO-639 language code, +@samp{CC} is an optional uppercase two-letter ISO-3166 country code, +and @samp{VAR} is an optional variant code. For example, @samp{en} +specifies English, @samp{en_US} specifies US English, and +@samp{en_US_WIN} specifies a deviant variant of the US English locale. + +Note that the semantics of this option correspond exactly to those of +the constructors of class @samp{java.util.Locale}. + +This option currently only determines which Collator is being used for +sorting output elements. This means that the locale will only have an +effect when you are using non-ASCII characters in identifiers. + +@item -charset @var{charset} + +@emph{Deprecated.} Override the specified encoding in output XHTML +files with the one given by @samp{charset}. + +If this option is not given, the encoding specification in output +XHTML is chosen to match the encoding used when writing the file (the +encoding given with @option{-docencoding}, or your platform's default +encoding). + +The semantics for @var{charset} are specified here: +@w{@uref{http://www.w3.org/TR/2000/REC-xml-20001006#NT-EncName}}. For +all practical purposes, they are identical to those of the other +options accepting charset parameters. + +This option is here for compatibility with @command{javadoc} and +should be avoided. + +@item -docencoding @var{charset} + +Use the given charset encoding when writing output files instead of +your platform's default encoding. + +Examples for @var{charset} are @samp{US-ASCII}, @samp{ISO-8859-1} or +@samp{UTF-8}. + +The semantics of this option correspond exactly to those of the +constructors of class @samp{java.util.Locale}. + +@item -validhtml + +Force generation of valid XHTML code. This breaks compatibility to +the traditional Javadoc tool to some extent. + +If this option is specified, anchor names will be mangled so that they +are valid according to the XHTML 1.1 specification. However, a +documentation set generated with this option cannot be linked to +properly using the traditional Javadoc tool. It can be linked to just +fine using Gjdoc, though. + +Without this option, anchor names for executable class members use the +traditional format, for example: ``foo(String,int[])''. This is +compatible to the traditional Javadoc tool, but according to both the +HTML 4.0 and XHTML 1.0 and 1.1 specifications, this format includes +illegal characters. Parentheses, square brackets, and the comma are +not allowed in anchor names. + +@item -baseurl @var{url} + +Hardwire a page URL relative to @var{url} into each generated page. + +If you are generating documentation which will exclusively be +available at a certain URL, you should use this option to specify this +URL. + +This can help avoid certain redirect attacks used by spammers, and it +can be helpful for certain web clients. + +@end table + +@node Verbosity Options, Doclet Options, Virtual Machine Options, gjdoc Tool +@section Verbosity Options + +@table @gcctabopt +@item -quiet +Suppress all output except for warnings and error messages. + +@item -verbose +Be very verbose about what @command{gjdoc} is doing. + +This option is currently ignored. + +@end table + +@node Virtual Machine Options, Verbosity Options, Taglet Options, gjdoc Tool +@section Virtual Machine Options + +Sun's @command{javadoc} tool seems to be based on @command{javac} and +as such it seems to operate on the VM level. @command{gjdoc}, in +contrast, is a pure Java application. + +Therefore, @command{gjdoc} can only fake, or simulate, the following +VM-level options. + +@table @gcctabopt + +@item -classpath @var{pathlist} +Set the Virtual Machine @samp{classpath} to @var{pathlist}. + +In most cases you should use @option{-docletpath} or +@option{-tagletpath} instead of this option. + +@var{pathlist} should be one or more paths to a directory or jar file, +separated by your platform's path separator (usually @samp{:} or +@samp{;}). + +If this option is not intercepted at the wrapper level, +@command{gjdoc} currently fakes it by calling +@samp{System.setProperty("java.class.path", @var{pathlist});} and +outputs a warning. + +@item -bootclasspath @var{pathlist} +Set the Virtual Machine @samp{bootclasspath} to @var{pathlist}. + +If this option is not intercepted at the wrapper level, +@command{gjdoc} outputs a warning. + +@item -J@var{vmopt} + +Pass an arbitrary parameter to the Virtual Machine @command{gjdoc} +runs on. + +If this option is not intercepted at the wrapper level, +@command{gjdoc} tries to emulate the option and outputs a warning. + +Currently, only the VM option @option{-D} for setting system +properties is emulated. + +@end table + +@c man end + +@comment ---------------------------------------------------------------------- + +@node Invoking a Custom Doclet, Option Summary by Type, Invoking the Standard Doclet, gjdoc Tool +@section Invoking a Custom Doclet + +For invoking one of the other doclets shipping with @command{gjdoc} or +a third-party doclet, the canonical usage is: + +@smallexample +gjdoc -s src/java/ -all \ + -docletpath /path/to/doclet.jar -doclet foo.BarDoclet \ + (more Gjdoc core options and Doclet-specific options here) +@end smallexample + +@samp{/path/to/doclet.jar} is a placeholder for a class path +specifying where the Doclet classes and dependencies can be found and +@samp{foo.BarDoclet} is the fully-qualified name of the Doclet's main +class. + +@comment ---------------------------------------------------------------------- + +@node Gjdoc Option Summary, Source Set Options, Option Summary by Type, gjdoc Tool +@section Gjdoc Option Summary +@cindex Gjdoc Options + +@comment ---------------------------------------------------------------------- + +@node Other Doclets, Gjdoc Concepts, Doclet Options, gjdoc Tool +@chapter Generating Other Output Types + +@menu +* Built-in Doclets:: +* Third-party Doclets:: +@end menu + +@comment ---------------------------------------------------------------------- + +@node Built-in Doclets, Third-party Doclets, , Other Doclets +@section Using the Built-in Doclets +@cindex Built-in Doclets + +@menu +* Using XmlDoclet:: +* Using TexiDoclet:: +* Using IspellDoclet:: +* Using DebugDoclet:: +@end menu + +@comment ---------------------------------------------------------------------- + +@node Using TexiDoclet, Using XmlDoclet, , Built-in Doclets +@subsection TexiDoclet: Generating Info, PDF, and other formats +@cindex TexiDoclet + +Missing. + +@comment ---------------------------------------------------------------------- + +@node Using XmlDoclet, Using IspellDoclet, Using TexiDoclet, Built-in Doclets +@subsection XmlDoclet: Generating XML Documentation +@cindex HtmlDoclet + +Missing. + +@comment ---------------------------------------------------------------------- + +@node Using IspellDoclet, Using DebugDoclet, Using XmlDoclet, Built-in Doclets +@subsection IspellDoclet: Spell-checking Source Code +@cindex IspellDoclet + +Missing. + +@comment ---------------------------------------------------------------------- + +@node Using DebugDoclet, , Using IspellDoclet, Built-in Doclets +@subsection DebugDoclet: Inspecting the Doclet API +@cindex HtmlDoclet + +Missing. + +@comment ---------------------------------------------------------------------- + +@node Third-party Doclets, , Built-in Doclets, Other Doclets +@section Using Third-Party Doclets +@cindex Third-party Doclets + +@menu +* DocBook Doclet:: +* PDFDoclet:: +* JUnitDoclet:: +@end menu + +@comment ---------------------------------------------------------------------- + +@node DocBook Doclet,PDFDoclet, ,Third-party Doclets +@subsection DocBook Doclet +@cindex DocBook Doclet + +Missing. + +@comment ---------------------------------------------------------------------- + +@node PDFDoclet, JUnitDoclet, DocBook Doclet, Third-party Doclets +@subsection PDFDoclet +@cindex PDFDoclet + +Missing. + +@comment ---------------------------------------------------------------------- + +@node JUnitDoclet, , PDFDoclet, Third-party Doclets +@subsection JUnitDoclet +@cindex JUnitDoclet + +Missing. + +@comment ---------------------------------------------------------------------- + +@node Gjdoc Concepts, , Other Doclets, gjdoc Tool +@chapter Advanced Concepts + +@menu +* Writing Doclets:: +* Taglets:: +* XHTML Fragments:: +* First Sentence Detector:: +* Adding Custom Resources:: +@end menu + +@comment ---------------------------------------------------------------------- + +@node Taglets, Writing Doclets, , Gjdoc Concepts +@section Adding Custom Tags to the Documentation +@cindex Taglet + +Missing. + +@comment ---------------------------------------------------------------------- + +@node Writing Doclets, XHTML Fragments, Taglets, Gjdoc Concepts +@section Writing Doclets +@cindex Taglet + +If the various Doclets already available don't suit your needs, you +can write a custom Doclet yourself. + +@menu +* Doclet Invocation Interface:: +* Using AbstractDoclet:: +* GNU Doclet SPI:: +@end menu + +@comment ---------------------------------------------------------------------- + +@node Doclet Invocation Interface, Using AbstractDoclet, , Writing Doclets +@subsection Implementing the Doclet Invocation Interface + +A Doclet is a class that contains a method with the following +signature: + +@smallexample +public static boolean start(RootDoc rootDoc); +@end smallexample + +@var{rootDoc} is the root of an object hierarchy containing the +information @command{gjdoc} extracted from the source files. See the +Doclet API for more details. + +@samp{start} should process all the information and return +@samp{true} on success, @samp{false} on failure. + +For printing status information, the Doclet should use methods +@samp{printNotice}, @samp{printWarning} and @samp{printError} instead +of @samp{System.err}. The Doclet can opt to use @samp{System.out} for +redirectable output. + +@comment ---------------------------------------------------------------------- + +@node Using AbstractDoclet, GNU Doclet SPI, Doclet Invocation Interface, Writing Doclets +@subsection Deriving Your Doclet from AbstractDoclet +@cindex AbstractDoclet + +You may want your Doclet to provide functionality similar to +HtmlDoclet. For example, you may want it to support Taglets, generate +Index, Tree, and Uses pages, or show other cross-reference information +like @samp{Overrides} and @samp{All Implementing Classes}. + +This information is not directly provided by the Doclet API, so your +Doclet would normally have to assemble it itself. For example, it +would have to add the names of all program elements to a list and sort +this list in order to create the Index page. + +If you want to provide this information or part of it, you should +consider deriving your class from +@samp{gnu.classpath.tools.doclets.AbstractDoclet}. This class +provides the following benefits: + +@itemize @bullet + +@item +Handles options @option{-tag}, @option{-taglet}, @option{-tagletpath} +(Taglets) + +@item +Provides standard taglets for @@version, @@author, @@since, @@serial, +@@deprecated, @@see, @@param, @@return and handles all related options +(@option{-version}, @option{-author}, @option{-nosince}, +@option{-nodeprecated}) + +@item +Handles option @option{-d} (destination directory) + +@item +Handles option @option{-noqualifier} (classes to omit qualifier for) + +@item +Handles options @option{-docfilessubdirs} and +@option{-excludedocfilessubdir} (resource copying) + +@item +Can generate a full index or an index split by first letter + +@item +Can generate a full tree and package trees + +@item +Can generate cross-reference information + +@item +Can aggregate interface information (all superinterfaces, all +subinterfaces, all implementing classes) + +@item +Provides convenient access to constructors, fields, methods, and inner +classes sorted by name/signature instead of the default sort order. + +@item +Provides various other convenience methods + +@end itemize + +If you derive from @samp{AbstractDoclet}, there are a number of things +you need to take care of: + +@itemize @bullet + +@item + +@end itemize + +you should not implement the +@samp{start(RootDoc)} method as it is already defined by +@samp{AbstractDoclet} so that it can care about parsing the options. + +Instead, you implement method @samp{run()}, @samp{getOptions()} and +the other abstract methods to define your Doclet's behavior. + +Note that all information provided by @samp{AbstractDoclet} is +evaluated lazily. That is, if your Doclet doesn't need to create an +Index page, then @samp{AbstractDoclet} will not spend resources on +creating the corresponding information. + +See the API documentation for +@samp{gnu.classpath.tools.doclets.AbstractDoclet} for more details. + +You should be aware that if you base your Doclet on +@samp{AbstractDoclet} then you have to bundle this and all related +classes with your Doclet, with all implications such as possible +licensing issues. Otherwise, your Doclet will only be runnable on +@samp{gjdoc} and not on other documentation systems. Also note that +@samp{AbstractDoclet} has not been extensively tested in environments +other than @samp{gjdoc}. + +@comment ---------------------------------------------------------------------- + +@node GNU Doclet SPI, , Using AbstractDoclet, Writing Doclets +@subsection Preparing for the GNU Doclet Service Provider Interface +@cindex GNU Doclet SPI, Service Provider, SPI + +In addition to the standard Doclet invocation interface described +above, @command{gjdoc} also offers a Service Provider Interface +conforming to the Java standard. Adding support for this interface to +your Doclet simplifies usage for @command{gjdoc} users because it +makes your Doclet ``discoverable''. + +In order to provide the alternate interface, you have to add a class +implementing @samp{gnu.classpath.tools.gjdoc.spi.DocletSpi} to your +Doclet classes, and bundle all Doclet classes in a Jar file along with +a file named +@samp{META_INF/services/gnu.classpath.tools.gjdoc.spi.DocletSpi} which +contains the name of your class implementing DocletSpi on a single +line. + +Note that if your Doclet depends on third-party classes bundled in +separate Jar files, you can link in these classes using the +@samp{Class-path:} Manifest attribute of your Doclet Jar. + +Your Doclet can then be invoked in one of the following ways: +@smallexample +gjdoc -docletjar /path/to/doclet.jar +gjdoc -docletpath /path/to/doclet.jar -docletname @var{docletname} +gjdoc -docletname @var{docletname} +@end smallexample + +Here, @var{docletname} is the name of your doclet as returned by +@samp{DocletSpi.getDocletName()}. + +The last example will only work if your Doclet Jar is in +@command{gjdoc}'s @file{doclets} directory or if it is on the +classpath. + +@comment ---------------------------------------------------------------------- + +@node XHTML Fragments, First Sentence Detector, Writing Doclets, Gjdoc Concepts +@section Well-formed Documentation Fragments +@cindex XHTML Fragments + +For many Doclets it is advantagous if the HTML code in the comments +and HTML code passed via the command line is well-formed. For +example, HtmlDoclet outputs XHTML code, and XmlDoclet XML code, both +of which results in invalid files if the user-specified HTML isn't +wellformed. + +Unfortunately, comments were never required to contain well-formed +HTML code, which means that every Doclet must deal with non-wellformed +code as well. + +The @command{gjdoc} built-in Doclets deal with this problem by +``fixing'' the HTML code - making sure that all tags are closed, +attribute values are provided and quoted, tags are properly nested, +etc. + +This approach works OK in most instances, but since it uses some crude +heuristics it can sometimes produce undesirable result. + +Therefore, in order to make sure that your comments are always +properly formatted, make sure they are well-formed as described in +@w{@uref{http://www.w3.org/TR/xhtml1/#h-4.1, XHTML 1.0: Documents must +be well-formed}}. + +In addition, you should use meaningful tags instead of text formatting +tags to make your output look better in other output formats derived +from your HTML code. For example, you should use the tag instead +of if you want to emphasize text. + +@comment ---------------------------------------------------------------------- + +@node First Sentence Detector, Adding Custom Resources, XHTML Fragments, Gjdoc Concepts +@section How Gjdoc Determines where the First Sentence Ends +@cindex First Sentence Detector + +For a package, class or member summary, @command{gjdoc} only shows the +first sentence of the documentation comment in question. Because +@command{gjdoc} is not human, it is not always obvious to +@command{gjdoc} where the first sentence ends. + +You might be tempted to say that the first sentence ends at the first +occurrence of a punctuation character like @samp{.} or +@samp{!}. However, consider examples like this: +@smallexample +This work, by Thomas J. Shahan et al., is about the middle ages. +@end smallexample + +As you can see, it is not trivial to determine the end of the +sentence. + +@command{gjdoc} gives you the choice between two approaches. By +default it uses built-in heuristics which should be compatible to +Sun's @command{javadoc} tool. This approach works quiet well in most +cases, at least for english comments. + +Alternatively, you can specify option @option{-breakiterator} in which +case @command{gjdoc} will use +@samp{java.text.BreakIterator.getSentenceInstance(@var{locale}).next()} +to find the end of sentence, where @var{locale} is the locale +specified by option @samp{-locale} or the default locale if none +specified. + +@emph{NOT YET IMPLEMENTED:} + +@command{gjdoc} also allows you to explicitly delineate the first +sentence by putting it in a @samp{} tag with the CSS class +@samp{first-sentence}. For example: +@smallexample +/** + * This. is. the. first. + * sentence. This is the second sentence. + */ +@end smallexample + +Note that this will only work with @command{gjdoc}, but shouldn't hurt +when using another documentation system since the @samp{} tag +usually doesn't show up in the output. + +@comment ---------------------------------------------------------------------- + +@node Adding Custom Resources, , First Sentence Detector, Gjdoc Concepts +@section Adding Images and Other Resources +@cindex First Sentence Detector + +Sometimes you want to decorate your documentation with secondary +resources such as images, SVG graphics, applets, and so on. To do so, +simply put the required files in a subdirectory 'doc-files' in the +package directory corresponding to the documentation entry you want to +decorate, and refer to it with the URL +@samp{doc-files/@var{filename}}. + +For example, if you want to add an image to the description of class +@samp{baz.FooBar}, create a directory @file{doc-files} in the +directory @file{baz} containing @file{FooBar.java} and put your file, +say @file{diagram.png}, into that directory. Then, add the HTML code +like this to a comment in @file{FooBar.java}: +@smallexample +Foo Diagram +@end smallexample + +This works because the @file{doc-files} subdirectories will be copied +to the target documentation directory every time you generate the +documentation. + +Note however that by default, the @file{doc-files} directory will not +be copied deeply. In other words, if you create subdirectories under +@file{doc-files} they will not be copied and any resources located in +these subdirectories will not be accessible in your generated +documentation. You can specify option @option{-docfilessubdirs} to +remove this limitation. + +Sometimes you want to use option @option{-docfilessubdirs}, but there +are certain directories which you don't want to be copied, for example +because they contain source files for the resources in +@file{doc-files}. For cases like this, use +@option{-excludedocfilessubdir} to specify directories to be omitted. + +@comment ---------------------------------------------------------------------- + @node I18N Issues, , Other Tools, Top @comment node-name, next, previous, up @chapter I18N Issues diff --git a/libjava/classpath/examples/Makefile.am b/libjava/classpath/examples/Makefile.am index 56b3c45776d..ff47801247c 100644 --- a/libjava/classpath/examples/Makefile.am +++ b/libjava/classpath/examples/Makefile.am @@ -1,7 +1,11 @@ ## Input file for automake to generate the Makefile.in used by configure -GLIBJ_CLASSPATH='$(top_builddir)/lib/glibj.zip' +GLIBJ_CLASSPATH='$(top_builddir)/lib/glibj.zip:$(top_builddir)/lib' +if GCJ_JAVAC +JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.5 -ftarget=1.5 --encoding=UTF-8 --bootclasspath=$(GLIBJ_CLASSPATH) --classpath='$(top_builddir)/tools/tools.zip' +else JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip' +endif # All our example java source files EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*/*.java @@ -84,15 +88,21 @@ dist-hook: # To generate the example zip just depend on the sources and ignore the # class files. Always regenerate all .class files and remove them immediatly. # And copy the png icons we use to the classes dir so they get also included. + +if WITH_JAR +CREATE_EXAMPLE_ZIP=$(JAR) cf ../$(EXAMPLE_ZIP) . +else +CREATE_EXAMPLE_ZIP=$(ZIP) -r ../$(EXAMPLE_ZIP) . +endif + $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES) - mkdir -p classes/gnu/classpath/examples/icons + @mkdir_p@ classes/gnu/classpath/examples/icons cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons - mkdir -p classes/gnu/classpath/examples/swing + @mkdir_p@ classes/gnu/classpath/examples/swing cp $(EXAMPLE_HTML) classes/gnu/classpath/examples/swing $(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES) (cd classes; \ - if test "$(ZIP)" != ""; then $(ZIP) -r ../$(EXAMPLE_ZIP) .; fi; \ - if test "$(FASTJAR)" != ""; then $(FASTJAR) cf ../$(EXAMPLE_ZIP) .; fi; \ + $(CREATE_EXAMPLE_ZIP); \ cd ..) rm -rf classes diff --git a/libjava/classpath/examples/Makefile.in b/libjava/classpath/examples/Makefile.in index 6eebed083c4..3adbdaa84aa 100644 --- a/libjava/classpath/examples/Makefile.in +++ b/libjava/classpath/examples/Makefile.in @@ -52,6 +52,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \ $(top_srcdir)/../../ltsugar.m4 \ $(top_srcdir)/../../ltversion.m4 \ $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/m4/ac_prog_antlr.m4 \ + $(top_srcdir)/m4/ac_prog_java.m4 \ + $(top_srcdir)/m4/ac_prog_java_works.m4 \ $(top_srcdir)/m4/ac_prog_javac.m4 \ $(top_srcdir)/m4/ac_prog_javac_works.m4 \ $(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \ @@ -83,6 +86,8 @@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANTLR = @ANTLR@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -114,6 +119,12 @@ CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@ CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@ CREATE_GCONF_PEER_LIBRARIES_FALSE = @CREATE_GCONF_PEER_LIBRARIES_FALSE@ CREATE_GCONF_PEER_LIBRARIES_TRUE = @CREATE_GCONF_PEER_LIBRARIES_TRUE@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_PARSER_FALSE = @CREATE_GJDOC_PARSER_FALSE@ +CREATE_GJDOC_PARSER_TRUE = @CREATE_GJDOC_PARSER_TRUE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ +CREATE_GMPBI_LIBRARY_FALSE = @CREATE_GMPBI_LIBRARY_FALSE@ +CREATE_GMPBI_LIBRARY_TRUE = @CREATE_GMPBI_LIBRARY_TRUE@ CREATE_GSTREAMER_PEER_LIBRARIES_FALSE = @CREATE_GSTREAMER_PEER_LIBRARIES_FALSE@ CREATE_GSTREAMER_PEER_LIBRARIES_TRUE = @CREATE_GSTREAMER_PEER_LIBRARIES_TRUE@ CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@ @@ -152,11 +163,12 @@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXAMPLESDIR = @EXAMPLESDIR@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ -FASTJAR = @FASTJAR@ FGREP = @FGREP@ FIND = @FIND@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GCJ_JAVAC_FALSE = @GCJ_JAVAC_FALSE@ +GCJ_JAVAC_TRUE = @GCJ_JAVAC_TRUE@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GDK_CFLAGS = @GDK_CFLAGS@ @@ -166,6 +178,8 @@ GENINSRC_TRUE = @GENINSRC_TRUE@ GJDOC = @GJDOC@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ +GMP_CFLAGS = @GMP_CFLAGS@ +GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ GSTREAMER_BASE_CFLAGS = @GSTREAMER_BASE_CFLAGS@ GSTREAMER_BASE_LIBS = @GSTREAMER_BASE_LIBS@ @@ -187,7 +201,10 @@ INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVA = @JAVA@ JAVAC = @JAVAC@ +JAVAC_IS_GCJ = @JAVAC_IS_GCJ@ JAVAC_MEM_OPT = @JAVAC_MEM_OPT@ JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@ JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@ @@ -253,8 +270,10 @@ USE_ESCHER_TRUE = @USE_ESCHER_TRUE@ USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@ USE_PREBUILT_GLIBJ_ZIP_TRUE = @USE_PREBUILT_GLIBJ_ZIP_TRUE@ VERSION = @VERSION@ -VM_BINARY = @VM_BINARY@ +WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@ WARNING_CFLAGS = @WARNING_CFLAGS@ +WITH_JAR_FALSE = @WITH_JAR_FALSE@ +WITH_JAR_TRUE = @WITH_JAR_TRUE@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ XSLT_CFLAGS = @XSLT_CFLAGS@ @@ -265,6 +284,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP = @ZIP@ +ac_ct_ANTLR = @ac_ct_ANTLR@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -324,9 +344,11 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ +uudecode = @uudecode@ vm_classes = @vm_classes@ -GLIBJ_CLASSPATH = '$(top_builddir)/lib/glibj.zip' -JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip' +GLIBJ_CLASSPATH = '$(top_builddir)/lib/glibj.zip:$(top_builddir)/lib' +@GCJ_JAVAC_FALSE@JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip' +@GCJ_JAVAC_TRUE@JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.5 -ftarget=1.5 --encoding=UTF-8 --bootclasspath=$(GLIBJ_CLASSPATH) --classpath='$(top_builddir)/tools/tools.zip' # All our example java source files EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*/*.java @@ -362,6 +384,12 @@ exampledir = $(pkgdatadir)/examples # Make sure everything is included in the distribution. EXTRA_DIST = README Makefile.jawt.in Makefile.java2d.in +@WITH_JAR_FALSE@CREATE_EXAMPLE_ZIP = $(ZIP) -r ../$(EXAMPLE_ZIP) . + +# To generate the example zip just depend on the sources and ignore the +# class files. Always regenerate all .class files and remove them immediatly. +# And copy the png icons we use to the classes dir so they get also included. +@WITH_JAR_TRUE@CREATE_EXAMPLE_ZIP = $(JAR) cf ../$(EXAMPLE_ZIP) . all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -599,18 +627,14 @@ dist-hook: cp -p $$file $(distdir)/$$f; \ done -# To generate the example zip just depend on the sources and ignore the -# class files. Always regenerate all .class files and remove them immediatly. -# And copy the png icons we use to the classes dir so they get also included. $(EXAMPLE_ZIP): $(EXAMPLE_JAVA_FILES) - mkdir -p classes/gnu/classpath/examples/icons + @mkdir_p@ classes/gnu/classpath/examples/icons cp $(EXAMPLE_ICONS) classes/gnu/classpath/examples/icons - mkdir -p classes/gnu/classpath/examples/swing + @mkdir_p@ classes/gnu/classpath/examples/swing cp $(EXAMPLE_HTML) classes/gnu/classpath/examples/swing $(JCOMPILER) -d classes $(EXAMPLE_JAVA_FILES) (cd classes; \ - if test "$(ZIP)" != ""; then $(ZIP) -r ../$(EXAMPLE_ZIP) .; fi; \ - if test "$(FASTJAR)" != ""; then $(FASTJAR) cf ../$(EXAMPLE_ZIP) .; fi; \ + $(CREATE_EXAMPLE_ZIP); \ cd ..) rm -rf classes diff --git a/libjava/classpath/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoServant.java b/libjava/classpath/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoServant.java index c07b77b1728..9af20d227ab 100644 --- a/libjava/classpath/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoServant.java +++ b/libjava/classpath/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DemoServant.java @@ -145,7 +145,7 @@ public class DemoServant { System.out.println("SERVER: ***** Transferring tree"); - StringBuffer b = new StringBuffer(); + StringBuilder b = new StringBuilder(); // This both creates the tree string representation // and changes the TreeNode names. @@ -214,7 +214,7 @@ public class DemoServant * @param b the buffer to collect the string representation. * @param n the rott tree TreeNode. */ - private void getImage(StringBuffer b, TreeNode n) + private void getImage(StringBuilder b, TreeNode n) { b.append(n.name); n.name = n.name + "++"; diff --git a/libjava/classpath/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java b/libjava/classpath/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java index 732b00cfb30..843530de55b 100644 --- a/libjava/classpath/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java +++ b/libjava/classpath/examples/gnu/classpath/examples/CORBA/SimpleCommunication/communication/DirectTest.java @@ -269,7 +269,7 @@ public class DirectTest object.passTree(nh); // Convert the returned tree to some strig representation. - StringBuffer img = new StringBuffer(); + StringBuilder img = new StringBuilder(); getImage(img, nh.value); System.out.println("Returned tree: " + img.toString()); @@ -314,7 +314,7 @@ public class DirectTest * @param b the string buffer to accumulate the representation. * @param n the tree (root TreeNode). */ - private void getImage(StringBuffer b, TreeNode n) + private void getImage(StringBuilder b, TreeNode n) { b.append(n.name); b.append(": ("); diff --git a/libjava/classpath/examples/gnu/classpath/examples/CORBA/swing/x5/IorReader.java b/libjava/classpath/examples/gnu/classpath/examples/CORBA/swing/x5/IorReader.java index a976def74f3..73a8eecab93 100644 --- a/libjava/classpath/examples/gnu/classpath/examples/CORBA/swing/x5/IorReader.java +++ b/libjava/classpath/examples/gnu/classpath/examples/CORBA/swing/x5/IorReader.java @@ -79,7 +79,7 @@ public class IorReader { InputStreamReader r = new InputStreamReader(u.openStream()); - StringBuffer b = new StringBuffer(); + StringBuilder b = new StringBuilder(); int c; while ((c = r.read()) > 0) diff --git a/libjava/classpath/examples/gnu/classpath/examples/CORBA/swing/x5/X5Server.java b/libjava/classpath/examples/gnu/classpath/examples/CORBA/swing/x5/X5Server.java index 2ef9241c520..77178346043 100644 --- a/libjava/classpath/examples/gnu/classpath/examples/CORBA/swing/x5/X5Server.java +++ b/libjava/classpath/examples/gnu/classpath/examples/CORBA/swing/x5/X5Server.java @@ -147,7 +147,7 @@ public class X5Server int length = GameManagerImpl.ior.length(); - StringBuffer b = new StringBuffer(); + StringBuilder b = new StringBuilder(); b.append("HTTP/1.0 200 OK\r\n"); b.append("Content-Length: " + length + "\r\n"); b.append("Connection: close\r\n"); diff --git a/libjava/classpath/examples/gnu/classpath/examples/html/Demo.java b/libjava/classpath/examples/gnu/classpath/examples/html/Demo.java index 34dd73b32cb..3d77b127a04 100644 --- a/libjava/classpath/examples/gnu/classpath/examples/html/Demo.java +++ b/libjava/classpath/examples/gnu/classpath/examples/html/Demo.java @@ -94,7 +94,7 @@ public class Demo if (node == null) return; - StringBuffer tab = new StringBuffer(); + StringBuilder tab = new StringBuilder(); stream.println(); for (int i = 0; i < ident; i++) { diff --git a/libjava/classpath/external/Makefile.in b/libjava/classpath/external/Makefile.in index 4b2f6630823..0f122f76b5c 100644 --- a/libjava/classpath/external/Makefile.in +++ b/libjava/classpath/external/Makefile.in @@ -50,6 +50,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \ $(top_srcdir)/../../ltsugar.m4 \ $(top_srcdir)/../../ltversion.m4 \ $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/m4/ac_prog_antlr.m4 \ + $(top_srcdir)/m4/ac_prog_java.m4 \ + $(top_srcdir)/m4/ac_prog_java_works.m4 \ $(top_srcdir)/m4/ac_prog_javac.m4 \ $(top_srcdir)/m4/ac_prog_javac_works.m4 \ $(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \ @@ -81,6 +84,8 @@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANTLR = @ANTLR@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -112,6 +117,12 @@ CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@ CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@ CREATE_GCONF_PEER_LIBRARIES_FALSE = @CREATE_GCONF_PEER_LIBRARIES_FALSE@ CREATE_GCONF_PEER_LIBRARIES_TRUE = @CREATE_GCONF_PEER_LIBRARIES_TRUE@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_PARSER_FALSE = @CREATE_GJDOC_PARSER_FALSE@ +CREATE_GJDOC_PARSER_TRUE = @CREATE_GJDOC_PARSER_TRUE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ +CREATE_GMPBI_LIBRARY_FALSE = @CREATE_GMPBI_LIBRARY_FALSE@ +CREATE_GMPBI_LIBRARY_TRUE = @CREATE_GMPBI_LIBRARY_TRUE@ CREATE_GSTREAMER_PEER_LIBRARIES_FALSE = @CREATE_GSTREAMER_PEER_LIBRARIES_FALSE@ CREATE_GSTREAMER_PEER_LIBRARIES_TRUE = @CREATE_GSTREAMER_PEER_LIBRARIES_TRUE@ CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@ @@ -150,11 +161,12 @@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXAMPLESDIR = @EXAMPLESDIR@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ -FASTJAR = @FASTJAR@ FGREP = @FGREP@ FIND = @FIND@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GCJ_JAVAC_FALSE = @GCJ_JAVAC_FALSE@ +GCJ_JAVAC_TRUE = @GCJ_JAVAC_TRUE@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GDK_CFLAGS = @GDK_CFLAGS@ @@ -164,6 +176,8 @@ GENINSRC_TRUE = @GENINSRC_TRUE@ GJDOC = @GJDOC@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ +GMP_CFLAGS = @GMP_CFLAGS@ +GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ GSTREAMER_BASE_CFLAGS = @GSTREAMER_BASE_CFLAGS@ GSTREAMER_BASE_LIBS = @GSTREAMER_BASE_LIBS@ @@ -185,7 +199,10 @@ INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVA = @JAVA@ JAVAC = @JAVAC@ +JAVAC_IS_GCJ = @JAVAC_IS_GCJ@ JAVAC_MEM_OPT = @JAVAC_MEM_OPT@ JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@ JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@ @@ -251,8 +268,10 @@ USE_ESCHER_TRUE = @USE_ESCHER_TRUE@ USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@ USE_PREBUILT_GLIBJ_ZIP_TRUE = @USE_PREBUILT_GLIBJ_ZIP_TRUE@ VERSION = @VERSION@ -VM_BINARY = @VM_BINARY@ +WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@ WARNING_CFLAGS = @WARNING_CFLAGS@ +WITH_JAR_FALSE = @WITH_JAR_FALSE@ +WITH_JAR_TRUE = @WITH_JAR_TRUE@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ XSLT_CFLAGS = @XSLT_CFLAGS@ @@ -263,6 +282,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP = @ZIP@ +ac_ct_ANTLR = @ac_ct_ANTLR@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -322,6 +342,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ +uudecode = @uudecode@ vm_classes = @vm_classes@ SUBDIRS = sax w3c_dom relaxngDatatype jsr166 EXTRA_DIST = README diff --git a/libjava/classpath/external/jsr166/Makefile.in b/libjava/classpath/external/jsr166/Makefile.in index 523e37505bc..4be9f2e2e49 100644 --- a/libjava/classpath/external/jsr166/Makefile.in +++ b/libjava/classpath/external/jsr166/Makefile.in @@ -50,6 +50,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \ $(top_srcdir)/../../ltsugar.m4 \ $(top_srcdir)/../../ltversion.m4 \ $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/m4/ac_prog_antlr.m4 \ + $(top_srcdir)/m4/ac_prog_java.m4 \ + $(top_srcdir)/m4/ac_prog_java_works.m4 \ $(top_srcdir)/m4/ac_prog_javac.m4 \ $(top_srcdir)/m4/ac_prog_javac_works.m4 \ $(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \ @@ -72,6 +75,8 @@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANTLR = @ANTLR@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -103,6 +108,12 @@ CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@ CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@ CREATE_GCONF_PEER_LIBRARIES_FALSE = @CREATE_GCONF_PEER_LIBRARIES_FALSE@ CREATE_GCONF_PEER_LIBRARIES_TRUE = @CREATE_GCONF_PEER_LIBRARIES_TRUE@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_PARSER_FALSE = @CREATE_GJDOC_PARSER_FALSE@ +CREATE_GJDOC_PARSER_TRUE = @CREATE_GJDOC_PARSER_TRUE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ +CREATE_GMPBI_LIBRARY_FALSE = @CREATE_GMPBI_LIBRARY_FALSE@ +CREATE_GMPBI_LIBRARY_TRUE = @CREATE_GMPBI_LIBRARY_TRUE@ CREATE_GSTREAMER_PEER_LIBRARIES_FALSE = @CREATE_GSTREAMER_PEER_LIBRARIES_FALSE@ CREATE_GSTREAMER_PEER_LIBRARIES_TRUE = @CREATE_GSTREAMER_PEER_LIBRARIES_TRUE@ CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@ @@ -141,11 +152,12 @@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXAMPLESDIR = @EXAMPLESDIR@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ -FASTJAR = @FASTJAR@ FGREP = @FGREP@ FIND = @FIND@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GCJ_JAVAC_FALSE = @GCJ_JAVAC_FALSE@ +GCJ_JAVAC_TRUE = @GCJ_JAVAC_TRUE@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GDK_CFLAGS = @GDK_CFLAGS@ @@ -155,6 +167,8 @@ GENINSRC_TRUE = @GENINSRC_TRUE@ GJDOC = @GJDOC@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ +GMP_CFLAGS = @GMP_CFLAGS@ +GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ GSTREAMER_BASE_CFLAGS = @GSTREAMER_BASE_CFLAGS@ GSTREAMER_BASE_LIBS = @GSTREAMER_BASE_LIBS@ @@ -176,7 +190,10 @@ INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVA = @JAVA@ JAVAC = @JAVAC@ +JAVAC_IS_GCJ = @JAVAC_IS_GCJ@ JAVAC_MEM_OPT = @JAVAC_MEM_OPT@ JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@ JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@ @@ -242,8 +259,10 @@ USE_ESCHER_TRUE = @USE_ESCHER_TRUE@ USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@ USE_PREBUILT_GLIBJ_ZIP_TRUE = @USE_PREBUILT_GLIBJ_ZIP_TRUE@ VERSION = @VERSION@ -VM_BINARY = @VM_BINARY@ +WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@ WARNING_CFLAGS = @WARNING_CFLAGS@ +WITH_JAR_FALSE = @WITH_JAR_FALSE@ +WITH_JAR_TRUE = @WITH_JAR_TRUE@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ XSLT_CFLAGS = @XSLT_CFLAGS@ @@ -254,6 +273,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP = @ZIP@ +ac_ct_ANTLR = @ac_ct_ANTLR@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -313,6 +333,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ +uudecode = @uudecode@ vm_classes = @vm_classes@ EXTRA_DIST = IMPORTING \ readme \ diff --git a/libjava/classpath/external/relaxngDatatype/Makefile.in b/libjava/classpath/external/relaxngDatatype/Makefile.in index f400becc7b3..5d59fdabe28 100644 --- a/libjava/classpath/external/relaxngDatatype/Makefile.in +++ b/libjava/classpath/external/relaxngDatatype/Makefile.in @@ -50,6 +50,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \ $(top_srcdir)/../../ltsugar.m4 \ $(top_srcdir)/../../ltversion.m4 \ $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/m4/ac_prog_antlr.m4 \ + $(top_srcdir)/m4/ac_prog_java.m4 \ + $(top_srcdir)/m4/ac_prog_java_works.m4 \ $(top_srcdir)/m4/ac_prog_javac.m4 \ $(top_srcdir)/m4/ac_prog_javac_works.m4 \ $(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \ @@ -72,6 +75,8 @@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANTLR = @ANTLR@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -103,6 +108,12 @@ CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@ CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@ CREATE_GCONF_PEER_LIBRARIES_FALSE = @CREATE_GCONF_PEER_LIBRARIES_FALSE@ CREATE_GCONF_PEER_LIBRARIES_TRUE = @CREATE_GCONF_PEER_LIBRARIES_TRUE@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_PARSER_FALSE = @CREATE_GJDOC_PARSER_FALSE@ +CREATE_GJDOC_PARSER_TRUE = @CREATE_GJDOC_PARSER_TRUE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ +CREATE_GMPBI_LIBRARY_FALSE = @CREATE_GMPBI_LIBRARY_FALSE@ +CREATE_GMPBI_LIBRARY_TRUE = @CREATE_GMPBI_LIBRARY_TRUE@ CREATE_GSTREAMER_PEER_LIBRARIES_FALSE = @CREATE_GSTREAMER_PEER_LIBRARIES_FALSE@ CREATE_GSTREAMER_PEER_LIBRARIES_TRUE = @CREATE_GSTREAMER_PEER_LIBRARIES_TRUE@ CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@ @@ -141,11 +152,12 @@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXAMPLESDIR = @EXAMPLESDIR@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ -FASTJAR = @FASTJAR@ FGREP = @FGREP@ FIND = @FIND@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GCJ_JAVAC_FALSE = @GCJ_JAVAC_FALSE@ +GCJ_JAVAC_TRUE = @GCJ_JAVAC_TRUE@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GDK_CFLAGS = @GDK_CFLAGS@ @@ -155,6 +167,8 @@ GENINSRC_TRUE = @GENINSRC_TRUE@ GJDOC = @GJDOC@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ +GMP_CFLAGS = @GMP_CFLAGS@ +GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ GSTREAMER_BASE_CFLAGS = @GSTREAMER_BASE_CFLAGS@ GSTREAMER_BASE_LIBS = @GSTREAMER_BASE_LIBS@ @@ -176,7 +190,10 @@ INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVA = @JAVA@ JAVAC = @JAVAC@ +JAVAC_IS_GCJ = @JAVAC_IS_GCJ@ JAVAC_MEM_OPT = @JAVAC_MEM_OPT@ JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@ JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@ @@ -242,8 +259,10 @@ USE_ESCHER_TRUE = @USE_ESCHER_TRUE@ USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@ USE_PREBUILT_GLIBJ_ZIP_TRUE = @USE_PREBUILT_GLIBJ_ZIP_TRUE@ VERSION = @VERSION@ -VM_BINARY = @VM_BINARY@ +WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@ WARNING_CFLAGS = @WARNING_CFLAGS@ +WITH_JAR_FALSE = @WITH_JAR_FALSE@ +WITH_JAR_TRUE = @WITH_JAR_TRUE@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ XSLT_CFLAGS = @XSLT_CFLAGS@ @@ -254,6 +273,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP = @ZIP@ +ac_ct_ANTLR = @ac_ct_ANTLR@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -313,6 +333,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ +uudecode = @uudecode@ vm_classes = @vm_classes@ EXTRA_DIST = README.txt \ copying.txt \ diff --git a/libjava/classpath/external/sax/Makefile.in b/libjava/classpath/external/sax/Makefile.in index 8bdb122ee26..1f20b35bb2f 100644 --- a/libjava/classpath/external/sax/Makefile.in +++ b/libjava/classpath/external/sax/Makefile.in @@ -50,6 +50,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \ $(top_srcdir)/../../ltsugar.m4 \ $(top_srcdir)/../../ltversion.m4 \ $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/m4/ac_prog_antlr.m4 \ + $(top_srcdir)/m4/ac_prog_java.m4 \ + $(top_srcdir)/m4/ac_prog_java_works.m4 \ $(top_srcdir)/m4/ac_prog_javac.m4 \ $(top_srcdir)/m4/ac_prog_javac_works.m4 \ $(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \ @@ -72,6 +75,8 @@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANTLR = @ANTLR@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -103,6 +108,12 @@ CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@ CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@ CREATE_GCONF_PEER_LIBRARIES_FALSE = @CREATE_GCONF_PEER_LIBRARIES_FALSE@ CREATE_GCONF_PEER_LIBRARIES_TRUE = @CREATE_GCONF_PEER_LIBRARIES_TRUE@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_PARSER_FALSE = @CREATE_GJDOC_PARSER_FALSE@ +CREATE_GJDOC_PARSER_TRUE = @CREATE_GJDOC_PARSER_TRUE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ +CREATE_GMPBI_LIBRARY_FALSE = @CREATE_GMPBI_LIBRARY_FALSE@ +CREATE_GMPBI_LIBRARY_TRUE = @CREATE_GMPBI_LIBRARY_TRUE@ CREATE_GSTREAMER_PEER_LIBRARIES_FALSE = @CREATE_GSTREAMER_PEER_LIBRARIES_FALSE@ CREATE_GSTREAMER_PEER_LIBRARIES_TRUE = @CREATE_GSTREAMER_PEER_LIBRARIES_TRUE@ CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@ @@ -141,11 +152,12 @@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXAMPLESDIR = @EXAMPLESDIR@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ -FASTJAR = @FASTJAR@ FGREP = @FGREP@ FIND = @FIND@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GCJ_JAVAC_FALSE = @GCJ_JAVAC_FALSE@ +GCJ_JAVAC_TRUE = @GCJ_JAVAC_TRUE@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GDK_CFLAGS = @GDK_CFLAGS@ @@ -155,6 +167,8 @@ GENINSRC_TRUE = @GENINSRC_TRUE@ GJDOC = @GJDOC@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ +GMP_CFLAGS = @GMP_CFLAGS@ +GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ GSTREAMER_BASE_CFLAGS = @GSTREAMER_BASE_CFLAGS@ GSTREAMER_BASE_LIBS = @GSTREAMER_BASE_LIBS@ @@ -176,7 +190,10 @@ INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVA = @JAVA@ JAVAC = @JAVAC@ +JAVAC_IS_GCJ = @JAVAC_IS_GCJ@ JAVAC_MEM_OPT = @JAVAC_MEM_OPT@ JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@ JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@ @@ -242,8 +259,10 @@ USE_ESCHER_TRUE = @USE_ESCHER_TRUE@ USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@ USE_PREBUILT_GLIBJ_ZIP_TRUE = @USE_PREBUILT_GLIBJ_ZIP_TRUE@ VERSION = @VERSION@ -VM_BINARY = @VM_BINARY@ +WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@ WARNING_CFLAGS = @WARNING_CFLAGS@ +WITH_JAR_FALSE = @WITH_JAR_FALSE@ +WITH_JAR_TRUE = @WITH_JAR_TRUE@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ XSLT_CFLAGS = @XSLT_CFLAGS@ @@ -254,6 +273,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP = @ZIP@ +ac_ct_ANTLR = @ac_ct_ANTLR@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -313,6 +333,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ +uudecode = @uudecode@ vm_classes = @vm_classes@ EXTRA_DIST = README \ org/xml/sax/ext/Attributes2.java \ diff --git a/libjava/classpath/external/w3c_dom/Makefile.in b/libjava/classpath/external/w3c_dom/Makefile.in index b44d4330fff..2079c48ac29 100644 --- a/libjava/classpath/external/w3c_dom/Makefile.in +++ b/libjava/classpath/external/w3c_dom/Makefile.in @@ -50,6 +50,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \ $(top_srcdir)/../../ltsugar.m4 \ $(top_srcdir)/../../ltversion.m4 \ $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/m4/ac_prog_antlr.m4 \ + $(top_srcdir)/m4/ac_prog_java.m4 \ + $(top_srcdir)/m4/ac_prog_java_works.m4 \ $(top_srcdir)/m4/ac_prog_javac.m4 \ $(top_srcdir)/m4/ac_prog_javac_works.m4 \ $(top_srcdir)/m4/acattribute.m4 $(top_srcdir)/m4/accross.m4 \ @@ -72,6 +75,8 @@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +ANTLR = @ANTLR@ +ANTLR_JAR = @ANTLR_JAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -103,6 +108,12 @@ CREATE_DSSI_LIBRARIES_FALSE = @CREATE_DSSI_LIBRARIES_FALSE@ CREATE_DSSI_LIBRARIES_TRUE = @CREATE_DSSI_LIBRARIES_TRUE@ CREATE_GCONF_PEER_LIBRARIES_FALSE = @CREATE_GCONF_PEER_LIBRARIES_FALSE@ CREATE_GCONF_PEER_LIBRARIES_TRUE = @CREATE_GCONF_PEER_LIBRARIES_TRUE@ +CREATE_GJDOC_FALSE = @CREATE_GJDOC_FALSE@ +CREATE_GJDOC_PARSER_FALSE = @CREATE_GJDOC_PARSER_FALSE@ +CREATE_GJDOC_PARSER_TRUE = @CREATE_GJDOC_PARSER_TRUE@ +CREATE_GJDOC_TRUE = @CREATE_GJDOC_TRUE@ +CREATE_GMPBI_LIBRARY_FALSE = @CREATE_GMPBI_LIBRARY_FALSE@ +CREATE_GMPBI_LIBRARY_TRUE = @CREATE_GMPBI_LIBRARY_TRUE@ CREATE_GSTREAMER_PEER_LIBRARIES_FALSE = @CREATE_GSTREAMER_PEER_LIBRARIES_FALSE@ CREATE_GSTREAMER_PEER_LIBRARIES_TRUE = @CREATE_GSTREAMER_PEER_LIBRARIES_TRUE@ CREATE_GTK_PEER_LIBRARIES_FALSE = @CREATE_GTK_PEER_LIBRARIES_FALSE@ @@ -141,11 +152,12 @@ ERROR_CFLAGS = @ERROR_CFLAGS@ EXAMPLESDIR = @EXAMPLESDIR@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ -FASTJAR = @FASTJAR@ FGREP = @FGREP@ FIND = @FIND@ FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@ FREETYPE2_LIBS = @FREETYPE2_LIBS@ +GCJ_JAVAC_FALSE = @GCJ_JAVAC_FALSE@ +GCJ_JAVAC_TRUE = @GCJ_JAVAC_TRUE@ GCONF_CFLAGS = @GCONF_CFLAGS@ GCONF_LIBS = @GCONF_LIBS@ GDK_CFLAGS = @GDK_CFLAGS@ @@ -155,6 +167,8 @@ GENINSRC_TRUE = @GENINSRC_TRUE@ GJDOC = @GJDOC@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_LIBS = @GLIB_LIBS@ +GMP_CFLAGS = @GMP_CFLAGS@ +GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ GSTREAMER_BASE_CFLAGS = @GSTREAMER_BASE_CFLAGS@ GSTREAMER_BASE_LIBS = @GSTREAMER_BASE_LIBS@ @@ -176,7 +190,10 @@ INSTALL_GLIBJ_ZIP_TRUE = @INSTALL_GLIBJ_ZIP_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVA = @JAVA@ JAVAC = @JAVAC@ +JAVAC_IS_GCJ = @JAVAC_IS_GCJ@ JAVAC_MEM_OPT = @JAVAC_MEM_OPT@ JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = @JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION@ JAVA_MAINTAINER_MODE_FALSE = @JAVA_MAINTAINER_MODE_FALSE@ @@ -242,8 +259,10 @@ USE_ESCHER_TRUE = @USE_ESCHER_TRUE@ USE_PREBUILT_GLIBJ_ZIP_FALSE = @USE_PREBUILT_GLIBJ_ZIP_FALSE@ USE_PREBUILT_GLIBJ_ZIP_TRUE = @USE_PREBUILT_GLIBJ_ZIP_TRUE@ VERSION = @VERSION@ -VM_BINARY = @VM_BINARY@ +WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@ WARNING_CFLAGS = @WARNING_CFLAGS@ +WITH_JAR_FALSE = @WITH_JAR_FALSE@ +WITH_JAR_TRUE = @WITH_JAR_TRUE@ XML_CFLAGS = @XML_CFLAGS@ XML_LIBS = @XML_LIBS@ XSLT_CFLAGS = @XSLT_CFLAGS@ @@ -254,6 +273,7 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ ZIP = @ZIP@ +ac_ct_ANTLR = @ac_ct_ANTLR@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ @@ -313,6 +333,7 @@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ +uudecode = @uudecode@ vm_classes = @vm_classes@ EXTRA_DIST = README \ org/w3c/dom/Attr.java \ diff --git a/libjava/classpath/gnu/CORBA/BigDecimalHelper.java b/libjava/classpath/gnu/CORBA/BigDecimalHelper.java index 119db045f0f..33b74bb7780 100644 --- a/libjava/classpath/gnu/CORBA/BigDecimalHelper.java +++ b/libjava/classpath/gnu/CORBA/BigDecimalHelper.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.CORBA; +import gnu.java.lang.CPStringBuilder; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -135,7 +137,7 @@ public class BigDecimalHelper public static void write(java.io.OutputStream out, BigDecimal x) throws IOException, BadKind { - StringBuffer v = new StringBuffer(x.unscaledValue().toString()); + CPStringBuilder v = new CPStringBuilder(x.unscaledValue().toString()); boolean negative = v.charAt(0) == '-'; @@ -165,7 +167,7 @@ public class BigDecimalHelper */ private static BigDecimal createFixed(int scale, byte[] d) { - StringBuffer s = new StringBuffer(2 * d.length); + CPStringBuilder s = new CPStringBuilder(2 * d.length); int last = d.length - 1; diff --git a/libjava/classpath/gnu/CORBA/CDR/LittleEndianInputStream.java b/libjava/classpath/gnu/CORBA/CDR/LittleEndianInputStream.java index a439b658b44..93d18fb1140 100644 --- a/libjava/classpath/gnu/CORBA/CDR/LittleEndianInputStream.java +++ b/libjava/classpath/gnu/CORBA/CDR/LittleEndianInputStream.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.CORBA.CDR; +import gnu.java.lang.CPStringBuilder; + import java.io.EOFException; import java.io.FilterInputStream; import java.io.IOException; @@ -360,7 +362,7 @@ public class LittleEndianInputStream public String readLine() throws IOException { - StringBuffer strb = new StringBuffer(); + CPStringBuilder strb = new CPStringBuilder(); while (true) { @@ -629,4 +631,4 @@ public class LittleEndianInputStream { throw new InternalError(); } -} \ No newline at end of file +} diff --git a/libjava/classpath/gnu/CORBA/CDR/Vio.java b/libjava/classpath/gnu/CORBA/CDR/Vio.java index 67a69b87458..86f842c34bb 100644 --- a/libjava/classpath/gnu/CORBA/CDR/Vio.java +++ b/libjava/classpath/gnu/CORBA/CDR/Vio.java @@ -41,6 +41,8 @@ package gnu.CORBA.CDR; import gnu.CORBA.Minor; import gnu.CORBA.ObjectCreator; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.CustomMarshal; import org.omg.CORBA.DataInputStream; import org.omg.CORBA.DataOutputStream; @@ -754,7 +756,7 @@ public abstract class Vio return "null"; else { - StringBuffer b = new StringBuffer("{"); + CPStringBuilder b = new CPStringBuilder("{"); for (int i = 0; i < s.length; i++) { b.append(s[i]); @@ -1469,4 +1471,4 @@ public abstract class Vio return VMVio.allocateObject(clazz, constructor.getDeclaringClass(), constructor); } -} \ No newline at end of file +} diff --git a/libjava/classpath/gnu/CORBA/CDR/gnuRuntime.java b/libjava/classpath/gnu/CORBA/CDR/gnuRuntime.java index 929dc72ec8a..4af8c68515a 100644 --- a/libjava/classpath/gnu/CORBA/CDR/gnuRuntime.java +++ b/libjava/classpath/gnu/CORBA/CDR/gnuRuntime.java @@ -40,6 +40,8 @@ package gnu.CORBA.CDR; import gnu.CORBA.Minor; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.LocalObject; import org.omg.CORBA.MARSHAL; @@ -318,7 +320,7 @@ public class gnuRuntime */ public String dump() { - StringBuffer b = new StringBuffer(" Stream content: \n"); + CPStringBuilder b = new CPStringBuilder(" Stream content: \n"); // Sort by position. TreeSet t = new TreeSet(positions.keySet()); diff --git a/libjava/classpath/gnu/CORBA/GIOP/MessageHeader.java b/libjava/classpath/gnu/CORBA/GIOP/MessageHeader.java index cac2405fc77..f63cbea1708 100644 --- a/libjava/classpath/gnu/CORBA/GIOP/MessageHeader.java +++ b/libjava/classpath/gnu/CORBA/GIOP/MessageHeader.java @@ -47,6 +47,8 @@ import gnu.CORBA.CDR.LittleEndianOutputStream; import gnu.CORBA.CDR.AbstractDataInput; import gnu.CORBA.CDR.AbstractDataOutput; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.MARSHAL; import org.omg.CORBA.portable.IDLEntity; @@ -286,7 +288,7 @@ public class MessageHeader int minor; if (! Arrays.equals(xMagic, MAGIC)) { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); if (r == - 1) { b.append("Immediate EOF"); @@ -460,4 +462,4 @@ public class MessageHeader throw m; } } -} \ No newline at end of file +} diff --git a/libjava/classpath/gnu/CORBA/GIOP/RequestHeader.java b/libjava/classpath/gnu/CORBA/GIOP/RequestHeader.java index 3cfadfd7867..45997ab3deb 100644 --- a/libjava/classpath/gnu/CORBA/GIOP/RequestHeader.java +++ b/libjava/classpath/gnu/CORBA/GIOP/RequestHeader.java @@ -41,6 +41,8 @@ package gnu.CORBA.GIOP; import gnu.CORBA.CDR.AbstractCdrInput; import gnu.CORBA.CDR.AbstractCdrOutput; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.portable.IDLEntity; /** @@ -123,7 +125,7 @@ public abstract class RequestHeader */ public String bytes(byte[] array) { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < array.length; i++) { b.append(Integer.toHexString(array[i] & 0xFF)); diff --git a/libjava/classpath/gnu/CORBA/GIOP/v1_0/ReplyHeader.java b/libjava/classpath/gnu/CORBA/GIOP/v1_0/ReplyHeader.java index c085c17fb9b..dcb00c0ebc4 100644 --- a/libjava/classpath/gnu/CORBA/GIOP/v1_0/ReplyHeader.java +++ b/libjava/classpath/gnu/CORBA/GIOP/v1_0/ReplyHeader.java @@ -43,6 +43,8 @@ import gnu.CORBA.CDR.AbstractCdrOutput; import gnu.CORBA.GIOP.ServiceContext; import gnu.CORBA.GIOP.CodeSetServiceContext; +import gnu.java.lang.CPStringBuilder; + /** * The header of the standard reply. * @@ -80,7 +82,7 @@ public class ReplyHeader */ public String contexts() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < service_context.length; i++) { b.append(service_context [ i ].toString()); diff --git a/libjava/classpath/gnu/CORBA/GIOP/v1_0/RequestHeader.java b/libjava/classpath/gnu/CORBA/GIOP/v1_0/RequestHeader.java index 5cf723cbc42..d2bea9d8804 100644 --- a/libjava/classpath/gnu/CORBA/GIOP/v1_0/RequestHeader.java +++ b/libjava/classpath/gnu/CORBA/GIOP/v1_0/RequestHeader.java @@ -43,6 +43,8 @@ import gnu.CORBA.CDR.AbstractCdrOutput; import gnu.CORBA.GIOP.ServiceContext; import gnu.CORBA.GIOP.CodeSetServiceContext; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.portable.IDLEntity; /** @@ -81,7 +83,7 @@ public class RequestHeader public String bytes(byte[] array) { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < array.length; i++) { b.append(Integer.toHexString(array [ i ] & 0xFF)); @@ -95,7 +97,7 @@ public class RequestHeader */ public String contexts() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < service_context.length; i++) { b.append(service_context [ i ].toString()); diff --git a/libjava/classpath/gnu/CORBA/IOR.java b/libjava/classpath/gnu/CORBA/IOR.java index 5e13aecabd3..7f63471eef0 100644 --- a/libjava/classpath/gnu/CORBA/IOR.java +++ b/libjava/classpath/gnu/CORBA/IOR.java @@ -45,6 +45,8 @@ import gnu.CORBA.CDR.AbstractCdrOutput; import gnu.CORBA.GIOP.CharSets_OSF; import gnu.CORBA.GIOP.CodeSetServiceContext; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.BAD_PARAM; import org.omg.CORBA.CompletionStatus; import org.omg.CORBA.MARSHAL; @@ -126,7 +128,7 @@ public class IOR */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append("native " + name(native_set)); if (conversion != null && conversion.length > 0) { @@ -146,7 +148,7 @@ public class IOR */ public String toStringFormatted() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append("\n Native set " + name(native_set)); if (conversion != null && conversion.length > 0) { @@ -282,7 +284,7 @@ public class IOR */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append(host); b.append(":"); b.append(port); @@ -591,7 +593,7 @@ public class IOR */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append(Id); b.append(" at "); b.append(Internet); @@ -618,7 +620,7 @@ public class IOR */ public String toStringFormatted() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append("\nObject Id:\n "); b.append(Id); b.append("\nObject is accessible at:\n "); @@ -656,7 +658,7 @@ public class IOR _write(out); - StringBuffer b = new StringBuffer("IOR:"); + CPStringBuilder b = new CPStringBuilder("IOR:"); byte[] binary = out.buffer.toByteArray(); String s; @@ -819,4 +821,4 @@ public class IOR } return (int) adler.getValue(); } -} \ No newline at end of file +} diff --git a/libjava/classpath/gnu/CORBA/NamingService/NameParser.java b/libjava/classpath/gnu/CORBA/NamingService/NameParser.java index 205ad8bec84..5d4b729a569 100644 --- a/libjava/classpath/gnu/CORBA/NamingService/NameParser.java +++ b/libjava/classpath/gnu/CORBA/NamingService/NameParser.java @@ -44,6 +44,8 @@ import gnu.CORBA.IOR; import gnu.CORBA.Unexpected; import gnu.CORBA.Version; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.BAD_PARAM; import org.omg.CORBA.DATA_CONVERSION; import org.omg.CORBA.ORB; @@ -301,7 +303,7 @@ public class NameParser ior.Internet.version = new Version(major, minor); // Then host data goes till '/' or ':'. - StringBuffer bhost = new StringBuffer(corbaloc.length()); + CPStringBuilder bhost = new CPStringBuilder(corbaloc.length()); while (!t[p].equals(":") && !t[p].equals("/") && !t[p].equals(",")) bhost.append(t[p++]); @@ -394,7 +396,7 @@ public class NameParser { InputStreamReader r = new InputStreamReader(u.openStream()); - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); int c; while ((c = r.read()) > 0) @@ -465,7 +467,7 @@ public class NameParser + "' found"); } - StringBuffer bKey = new StringBuffer(); + CPStringBuilder bKey = new CPStringBuilder(); p++; while (p < t.length && !t[p].equals("#")) diff --git a/libjava/classpath/gnu/CORBA/NamingService/NameTransformer.java b/libjava/classpath/gnu/CORBA/NamingService/NameTransformer.java index 7109fdb93e1..132c5dd8f04 100644 --- a/libjava/classpath/gnu/CORBA/NamingService/NameTransformer.java +++ b/libjava/classpath/gnu/CORBA/NamingService/NameTransformer.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.CORBA.NamingService; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.IntHolder; import org.omg.CosNaming.NameComponent; import org.omg.CosNaming.NamingContextPackage.InvalidName; @@ -125,7 +127,7 @@ public class NameTransformer { NameValidator.check(a_name); - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); NameComponent n; @@ -152,7 +154,7 @@ public class NameTransformer * @param b a buffer to append the contents to. * @param s a string to append. */ - private void appEscaping(StringBuffer b, String s) + private void appEscaping(CPStringBuilder b, String s) { char c; for (int i = 0; i < s.length(); i++) @@ -271,7 +273,7 @@ public class NameTransformer */ private String readPart(IntHolder p, String[] t) { - StringBuffer part = new StringBuffer(); + CPStringBuilder part = new CPStringBuilder(); while (t [ p.value ] != null && !t [ p.value ].equals(".") && !t [ p.value ].equals("/") diff --git a/libjava/classpath/gnu/CORBA/OrbFunctional.java b/libjava/classpath/gnu/CORBA/OrbFunctional.java index 8fddc66270c..25344cb2ec0 100644 --- a/libjava/classpath/gnu/CORBA/OrbFunctional.java +++ b/libjava/classpath/gnu/CORBA/OrbFunctional.java @@ -1194,7 +1194,7 @@ public class OrbFunctional extends OrbRestricted */ protected void set_parameters(String[] para, Properties props) { - if (para.length > 1) + if ((para != null) && para.length > 1) { for (int i = 0; i < para.length - 1; i++) { diff --git a/libjava/classpath/gnu/CORBA/Poa/gnuPOA.java b/libjava/classpath/gnu/CORBA/Poa/gnuPOA.java index 82e520904f1..32fc5bfd221 100644 --- a/libjava/classpath/gnu/CORBA/Poa/gnuPOA.java +++ b/libjava/classpath/gnu/CORBA/Poa/gnuPOA.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.CORBA.Poa; +import gnu.java.lang.CPStringBuilder; + import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; @@ -1604,7 +1606,7 @@ public class gnuPOA */ public String toString() { - StringBuffer b = new StringBuffer(name); + CPStringBuilder b = new CPStringBuilder(name); if (children.size() != 0) { diff --git a/libjava/classpath/gnu/CORBA/Poa/gnuServantObject.java b/libjava/classpath/gnu/CORBA/Poa/gnuServantObject.java index 115f4f850fb..7e9b4f2f599 100644 --- a/libjava/classpath/gnu/CORBA/Poa/gnuServantObject.java +++ b/libjava/classpath/gnu/CORBA/Poa/gnuServantObject.java @@ -51,6 +51,8 @@ import gnu.CORBA.Unexpected; import gnu.CORBA.ResponseHandlerImpl; import gnu.CORBA.StreamHolder; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.Any; import org.omg.CORBA.BAD_OPERATION; import org.omg.CORBA.BAD_PARAM; @@ -357,7 +359,7 @@ public class gnuServantObject extends ObjectImpl */ public String toString() { - StringBuffer b = new StringBuffer("Servant object ("); + CPStringBuilder b = new CPStringBuilder("Servant object ("); for (int i = 0; i < Id.length; i++) { b.append(Integer.toHexString(Id [ i ] & 0xFF)); @@ -820,4 +822,4 @@ public class gnuServantObject extends ObjectImpl } return super._is_equivalent(other); } -} \ No newline at end of file +} diff --git a/libjava/classpath/gnu/classpath/Configuration.java.in b/libjava/classpath/gnu/classpath/Configuration.java.in index 7fb86409330..4a9b65f5666 100644 --- a/libjava/classpath/gnu/classpath/Configuration.java.in +++ b/libjava/classpath/gnu/classpath/Configuration.java.in @@ -101,4 +101,14 @@ public interface Configuration * com.sun.tools.javac implementation in tools.zip. */ String ECJ_JAR = "@ECJ_JAR@"; + + /** + * Set to true if the config script found that (a) an + * implementation of java.math.BigInteger, based on the GNU MP library, is + * desired in preference to a pure Java one, and (b) the GNU MP library was + * found on the platform where the JVM is to run. Otherwise, this field is + * set to false. + */ + boolean WANT_NATIVE_BIG_INTEGER = @WANT_NATIVE_BIG_INTEGER@; + } diff --git a/libjava/classpath/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java b/libjava/classpath/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java index e2703908ba2..b6e0cfeb8b3 100644 --- a/libjava/classpath/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java +++ b/libjava/classpath/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java @@ -264,7 +264,7 @@ public class VirtualMachineCommandSet ThreadGroup root = getRootThreadGroup(jdwpGroup); os.writeInt(1); // Just one top level group allowed? - idMan.getObjectId(root); + idMan.getObjectId(root).write(os); } private void executeDispose(ByteBuffer bb, DataOutputStream os) diff --git a/libjava/classpath/gnu/classpath/jdwp/util/Signature.java b/libjava/classpath/gnu/classpath/jdwp/util/Signature.java index 36445c31841..e7453bf0174 100644 --- a/libjava/classpath/gnu/classpath/jdwp/util/Signature.java +++ b/libjava/classpath/gnu/classpath/jdwp/util/Signature.java @@ -39,6 +39,8 @@ exception statement from your version. */ package gnu.classpath.jdwp.util; +import gnu.java.lang.CPStringBuilder; + import java.lang.reflect.Field; import java.lang.reflect.Method; @@ -59,7 +61,7 @@ public class Signature */ public static String computeClassSignature (Class theClass) { - StringBuffer sb = new StringBuffer (); + CPStringBuilder sb = new CPStringBuilder (); _addToSignature (sb, theClass); return sb.toString (); } @@ -93,7 +95,7 @@ public class Signature private static String _computeSignature (Class returnType, Class[] paramTypes) { - StringBuffer sb = new StringBuffer ("("); + CPStringBuilder sb = new CPStringBuilder ("("); if (paramTypes != null) { for (int i = 0; i < paramTypes.length; ++i) @@ -104,7 +106,7 @@ public class Signature return sb.toString(); } - private static void _addToSignature (StringBuffer sb, Class k) + private static void _addToSignature (CPStringBuilder sb, Class k) { // For some reason there's no easy way to get the signature of a // class. diff --git a/libjava/classpath/gnu/java/awt/font/OpenTypeFontPeer.java b/libjava/classpath/gnu/java/awt/font/OpenTypeFontPeer.java index 2d898a44801..e8124528e6a 100644 --- a/libjava/classpath/gnu/java/awt/font/OpenTypeFontPeer.java +++ b/libjava/classpath/gnu/java/awt/font/OpenTypeFontPeer.java @@ -37,6 +37,10 @@ exception statement from your version. */ package gnu.java.awt.font; + +import gnu.java.awt.peer.ClasspathFontPeer; +import gnu.java.lang.CPStringBuilder; + import java.awt.Font; import java.awt.FontMetrics; import java.awt.font.FontRenderContext; @@ -61,8 +65,6 @@ import java.util.Map; import java.util.Properties; import java.util.Set; -import gnu.java.awt.peer.ClasspathFontPeer; - public class OpenTypeFontPeer extends ClasspathFontPeer { @@ -422,7 +424,7 @@ public class OpenTypeFontPeer */ static String encodeFont(String name, int style) { - StringBuilder key = new StringBuilder(); + CPStringBuilder key = new CPStringBuilder(); key.append(validName(name)); key.append('/'); switch (style) diff --git a/libjava/classpath/gnu/java/awt/font/autofit/Edge.java b/libjava/classpath/gnu/java/awt/font/autofit/Edge.java index d9736650b5f..6420fa1cb14 100644 --- a/libjava/classpath/gnu/java/awt/font/autofit/Edge.java +++ b/libjava/classpath/gnu/java/awt/font/autofit/Edge.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.awt.font.autofit; +import gnu.java.lang.CPStringBuilder; + class Edge { int fpos; @@ -54,7 +56,7 @@ class Edge public String toString() { - StringBuilder s = new StringBuilder(); + CPStringBuilder s = new CPStringBuilder(); s.append("[Edge] id"); s.append(hashCode()); s.append(", fpos: "); diff --git a/libjava/classpath/gnu/java/awt/font/autofit/LatinBlue.java b/libjava/classpath/gnu/java/awt/font/autofit/LatinBlue.java index 694fb24fe07..2cf68b75c5a 100644 --- a/libjava/classpath/gnu/java/awt/font/autofit/LatinBlue.java +++ b/libjava/classpath/gnu/java/awt/font/autofit/LatinBlue.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.awt.font.autofit; +import gnu.java.lang.CPStringBuilder; + public class LatinBlue { static final int FLAG_BLUE_ACTIVE = 1 << 0; @@ -48,7 +50,7 @@ public class LatinBlue int flags; public String toString() { - StringBuilder s = new StringBuilder(); + CPStringBuilder s = new CPStringBuilder(); s.append("[BlueZone]"); s.append(" ref: "); s.append(ref.org); diff --git a/libjava/classpath/gnu/java/awt/font/autofit/Segment.java b/libjava/classpath/gnu/java/awt/font/autofit/Segment.java index 640e82ce2e9..9f9da679255 100644 --- a/libjava/classpath/gnu/java/awt/font/autofit/Segment.java +++ b/libjava/classpath/gnu/java/awt/font/autofit/Segment.java @@ -40,6 +40,8 @@ package gnu.java.awt.font.autofit; import gnu.java.awt.font.opentype.truetype.Point; +import gnu.java.lang.CPStringBuilder; + class Segment { @@ -65,7 +67,7 @@ class Segment public String toString() { - StringBuilder s = new StringBuilder(); + CPStringBuilder s = new CPStringBuilder(); s.append("[Segment] id: "); s.append(hashCode()); s.append(", len:"); diff --git a/libjava/classpath/gnu/java/awt/font/autofit/Width.java b/libjava/classpath/gnu/java/awt/font/autofit/Width.java index c890cf3de3d..079f7b396c8 100644 --- a/libjava/classpath/gnu/java/awt/font/autofit/Width.java +++ b/libjava/classpath/gnu/java/awt/font/autofit/Width.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.awt.font.autofit; +import gnu.java.lang.CPStringBuilder; + public class Width { int org; @@ -50,7 +52,7 @@ public class Width public String toString() { - StringBuilder s = new StringBuilder(); + CPStringBuilder s = new CPStringBuilder(); s.append("[Width] org: "); s.append(org); s.append(", cur: "); diff --git a/libjava/classpath/gnu/java/awt/font/opentype/GlyphNamer.java b/libjava/classpath/gnu/java/awt/font/opentype/GlyphNamer.java index ea4b8e2a1fb..c2b009de3e6 100644 --- a/libjava/classpath/gnu/java/awt/font/opentype/GlyphNamer.java +++ b/libjava/classpath/gnu/java/awt/font/opentype/GlyphNamer.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.java.awt.font.opentype; +import gnu.java.lang.CPStringBuilder; + import java.nio.ByteBuffer; import java.nio.IntBuffer; import java.nio.CharBuffer; @@ -1077,7 +1079,7 @@ final class GlyphNamer return name; } - StringBuffer buf = new StringBuffer(numChars * 8); + CPStringBuilder buf = new CPStringBuilder(numChars * 8); for (int i = 0; i < numChars; i++) { if (i > 0) diff --git a/libjava/classpath/gnu/java/awt/font/opentype/truetype/Fixed.java b/libjava/classpath/gnu/java/awt/font/opentype/truetype/Fixed.java index 287593e439c..87dfebd412b 100644 --- a/libjava/classpath/gnu/java/awt/font/opentype/truetype/Fixed.java +++ b/libjava/classpath/gnu/java/awt/font/opentype/truetype/Fixed.java @@ -38,6 +38,7 @@ exception statement from your version. */ package gnu.java.awt.font.opentype.truetype; +import gnu.java.lang.CPStringBuilder; /** * A utility class for fixed-point arithmetics, where numbers are @@ -164,7 +165,7 @@ public final class Fixed public static String toString(int x, int y) { - StringBuffer sbuf = new StringBuffer(40); + CPStringBuilder sbuf = new CPStringBuilder(40); sbuf.append('('); sbuf.append(((float) x) / 64); sbuf.append(", "); diff --git a/libjava/classpath/gnu/java/awt/font/opentype/truetype/Point.java b/libjava/classpath/gnu/java/awt/font/opentype/truetype/Point.java index c9664d2dc07..31c12037c27 100644 --- a/libjava/classpath/gnu/java/awt/font/opentype/truetype/Point.java +++ b/libjava/classpath/gnu/java/awt/font/opentype/truetype/Point.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.awt.font.opentype.truetype; +import gnu.java.lang.CPStringBuilder; + /** * Encapsulates information regarding one point on a glyph outline. */ @@ -234,7 +236,7 @@ public class Point public String toString() { - StringBuilder s = new StringBuilder(); + CPStringBuilder s = new CPStringBuilder(); s.append("[Point] origX: "); s.append(origX); s.append(", origY: "); diff --git a/libjava/classpath/gnu/java/awt/font/opentype/truetype/VirtualMachine.java b/libjava/classpath/gnu/java/awt/font/opentype/truetype/VirtualMachine.java index 7e50b6678bf..c88d4c6491c 100644 --- a/libjava/classpath/gnu/java/awt/font/opentype/truetype/VirtualMachine.java +++ b/libjava/classpath/gnu/java/awt/font/opentype/truetype/VirtualMachine.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.java.awt.font.opentype.truetype; +import gnu.java.lang.CPStringBuilder; + import java.awt.FontFormatException; import java.awt.geom.AffineTransform; import java.nio.ByteBuffer; @@ -514,7 +516,7 @@ class VirtualMachine */ private void dumpInstruction(ByteBuffer inst) { - StringBuffer sbuf = new StringBuffer(40); + CPStringBuilder sbuf = new CPStringBuilder(40); int pc = inst.position(); int bcode = inst.get(pc) & 0xff; int count; diff --git a/libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java b/libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java index 36ba0f4304c..8504659388c 100644 --- a/libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java +++ b/libjava/classpath/gnu/java/awt/java2d/AbstractGraphics2D.java @@ -46,6 +46,7 @@ import java.awt.BasicStroke; import java.awt.Color; import java.awt.Composite; import java.awt.CompositeContext; +import java.awt.Dimension; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; @@ -75,9 +76,12 @@ import java.awt.image.BufferedImage; import java.awt.image.BufferedImageOp; import java.awt.image.ColorModel; import java.awt.image.DataBuffer; +import java.awt.image.FilteredImageSource; import java.awt.image.ImageObserver; +import java.awt.image.ImageProducer; import java.awt.image.Raster; import java.awt.image.RenderedImage; +import java.awt.image.ReplicateScaleFilter; import java.awt.image.SampleModel; import java.awt.image.WritableRaster; import java.awt.image.renderable.RenderableImage; @@ -86,6 +90,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; +import java.util.WeakHashMap; /** * This is a 100% Java implementation of the Java2D rendering pipeline. It is @@ -154,7 +159,14 @@ public abstract class AbstractGraphics2D extends Graphics2D implements Cloneable, Pixelizer { - + /** + * Caches scaled versions of an image. + * + * @see #drawImage(Image, int, int, int, int, ImageObserver) + */ + protected static final WeakHashMap> imageCache = + new WeakHashMap>(); + /** * Wether we use anti aliasing for rendering text by default or not. */ @@ -210,14 +222,20 @@ public abstract class AbstractGraphics2D /** * The paint context during rendering. */ - private PaintContext paintContext; + private PaintContext paintContext = null; /** * The background. */ - private Color background; + private Color background = Color.WHITE; /** + * Foreground color, as set by setColor. + */ + private Color foreground = Color.BLACK; + private boolean isForegroundColorNull = true; + + /** * The current font. */ private Font font; @@ -266,15 +284,19 @@ public abstract class AbstractGraphics2D private static final BasicStroke STANDARD_STROKE = new BasicStroke(); - private static final HashMap STANDARD_HINTS; - static { - HashMap hints = new HashMap(); - hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, - RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT); - hints.put(RenderingHints.KEY_ANTIALIASING, - RenderingHints.VALUE_ANTIALIAS_DEFAULT); - STANDARD_HINTS = hints; - } + private static final HashMap STANDARD_HINTS; + static + { + + HashMap hints = new HashMap(); + hints.put(RenderingHints.KEY_TEXT_ANTIALIASING, + RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT); + hints.put(RenderingHints.KEY_ANTIALIASING, + RenderingHints.VALUE_ANTIALIAS_DEFAULT); + + STANDARD_HINTS = hints; + } + /** * Creates a new AbstractGraphics2D instance. */ @@ -626,14 +648,29 @@ public abstract class AbstractGraphics2D if (p != null) { paint = p; - + if (! (paint instanceof Color)) - isOptimized = false; + { + isOptimized = false; + } else { + this.foreground = (Color) paint; + isForegroundColorNull = false; updateOptimization(); } } + else + { + this.foreground = Color.BLACK; + isForegroundColorNull = true; + } + + // free resources if needed, then put the paint context to null + if (this.paintContext != null) + this.paintContext.dispose(); + + this.paintContext = null; } /** @@ -1058,10 +1095,10 @@ public abstract class AbstractGraphics2D */ public Color getColor() { - Color c = null; - if (paint instanceof Color) - c = (Color) paint; - return c; + if (isForegroundColorNull) + return null; + + return this.foreground; } /** @@ -1070,8 +1107,8 @@ public abstract class AbstractGraphics2D * @param color the foreground to set */ public void setColor(Color color) - { - setPaint(color); + { + this.setPaint(color); } public void setPaintMode() @@ -1468,11 +1505,19 @@ public abstract class AbstractGraphics2D ImageObserver observer) { AffineTransform t = new AffineTransform(); - t.translate(x, y); - double scaleX = (double) width / (double) image.getWidth(observer); - double scaleY = (double) height / (double) image.getHeight(observer); - t.scale(scaleX, scaleY); - return drawImage(image, t, observer); + int imWidth = image.getWidth(observer); + int imHeight = image.getHeight(observer); + if (imWidth == width && imHeight == height) + { + // No need to scale, fall back to non-scaling loops. + return drawImage(image, x, y, observer); + } + else + { + Image scaled = prepareImage(image, width, height); + // Ideally, this should notify the observer about the scaling progress. + return drawImage(scaled, x, y, observer); + } } /** @@ -1639,10 +1684,7 @@ public abstract class AbstractGraphics2D * * @return the bounds of the target */ - protected Rectangle getDeviceBounds() - { - return destinationRaster.getBounds(); - } + protected abstract Rectangle getDeviceBounds(); /** * Draws a line in optimization mode. The implementation should respect the @@ -1763,7 +1805,8 @@ public abstract class AbstractGraphics2D */ public void renderScanline(int y, ScanlineCoverage c) { - PaintContext pCtx = paintContext; + PaintContext pCtx = getPaintContext(); + int x0 = c.getMinX(); int x1 = c.getMaxX(); Raster paintRaster = pCtx.getRaster(x0, y, x1 - x0, 1); @@ -1797,9 +1840,11 @@ public abstract class AbstractGraphics2D CompositeContext cCtx = composite.createContext(paintColorModel, getColorModel(), renderingHints); - WritableRaster targetChild = destinationRaster.createWritableTranslatedChild(-x0,- y); + WritableRaster raster = getDestinationRaster(); + WritableRaster targetChild = raster.createWritableTranslatedChild(-x0, -y); + cCtx.compose(paintRaster, targetChild, targetChild); - updateRaster(destinationRaster, x0, y, x1 - x0, 1); + updateRaster(raster, x0, y, x1 - x0, 1); cCtx.dispose(); } @@ -1986,4 +2031,64 @@ public abstract class AbstractGraphics2D } } + private PaintContext getPaintContext() + { + if (this.paintContext == null) + { + this.paintContext = + this.foreground.createContext(getColorModel(), + getDeviceBounds(), + getClipBounds(), + getTransform(), + getRenderingHints()); + } + + return this.paintContext; + } + + /** + * Scales an image to the specified width and height. This should also + * be used to implement + * {@link Toolkit#prepareImage(Image, int, int, ImageObserver)}. + * This uses {@link Toolkit#createImage(ImageProducer)} to create the actual + * image. + * + * @param image the image to prepare + * @param w the width + * @param h the height + * + * @return the scaled image + */ + public static Image prepareImage(Image image, int w, int h) + { + // Try to find cached scaled image. + HashMap scaledTable = imageCache.get(image); + Dimension size = new Dimension(w, h); + Image scaled = null; + if (scaledTable != null) + { + scaled = scaledTable.get(size); + } + if (scaled == null) + { + // No cached scaled image. Start scaling image now. + ImageProducer source = image.getSource(); + ReplicateScaleFilter scaler = new ReplicateScaleFilter(w, h); + FilteredImageSource filteredSource = + new FilteredImageSource(source, scaler); + // Ideally, this should asynchronously scale the image. + Image scaledImage = + Toolkit.getDefaultToolkit().createImage(filteredSource); + scaled = scaledImage; + // Put scaled image in cache. + if (scaledTable == null) + { + scaledTable = new HashMap(); + imageCache.put(image, scaledTable); + } + scaledTable.put(size, scaledImage); + } + return scaled; + } + } diff --git a/libjava/classpath/gnu/java/awt/java2d/ActiveEdges.java b/libjava/classpath/gnu/java/awt/java2d/ActiveEdges.java index 4d1e777ccf5..efe1966e378 100644 --- a/libjava/classpath/gnu/java/awt/java2d/ActiveEdges.java +++ b/libjava/classpath/gnu/java/awt/java2d/ActiveEdges.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.awt.java2d; +import gnu.java.lang.CPStringBuilder; + /** * A collection of active edges for scanline conversion. */ @@ -183,7 +185,7 @@ final class ActiveEdges public String toString() { - StringBuilder s = new StringBuilder(); + CPStringBuilder s = new CPStringBuilder(); s.append("[ActiveEdges] "); for (int i = 0; i < numActiveEdges; i++) { diff --git a/libjava/classpath/gnu/java/awt/java2d/RasterGraphics.java b/libjava/classpath/gnu/java/awt/java2d/RasterGraphics.java index 98d47b406aa..04eb55eb8d8 100644 --- a/libjava/classpath/gnu/java/awt/java2d/RasterGraphics.java +++ b/libjava/classpath/gnu/java/awt/java2d/RasterGraphics.java @@ -39,6 +39,7 @@ exception statement from your version. */ package gnu.java.awt.java2d; import java.awt.GraphicsConfiguration; +import java.awt.Rectangle; import java.awt.image.ColorModel; import java.awt.image.WritableRaster; @@ -71,6 +72,15 @@ public class RasterGraphics init(); } + @Override + public void renderScanline(int y, ScanlineCoverage c) + { + if (y >= getDeviceBounds().width) + return; + + super.renderScanline(y, c); + } + /** * Returns the color model of this Graphics object. * @@ -100,4 +110,9 @@ public class RasterGraphics return null; } + @Override + protected Rectangle getDeviceBounds() + { + return this.raster.getBounds(); + } } diff --git a/libjava/classpath/gnu/java/awt/java2d/ScanlineConverter.java b/libjava/classpath/gnu/java/awt/java2d/ScanlineConverter.java index cc4bbef28c0..b00a15c16ac 100644 --- a/libjava/classpath/gnu/java/awt/java2d/ScanlineConverter.java +++ b/libjava/classpath/gnu/java/awt/java2d/ScanlineConverter.java @@ -206,6 +206,7 @@ public final class ScanlineConverter // Ok, now we can perform the actual scanlining. int realY = Fixed.intValue(FIXED_DIGITS, y + resolution); boolean push = lastRealY != realY; + doScanline(p, y, push, haveClip); // Remove obsolete active edges. diff --git a/libjava/classpath/gnu/java/awt/peer/GnomeDesktopPeer.java b/libjava/classpath/gnu/java/awt/peer/GnomeDesktopPeer.java index be216318140..cc41f749dc0 100644 --- a/libjava/classpath/gnu/java/awt/peer/GnomeDesktopPeer.java +++ b/libjava/classpath/gnu/java/awt/peer/GnomeDesktopPeer.java @@ -37,6 +37,8 @@ package gnu.java.awt.peer; +import gnu.java.lang.CPStringBuilder; + import java.io.IOException; import java.io.InputStream; import java.net.URI; @@ -124,7 +126,7 @@ public class GnomeDesktopPeer protected String execQuery(String command) throws IOException { InputStream in = null; - StringBuilder output = new StringBuilder(); + CPStringBuilder output = new CPStringBuilder(); try { diff --git a/libjava/classpath/gnu/java/awt/peer/KDEDesktopPeer.java b/libjava/classpath/gnu/java/awt/peer/KDEDesktopPeer.java index 30dd89ba7b2..8bc3e65b24e 100644 --- a/libjava/classpath/gnu/java/awt/peer/KDEDesktopPeer.java +++ b/libjava/classpath/gnu/java/awt/peer/KDEDesktopPeer.java @@ -37,6 +37,8 @@ package gnu.java.awt.peer; +import gnu.java.lang.CPStringBuilder; + import java.io.IOException; import java.io.InputStream; @@ -104,7 +106,7 @@ public class KDEDesktopPeer protected String execQuery(String command) throws IOException { InputStream in = null; - StringBuilder output = new StringBuilder(); + CPStringBuilder output = new CPStringBuilder(); try { diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java b/libjava/classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java index 28fb84119e4..826cfbecead 100644 --- a/libjava/classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java +++ b/libjava/classpath/gnu/java/awt/peer/gtk/GdkFontPeer.java @@ -45,6 +45,8 @@ import gnu.java.awt.ClasspathToolkit; import gnu.java.awt.peer.ClasspathFontPeer; import gnu.java.awt.font.opentype.NameDecoder; +import gnu.java.lang.CPStringBuilder; + import java.awt.Font; import java.awt.FontMetrics; import java.awt.Toolkit; @@ -211,7 +213,7 @@ public class GdkFontPeer extends ClasspathFontPeer private String buildString(CharacterIterator iter) { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) sb.append(c); return sb.toString(); @@ -219,7 +221,7 @@ public class GdkFontPeer extends ClasspathFontPeer private String buildString(CharacterIterator iter, int begin, int limit) { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); int i = 0; for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next(), i++) { diff --git a/libjava/classpath/gnu/java/awt/peer/gtk/GtkClipboard.java b/libjava/classpath/gnu/java/awt/peer/gtk/GtkClipboard.java index e41754641bb..e248b6daf10 100644 --- a/libjava/classpath/gnu/java/awt/peer/gtk/GtkClipboard.java +++ b/libjava/classpath/gnu/java/awt/peer/gtk/GtkClipboard.java @@ -38,10 +38,25 @@ exception statement from your version. */ package gnu.java.awt.peer.gtk; +import gnu.java.lang.CPStringBuilder; + import java.awt.Image; -import java.awt.datatransfer.*; -import java.io.*; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.ClipboardOwner; +import java.awt.datatransfer.DataFlavor; +import java.awt.datatransfer.StringSelection; +import java.awt.datatransfer.Transferable; +import java.awt.datatransfer.UnsupportedFlavorException; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.InputStream; +import java.io.IOException; +import java.io.ObjectOutputStream; +import java.io.Reader; +import java.io.Serializable; +import java.io.UnsupportedEncodingException; import java.util.List; import java.util.Iterator; @@ -247,7 +262,7 @@ public class GtkClipboard extends Clipboard Reader r = plainText.getReaderForText(contents); if (r != null) { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); char[] cs = new char[1024]; int l = r.read(cs); while (l != -1) diff --git a/libjava/classpath/gnu/java/awt/peer/x/GLGraphics.java b/libjava/classpath/gnu/java/awt/peer/x/GLGraphics.java index c80c85c28f0..dde5b919537 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/GLGraphics.java +++ b/libjava/classpath/gnu/java/awt/peer/x/GLGraphics.java @@ -39,7 +39,9 @@ package gnu.java.awt.peer.x; import java.awt.Color; import java.awt.GraphicsConfiguration; +import java.awt.Rectangle; import java.awt.image.ColorModel; +import java.util.Map; import gnu.java.awt.java2d.AbstractGraphics2D; import gnu.x11.extension.glx.GL; @@ -70,7 +72,8 @@ public class GLGraphics extends AbstractGraphics2D public void setBackground(Color b) { super.setBackground(b); - gl.clear_color(b.getRed() / 255.F, b.getGreen() / 255.F, + + gl.clearColor(b.getRed() / 255.F, b.getGreen() / 255.F, b.getBlue() / 255.F, b.getAlpha() / 255.F); } @@ -120,4 +123,12 @@ public class GLGraphics extends AbstractGraphics2D throw new UnsupportedOperationException("Not yet implemented"); } + @Override + protected Rectangle getDeviceBounds() + { + // FIXME: not sure it's correct + return new Rectangle(0, 0, + gl.display.default_screen.width, + gl.display.default_screen.height); + } } diff --git a/libjava/classpath/gnu/java/awt/peer/x/XEventPump.java b/libjava/classpath/gnu/java/awt/peer/x/XEventPump.java index 7f984353316..379839196b2 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/XEventPump.java +++ b/libjava/classpath/gnu/java/awt/peer/x/XEventPump.java @@ -38,6 +38,9 @@ exception statement from your version. */ package gnu.java.awt.peer.x; +import java.awt.AWTEvent; +import java.awt.Component; +import java.awt.Container; import java.awt.Graphics; import java.awt.Insets; import java.awt.Rectangle; @@ -47,18 +50,26 @@ import java.awt.event.ComponentEvent; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.PaintEvent; +import java.awt.event.WindowEvent; import java.util.HashMap; +import gnu.java.awt.ComponentReshapeEvent; +import gnu.x11.Atom; import gnu.x11.Display; import gnu.x11.event.ButtonPress; import gnu.x11.event.ButtonRelease; +import gnu.x11.event.ClientMessage; import gnu.x11.event.ConfigureNotify; +import gnu.x11.event.DestroyNotify; import gnu.x11.event.Event; import gnu.x11.event.Expose; import gnu.x11.event.Input; import gnu.x11.event.KeyPress; import gnu.x11.event.KeyRelease; import gnu.x11.event.MotionNotify; +import gnu.x11.event.PropertyNotify; +import gnu.x11.event.ResizeRequest; +import gnu.x11.event.UnmapNotify; /** * Fetches events from X, translates them to AWT events and pumps them up @@ -148,122 +159,217 @@ public class XEventPump windows.remove(new Integer(xWindow.id)); } - private void handleEvent(Event xEvent) + private void handleButtonPress(ButtonPress event) + { + Integer key = new Integer(event.getEventWindowID()); + Window awtWindow = (Window) windows.get(key); + + // Create and post the mouse event. + int button = event.detail(); + + // AWT cannot handle more than 3 buttons and expects 0 instead. + if (button >= gnu.x11.Input.BUTTON3) + button = 0; + drag = button; + + Component target = + findMouseEventTarget(awtWindow, event.getEventX(), event.getEventY()); + if(target == null) + { + target = awtWindow; + } + + MouseEvent mp = new MouseEvent(target, MouseEvent.MOUSE_PRESSED, + System.currentTimeMillis(), + KeyboardMapping.mapModifiers(event.getState()) + | buttonToModifier(button), + event.getEventX(), event.getEventY(), + 1, false, button); + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(mp); + } + + private void handleButtonRelease(ButtonRelease event) { + Integer key = new Integer(event.getEventWindowID()); + Window awtWindow = (Window) windows.get(key); - Integer key = null; - Window awtWindow = null; + int button = event.detail(); + + // AWT cannot handle more than 3 buttons and expects 0 instead. + if (button >= gnu.x11.Input.BUTTON3) + button = 0; + drag = -1; + + Component target = + findMouseEventTarget(awtWindow, event.getEventX(), event.getEventY()); + if(target == null) + { + target = awtWindow; + } + + MouseEvent mr = new MouseEvent(target, MouseEvent.MOUSE_RELEASED, + System.currentTimeMillis(), + KeyboardMapping.mapModifiers(event.getState()) + | buttonToModifier(button), + event.getEventX(), event.getEventY(), + 1, false, button); + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(mr); + } + + + private void handleMotionNotify(MotionNotify event) + { + Integer key = new Integer(event.getEventWindowID()); + Window awtWindow = (Window) windows.get(key); + + int button = event.detail(); + + // AWT cannot handle more than 3 buttons and expects 0 instead. + if (button >= gnu.x11.Input.BUTTON3) + button = 0; + + MouseEvent mm = null; + if (drag == -1) + { + mm = new MouseEvent(awtWindow, MouseEvent.MOUSE_MOVED, + System.currentTimeMillis(), + KeyboardMapping.mapModifiers(event.getState()) + | buttonToModifier(button), + event.getEventX(), event.getEventY(), + 1, false); + } + else + { + mm = new MouseEvent(awtWindow, MouseEvent.MOUSE_DRAGGED, + System.currentTimeMillis(), + KeyboardMapping.mapModifiers(event.getState()) + | buttonToModifier(drag), + event.getEventX(), event.getEventY(), + 1, false); + } + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(mm); + } + + // FIME: refactor and make faster, maybe caching the event and handle + // and/or check timing (timing is generated for PropertyChange)? + private void handleExpose(Expose event) + { + Integer key = new Integer(event.window_id); + Window awtWindow = (Window) windows.get(key); + + if (XToolkit.DEBUG) + System.err.println("expose request for window id: " + key); + + Rectangle r = new Rectangle(event.x(), event.y(), event.width(), + event.height()); + // We need to clear the background of the exposed rectangle. + assert awtWindow != null : "awtWindow == null for window ID: " + key; + + Graphics g = awtWindow.getGraphics(); + g.clearRect(r.x, r.y, r.width, r.height); + g.dispose(); + + XWindowPeer xwindow = (XWindowPeer) awtWindow.getPeer(); + Insets i = xwindow.insets(); + if (event.width() != awtWindow.getWidth() - i.left - i.right + || event.height() != awtWindow.getHeight() - i.top - i.bottom) + { + int w = event.width(); + int h = event.height(); + int x = xwindow.xwindow.x; + int y = xwindow.xwindow.y; + + if (XToolkit.DEBUG) + System.err.println("Setting size on AWT window: " + w + + ", " + h + ", " + awtWindow.getWidth() + + ", " + awtWindow.getHeight()); + + // new width and height + xwindow.xwindow.width = w; + xwindow.xwindow.height = h; + + // reshape the window + ComponentReshapeEvent cre = + new ComponentReshapeEvent(awtWindow, x, y, w, h); + awtWindow.dispatchEvent(cre); + } + + ComponentEvent ce = + new ComponentEvent(awtWindow, ComponentEvent.COMPONENT_RESIZED); + awtWindow.dispatchEvent(ce); + + PaintEvent pev = new PaintEvent(awtWindow, PaintEvent.UPDATE, r); + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(pev); + } + + private void handleDestroyNotify(DestroyNotify destroyNotify) + { + if (XToolkit.DEBUG) + System.err.println("DestroyNotify event: " + destroyNotify); + + Integer key = new Integer(destroyNotify.event_window_id); + Window awtWindow = (Window) windows.get(key); + + AWTEvent event = new WindowEvent(awtWindow, WindowEvent.WINDOW_CLOSED); + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event); + } + + private void handleClientMessage(ClientMessage clientMessage) + { + if (XToolkit.DEBUG) + System.err.println("ClientMessage event: " + clientMessage); + + if (clientMessage.delete_window()) + { + if (XToolkit.DEBUG) + System.err.println("ClientMessage is a delete_window event"); + + Integer key = new Integer(clientMessage.window_id); + Window awtWindow = (Window) windows.get(key); + + AWTEvent event = new WindowEvent(awtWindow, WindowEvent.WINDOW_CLOSING); + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event); + } + } + + private void handleEvent(Event xEvent) + { if (XToolkit.DEBUG) System.err.println("fetched event: " + xEvent); - switch (xEvent.code()) + + switch (xEvent.code() & 0x7f) { case ButtonPress.CODE: - ButtonPress bp = (ButtonPress) xEvent; - key= new Integer(bp.event_window_id); - awtWindow = (Window) windows.get(key); - // Create and post the mouse event. - int button = bp.detail(); - - // AWT cannot handle more than 3 buttons and expects 0 instead. - if (button >= gnu.x11.Input.BUTTON3) - button = 0; - drag = button; - - MouseEvent mp = new MouseEvent(awtWindow, MouseEvent.MOUSE_PRESSED, - System.currentTimeMillis(), - KeyboardMapping.mapModifiers(bp.state()) | buttonToModifier(button), - bp.event_x(), bp.event_y(), - 1, false, button); - Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(mp); + this.handleButtonPress((ButtonPress) xEvent); break; case ButtonRelease.CODE: - ButtonRelease br = (ButtonRelease) xEvent; - key= new Integer(br.event_window_id); - awtWindow = (Window) windows.get(key); - - button = br.detail(); - // AWT cannot handle more than 3 buttons and expects 0 instead. - if (button >= gnu.x11.Input.BUTTON3) - button = 0; - drag = -1; - MouseEvent mr = new MouseEvent(awtWindow, MouseEvent.MOUSE_RELEASED, - System.currentTimeMillis(), - KeyboardMapping.mapModifiers(br.state()) | buttonToModifier(button), - br.event_x(), br.event_y(), - 1, false, button); - Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(mr); + this.handleButtonRelease((ButtonRelease) xEvent); break; case MotionNotify.CODE: - MotionNotify mn = (MotionNotify) xEvent; - key= new Integer(mn.event_window_id); - awtWindow = (Window) windows.get(key); - - MouseEvent mm; - if (drag == -1) - { - mm = new MouseEvent(awtWindow, MouseEvent.MOUSE_MOVED, - System.currentTimeMillis(), 0, - mn.event_x(), mn.event_y(), - 1, false); - } - else - { - mm = new MouseEvent(awtWindow, MouseEvent.MOUSE_DRAGGED, - System.currentTimeMillis(), 0, - mn.event_x(), mn.event_y(), - 1, false); - } - Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(mm); - break; - case ConfigureNotify.CODE: - key= new Integer(((ConfigureNotify) xEvent).event_window_id); - awtWindow = (Window) windows.get(key); - ConfigureNotify c = (ConfigureNotify) xEvent; - if (XToolkit.DEBUG) - System.err.println("resize request for window id: " + key); - - // Detect and report size changes. - XWindowPeer xwindow = (XWindowPeer) awtWindow.getPeer(); - Insets i = xwindow.insets(); - if (c.width() != awtWindow.getWidth() - i.left - i.right - || c.height() != awtWindow.getHeight() - i.top - i.bottom) - { - if (XToolkit.DEBUG) - System.err.println("Setting size on AWT window: " + c.width() - + ", " + c.height() + ", " + awtWindow.getWidth() - + ", " + awtWindow.getHeight()); - xwindow.callback = true; - xwindow.xwindow.width = c.width(); - xwindow.xwindow.height = c.height(); - awtWindow.setSize(c.width() + i.left + i.right, - c.height() + i.top + i.bottom); - xwindow.callback = false; - } + this.handleMotionNotify((MotionNotify) xEvent); break; case Expose.CODE: - key= new Integer(((Expose) xEvent).window_id); - awtWindow = (Window) windows.get(key); - Expose exp = (Expose) xEvent; - if (XToolkit.DEBUG) - System.err.println("expose request for window id: " + key); - Rectangle r = new Rectangle(exp.x(), exp.y(), exp.width(), - exp.height()); - //System.err.println("expose paint: " + r); - // We need to clear the background of the exposed rectangle. - assert awtWindow != null : "awtWindow == null for window ID: " + key; - Graphics g = awtWindow.getGraphics(); - g.clearRect(r.x, r.y, r.width, r.height); - g.dispose(); - PaintEvent pev = new PaintEvent(awtWindow, PaintEvent.PAINT, r); - Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(pev); + this.handleExpose((Expose) xEvent); break; case KeyPress.CODE: case KeyRelease.CODE: - key = new Integer(((Input) xEvent).event_window_id); - awtWindow = (Window) windows.get(key); + Integer key = new Integer(((Input) xEvent).getEventWindowID()); + Window awtWindow = (Window) windows.get(key); handleKeyEvent(xEvent, awtWindow); break; + case DestroyNotify.CODE: + this.handleDestroyNotify((DestroyNotify) xEvent); + break; + case ClientMessage.CODE: + this.handleClientMessage((ClientMessage) xEvent); + break; + case PropertyNotify.CODE: + key = new Integer (((PropertyNotify) xEvent).getWindowID()); + awtWindow = (Window) windows.get(key); + AWTEvent event = new WindowEvent(awtWindow, WindowEvent.WINDOW_STATE_CHANGED); + Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(event); + break; default: if (XToolkit.DEBUG) System.err.println("Unhandled X event: " + xEvent); @@ -280,7 +386,7 @@ public class XEventPump { Input keyEvent = (Input) xEvent; int xKeyCode = keyEvent.detail(); - int xMods = keyEvent.state(); + int xMods = keyEvent.getState(); int keyCode = KeyboardMapping.mapToKeyCode(xEvent.display.input, xKeyCode, xMods); char keyChar = KeyboardMapping.mapToKeyChar(xEvent.display.input, xKeyCode, @@ -334,5 +440,47 @@ public class XEventPump return 0; } + + /** + * Finds the heavyweight mouse event target. + * + * @param src the original source of the event + * + * @param pt the event coordinates + * + * @return the real mouse event target + */ + private Component findMouseEventTarget(Component src, int x, int y) + { + Component found = null; + if (src instanceof Container) + { + Container cont = (Container) src; + int numChildren = cont.getComponentCount(); + for (int i = 0; i < numChildren && found == null; i++) + { + Component child = cont.getComponent(i); + if (child != null && child.isVisible() + && child.contains(x - child.getX(), y - child.getY())) + { + if (child instanceof Container) + { + Component deeper = findMouseEventTarget(child, + x - child.getX(), + y - child.getY()); + if (deeper != null) + found = deeper; + } + else if (! child.isLightweight()) + found = child; + } + } + } + + // Consider the source itself. + if (found == null && src.contains(x, y) && ! src.isLightweight()) + found = src; + return found; + } } diff --git a/libjava/classpath/gnu/java/awt/peer/x/XFontPeer.java b/libjava/classpath/gnu/java/awt/peer/x/XFontPeer.java index 0a96a613b4e..4372c965ffe 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/XFontPeer.java +++ b/libjava/classpath/gnu/java/awt/peer/x/XFontPeer.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.awt.peer.x; +import gnu.java.lang.CPStringBuilder; + import java.awt.AWTError; import java.awt.Font; import java.awt.FontMetrics; @@ -675,7 +677,7 @@ public class XFontPeer */ static String encodeFont(String name, int style, int size) { - StringBuilder key = new StringBuilder(); + CPStringBuilder key = new CPStringBuilder(); key.append(validName(name)); key.append('.'); switch (style) diff --git a/libjava/classpath/gnu/java/awt/peer/x/XFramePeer.java b/libjava/classpath/gnu/java/awt/peer/x/XFramePeer.java index 7424dc671ed..a355c68b383 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/XFramePeer.java +++ b/libjava/classpath/gnu/java/awt/peer/x/XFramePeer.java @@ -93,8 +93,7 @@ public class XFramePeer public int getState() { - // TODO: Implement this. - throw new UnsupportedOperationException("Not yet implemented."); + return 0; } public void setState(int state) diff --git a/libjava/classpath/gnu/java/awt/peer/x/XGraphics2D.java b/libjava/classpath/gnu/java/awt/peer/x/XGraphics2D.java index 95129666a05..0339a424dac 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/XGraphics2D.java +++ b/libjava/classpath/gnu/java/awt/peer/x/XGraphics2D.java @@ -313,7 +313,7 @@ public class XGraphics2D { // TODO: Optimize for different standard bit-depths. Color c = (Color) p; - XToolkit tk = (XToolkit) Toolkit.getDefaultToolkit(); + /* XToolkit tk = (XToolkit) Toolkit.getDefaultToolkit(); HashMap colorMap = tk.colorMap; gnu.x11.Color col = (gnu.x11.Color) colorMap.get(c); if (col == null) @@ -323,8 +323,10 @@ public class XGraphics2D c.getGreen() * 256, c.getBlue() * 256); colorMap.put(c, col); - } - xgc.set_foreground(col); + }*/ + //xgc.set_foreground(col); + + xgc.set_foreground(c.getRGB()); foreground = c; } } @@ -392,9 +394,23 @@ public class XGraphics2D xdrawable.put_image(xgc, zpixmap, x, y); imageCache.put(image, zpixmap); } else { - ZPixmap zpixmap = (ZPixmap) xdrawable.image(x, y, w, h, - 0xffffffff, - gnu.x11.image.Image.Format.ZPIXMAP); + + // TODO optimize reusing the rectangles + Rectangle source = + new Rectangle(0, 0, xdrawable.width, xdrawable.height); + Rectangle target = new Rectangle(x, y, w, h); + + Rectangle destination = source.intersection(target); + + x = destination.x; + y = destination.y; + w = destination.width; + h = destination.height; + + ZPixmap zpixmap = + (ZPixmap) xdrawable.image(x, y, w, h, + 0xffffffff, + gnu.x11.image.Image.Format.ZPIXMAP); for (int yy = 0; yy < h; yy++) { for (int xx = 0; xx < w; xx++) diff --git a/libjava/classpath/gnu/java/awt/peer/x/XGraphicsConfiguration.java b/libjava/classpath/gnu/java/awt/peer/x/XGraphicsConfiguration.java index 85f72a4eff4..becb92a7d72 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/XGraphicsConfiguration.java +++ b/libjava/classpath/gnu/java/awt/peer/x/XGraphicsConfiguration.java @@ -146,8 +146,7 @@ public class XGraphicsConfiguration public AffineTransform getDefaultTransform() { - // TODO: Implement this. - throw new UnsupportedOperationException("Not yet implemented."); + return new AffineTransform(); } public AffineTransform getNormalizingTransform() @@ -158,8 +157,10 @@ public class XGraphicsConfiguration public Rectangle getBounds() { - // TODO: Implement this. - throw new UnsupportedOperationException("Not yet implemented."); + Display d = device.getDisplay(); + Screen screen = d.default_screen; + + return new Rectangle(0, 0, screen.width, screen.height); } /** diff --git a/libjava/classpath/gnu/java/awt/peer/x/XGraphicsDevice.java b/libjava/classpath/gnu/java/awt/peer/x/XGraphicsDevice.java index eff5902d22e..ca37f3adbbd 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/XGraphicsDevice.java +++ b/libjava/classpath/gnu/java/awt/peer/x/XGraphicsDevice.java @@ -39,6 +39,7 @@ package gnu.java.awt.peer.x; import gnu.classpath.SystemProperties; import gnu.x11.Display; +import gnu.x11.EscherServerConnectionException; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; @@ -127,9 +128,16 @@ public class XGraphicsDevice Socket socket = createLocalSocket(); if (socket != null) { - display = new Display(socket, "localhost", - displayName.display_no, - displayName.screen_no); + try + { + display = new Display(socket, "localhost", + displayName.display_no, + displayName.screen_no); + } + catch (EscherServerConnectionException e) + { + throw new RuntimeException(e.getCause()); + } } } @@ -137,8 +145,17 @@ public class XGraphicsDevice // when the connection is probably remote or when we couldn't load // the LocalSocket class stuff. if (display == null) - display = new Display(displayName); - + { + try + { + display = new Display(displayName); + } + catch (EscherServerConnectionException e) + { + throw new RuntimeException(e.getCause()); + } + } + eventPump = new XEventPump(display); } return display; diff --git a/libjava/classpath/gnu/java/awt/peer/x/XImage.java b/libjava/classpath/gnu/java/awt/peer/x/XImage.java index 7d4636b95da..fa94d00c131 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/XImage.java +++ b/libjava/classpath/gnu/java/awt/peer/x/XImage.java @@ -39,13 +39,19 @@ exception statement from your version. */ package gnu.java.awt.peer.x; import gnu.x11.Pixmap; +import gnu.x11.image.ZPixmap; import java.awt.Graphics; import java.awt.GraphicsEnvironment; import java.awt.Image; + +import java.awt.image.ColorModel; +import java.awt.image.ImageConsumer; import java.awt.image.ImageObserver; import java.awt.image.ImageProducer; + import java.util.Hashtable; +import java.util.Vector; public class XImage extends Image @@ -75,8 +81,7 @@ public class XImage public ImageProducer getSource() { - // TODO: Implement this. - throw new UnsupportedOperationException("Not yet implemented."); + return new XImageProducer(); } /** @@ -108,4 +113,66 @@ public class XImage { pixmap.free(); } + + protected class XImageProducer implements ImageProducer + { + private Vector consumers = new Vector(); + + public void addConsumer(ImageConsumer ic) + { + if (ic != null && !isConsumer(ic)) + this.consumers.add(ic); + } + + public boolean isConsumer(ImageConsumer ic) + { + return this.consumers.contains(ic); + } + + public void removeConsumer(ImageConsumer ic) + { + if (ic != null) + this.consumers.remove(ic); + } + + public void requestTopDownLeftRightResend(ImageConsumer ic) + { + /* just ignore the call */ + } + + public void startProduction(ImageConsumer ic) + { + this.addConsumer(ic); + + for (ImageConsumer consumer : this.consumers) + { + int width = XImage.this.getWidth(null); + int height = XImage.this.getHeight(null); + + XGraphics2D graphics = (XGraphics2D) getGraphics(); + ColorModel model = graphics.getColorModel(); + graphics.dispose(); + + ZPixmap zpixmap = (ZPixmap) + XImage.this.pixmap.image(0, 0, width, height, + 0xffffffff, + gnu.x11.image.Image.Format.ZPIXMAP); + + int size = zpixmap.get_data_length(); + System.out.println("size: " + size + ", w = " + width + ", h = " + height); + + int [] pixel = new int[size]; + for (int i = 0; i < size; i++) + pixel[i] = zpixmap.get_data_element(i); + + consumer.setHints(ImageConsumer.SINGLEPASS); + + consumer.setDimensions(width, height); + consumer.setPixels(0, 0, width, height, model, pixel, 0, width); + consumer.imageComplete(ImageConsumer.STATICIMAGEDONE); + } + + System.out.println("done!"); + } + } } diff --git a/libjava/classpath/gnu/java/awt/peer/x/XToolkit.java b/libjava/classpath/gnu/java/awt/peer/x/XToolkit.java index c1724aad55d..af12574a150 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/XToolkit.java +++ b/libjava/classpath/gnu/java/awt/peer/x/XToolkit.java @@ -54,6 +54,7 @@ import java.awt.Frame; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; +import java.awt.HeadlessException; import java.awt.Image; import java.awt.Label; import java.awt.List; @@ -120,11 +121,16 @@ import gnu.java.awt.ClasspathToolkit; import gnu.java.awt.EmbeddedWindow; import gnu.java.awt.font.OpenTypeFontPeer; import gnu.java.awt.image.ImageConverter; +import gnu.java.awt.java2d.AbstractGraphics2D; import gnu.java.awt.peer.ClasspathFontPeer; import gnu.java.awt.peer.EmbeddedWindowPeer; +import gnu.java.awt.peer.swing.SwingButtonPeer; import gnu.java.awt.peer.swing.SwingCanvasPeer; +import gnu.java.awt.peer.swing.SwingCheckboxPeer; import gnu.java.awt.peer.swing.SwingLabelPeer; import gnu.java.awt.peer.swing.SwingPanelPeer; +import gnu.java.awt.peer.swing.SwingTextAreaPeer; +import gnu.java.awt.peer.swing.SwingTextFieldPeer; public class XToolkit extends ClasspathToolkit @@ -232,18 +238,24 @@ public class XToolkit protected ButtonPeer createButton(Button target) { - // TODO: Implement this. - throw new UnsupportedOperationException("Not yet implemented."); + checkHeadLess("No ButtonPeer can be created in an headless" + + "graphics environment."); + + return new SwingButtonPeer(target); } protected TextFieldPeer createTextField(TextField target) { - // TODO: Implement this. - throw new UnsupportedOperationException("Not yet implemented."); + checkHeadLess("No TextFieldPeer can be created in an headless " + + "graphics environment."); + + return new SwingTextFieldPeer(target); } protected LabelPeer createLabel(Label target) { + checkHeadLess("No LabelPeer can be created in an headless graphics " + + "environment."); return new SwingLabelPeer(target); } @@ -255,8 +267,10 @@ public class XToolkit protected CheckboxPeer createCheckbox(Checkbox target) { - // TODO: Implement this. - throw new UnsupportedOperationException("Not yet implemented."); + checkHeadLess("No CheckboxPeer can be created in an headless graphics " + + "environment."); + + return new SwingCheckboxPeer(target); } protected ScrollbarPeer createScrollbar(Scrollbar target) @@ -273,8 +287,10 @@ public class XToolkit protected TextAreaPeer createTextArea(TextArea target) { - // TODO: Implement this. - throw new UnsupportedOperationException("Not yet implemented."); + checkHeadLess("No TextAreaPeer can be created in an headless graphics " + + "environment."); + + return new SwingTextAreaPeer(target); } protected ChoicePeer createChoice(Choice target) @@ -514,14 +530,14 @@ public class XToolkit public boolean prepareImage(Image image, int width, int height, ImageObserver observer) { - // Images are loaded synchronously, so we don't bother and return true. - return true; + Image scaled = AbstractGraphics2D.prepareImage(image, width, height); + return checkImage(image, width, height, observer) == ImageObserver.ALLBITS; } public int checkImage(Image image, int width, int height, ImageObserver observer) { - // TODO: Implement this. - throw new UnsupportedOperationException("Not yet implemented."); + // Images are loaded synchronously, so we don't bother and return true. + return ImageObserver.ALLBITS; } public Image createImage(ImageProducer producer) @@ -638,4 +654,14 @@ public class XToolkit return false; } + private void checkHeadLess(String message) throws HeadlessException + { + if(GraphicsEnvironment.isHeadless()) + { + if(message == null) + message = "This method cannot be called in headless mode."; + + throw new HeadlessException(message); + } + } } diff --git a/libjava/classpath/gnu/java/awt/peer/x/XWindowPeer.java b/libjava/classpath/gnu/java/awt/peer/x/XWindowPeer.java index f9184ed1cde..930247da5c2 100644 --- a/libjava/classpath/gnu/java/awt/peer/x/XWindowPeer.java +++ b/libjava/classpath/gnu/java/awt/peer/x/XWindowPeer.java @@ -71,21 +71,16 @@ public class XWindowPeer private static int standardSelect = Event.BUTTON_PRESS_MASK | Event.BUTTON_RELEASE_MASK | Event.POINTER_MOTION_MASK - //| Event.RESIZE_REDIRECT_MASK + // | Event.RESIZE_REDIRECT_MASK // | Event.EXPOSURE_MASK - //| Event.PROPERTY_CHANGE_MASK - | Event.STRUCTURE_NOTIFY_MASK + | Event.PROPERTY_CHANGE_MASK + //| Event.STRUCTURE_NOTIFY_MASK + //| Event.SUBSTRUCTURE_NOTIFY_MASK | Event.KEY_PRESS_MASK | Event.KEY_RELEASE_MASK + //| Event.VISIBILITY_CHANGE_MASK // ; - - /** - * Indicates if we are in callback mode, that is when a property (like size) - * is changed in reponse to a request from the X server and doesn't need - * to be propagated back to the X server. - */ - boolean callback = false; - + /** * The X window. */ @@ -110,8 +105,10 @@ public class XWindowPeer int h = Math.max(window.getHeight(), 1); xwindow = new Window(dev.getDisplay().default_root, x, y, w, h, 0, atts); xwindow.select_input(standardSelect); + dev.getEventPump().registerWindow(xwindow, window); - + xwindow.set_wm_delete_window(); + boolean undecorated; if (awtComponent instanceof Frame) { @@ -269,14 +266,9 @@ public class XWindowPeer */ public void reshape(int x, int y, int width, int height) { - // Need to substract insets because AWT size is including insets, - // and X size is excluding insets. - if (! callback) - { - Insets i = insets; - xwindow.move_resize(x - i.left, y - i.right, width - i.left - i.right, - height - i.top - i.bottom); - } + Insets i = insets; + xwindow.move_resize(x - i.left, y - i.right, width - i.left - i.right, + height - i.top - i.bottom); } public Insets insets() @@ -303,4 +295,9 @@ public class XWindowPeer XGraphicsDevice dev = XToolkit.getDefaultDevice(); dev.getEventPump().unregisterWindow(xwindow); } + + public Window getXwindow() + { + return xwindow; + } } diff --git a/libjava/classpath/gnu/java/lang/CPStringBuilder.java b/libjava/classpath/gnu/java/lang/CPStringBuilder.java new file mode 100644 index 00000000000..27e7d2cc7f9 --- /dev/null +++ b/libjava/classpath/gnu/java/lang/CPStringBuilder.java @@ -0,0 +1,1161 @@ +/* ClasspathStringBuffer.java -- Growable strings without locking or copying + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 + Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang; + +import gnu.classpath.SystemProperties; + +import java.io.Serializable; + +/** + * This class is based on java.lang.AbstractStringBuffer but + * without the copying of the string by toString. + * If you modify this, please consider also modifying that code. + * This code is not thread-safe; limit its use to internal use within + * methods. + */ +public final class CPStringBuilder + implements Serializable, CharSequence, Appendable +{ + + /** + * Index of next available character (and thus the size of the current + * string contents). Note that this has permissions set this way so that + * String can get the value. + * + * @serial the number of characters in the buffer + */ + private int count; + + /** + * The buffer. Note that this has permissions set this way so that String + * can get the value. + * + * @serial the buffer + */ + private char[] value; + + /** + * A flag to denote whether the string being created has been + * allocated to a {@link String} object. On construction, + * the character array, {@link #value} is referenced only + * by this class. Once {@link #toString()}, + * {@link #substring(int)} or {@link #substring(int,int)} + * are called, the array is also referenced by a {@link String} + * object and this flag is set. Subsequent modifications to + * this buffer cause a new array to be allocated and the flag + * to be reset. + */ + private boolean allocated = false; + + /** + * The default capacity of a buffer. + * This can be configured using gnu.classpath.cpstringbuilder.capacity + */ + private static final int DEFAULT_CAPACITY; + + static + { + String cap = + SystemProperties.getProperty("gnu.classpath.cpstringbuilder.capacity"); + if (cap == null) + DEFAULT_CAPACITY = 32; + else + DEFAULT_CAPACITY = Integer.parseInt(cap); + } + + /** + * Create a new CPStringBuilder with the default capacity. + */ + public CPStringBuilder() + { + this(DEFAULT_CAPACITY); + } + + /** + * Create an empty CPStringBuilder with the specified initial + * capacity. + * + * @param capacity the initial capacity + * @throws NegativeArraySizeException if capacity is negative + */ + public CPStringBuilder(int capacity) + { + value = new char[capacity]; + } + + /** + * Create a new CPStringBuilder with the characters in the + * specified String. Initial capacity will be the size of the + * String plus the default capacity. + * + * @param str the String to convert + * @throws NullPointerException if str is null + */ + public CPStringBuilder(String str) + { + count = str.length(); + value = new char[count + DEFAULT_CAPACITY]; + str.getChars(0, count, value, 0); + } + + /** + * Create a new CPStringBuilder with the characters in the + * specified StringBuffer. Initial capacity will be the size of the + * String plus the default capacity. + * + * @param str the String to convert + * @throws NullPointerException if str is null + */ + public CPStringBuilder(StringBuffer str) + { + count = str.length(); + value = new char[count + DEFAULT_CAPACITY]; + str.getChars(0, count, value, 0); + } + + /** + * Create a new CPStringBuilder with the characters in the + * specified StringBuilder. Initial capacity will be the size of the + * String plus the default capacity. + * + * @param str the String to convert + * @throws NullPointerException if str is null + */ + public CPStringBuilder(StringBuilder str) + { + count = str.length(); + value = new char[count + DEFAULT_CAPACITY]; + str.getChars(0, count, value, 0); + } + + /** + * Create a new CPStringBuilder with the characters in the + * specified CharSequence. Initial capacity will be the + * length of the sequence plus the default capacity; if the sequence + * reports a length less than or equal to 0, then the initial capacity + * will be the default. + * + * @param seq the initializing CharSequence + * @throws NullPointerException if str is null + * @since 1.5 + */ + public CPStringBuilder(CharSequence seq) + { + int len = seq.length(); + count = len <= 0 ? 0 : len; + value = new char[count + DEFAULT_CAPACITY]; + for (int i = 0; i < len; ++i) + value[i] = seq.charAt(i); + } + + /** + * Set the length of this StringBuffer. If the new length is greater than + * the current length, all the new characters are set to '\0'. If the new + * length is less than the current length, the first newLength + * characters of the old array will be preserved, and the remaining + * characters are truncated. + * + * @param newLength the new length + * @throws IndexOutOfBoundsException if the new length is negative + * (while unspecified, this is a StringIndexOutOfBoundsException) + * @see #length() + */ + public void setLength(int newLength) + { + if (newLength < 0) + throw new StringIndexOutOfBoundsException(newLength); + + int valueLength = value.length; + + /* Always call ensureCapacity in order to preserve + copy-on-write semantics, except when the position + is simply being reset + */ + if (newLength > 0) + ensureCapacity(newLength); + + if (newLength < valueLength) + { + /* If the StringBuffer's value just grew, then we know that + value is newly allocated and the region between count and + newLength is filled with '\0'. */ + count = newLength; + } + else + { + /* The StringBuffer's value doesn't need to grow. However, + we should clear out any cruft that may exist. */ + while (count < newLength) + value[count++] = '\0'; + } + } + + /** + * Get the character at the specified index. + * + * @param index the index of the character to get, starting at 0 + * @return the character at the specified index + * @throws IndexOutOfBoundsException if index is negative or >= length() + * (while unspecified, this is a StringIndexOutOfBoundsException) + */ + public char charAt(int index) + { + if (index < 0 || index >= count) + throw new StringIndexOutOfBoundsException(index); + return value[index]; + } + + /** + * Get the code point at the specified index. This is like #charAt(int), + * but if the character is the start of a surrogate pair, and the + * following character completes the pair, then the corresponding + * supplementary code point is returned. + * @param index the index of the codepoint to get, starting at 0 + * @return the codepoint at the specified index + * @throws IndexOutOfBoundsException if index is negative or >= length() + * @since 1.5 + */ + public int codePointAt(int index) + { + return Character.codePointAt(value, index, count); + } + + /** + * Get the code point before the specified index. This is like + * #codePointAt(int), but checks the characters at index-1 and + * index-2 to see if they form a supplementary code point. + * @param index the index just past the codepoint to get, starting at 0 + * @return the codepoint at the specified index + * @throws IndexOutOfBoundsException if index is negative or >= length() + * @since 1.5 + */ + public int codePointBefore(int index) + { + // Character.codePointBefore() doesn't perform this check. We + // could use the CharSequence overload, but this is just as easy. + if (index >= count) + throw new IndexOutOfBoundsException(); + return Character.codePointBefore(value, index, 1); + } + + /** + * Get the specified array of characters. srcOffset - srcEnd + * characters will be copied into the array you pass in. + * + * @param srcOffset the index to start copying from (inclusive) + * @param srcEnd the index to stop copying from (exclusive) + * @param dst the array to copy into + * @param dstOffset the index to start copying into + * @throws NullPointerException if dst is null + * @throws IndexOutOfBoundsException if any source or target indices are + * out of range (while unspecified, source problems cause a + * StringIndexOutOfBoundsException, and dest problems cause an + * ArrayIndexOutOfBoundsException) + * @see System#arraycopy(Object, int, Object, int, int) + */ + public void getChars(int srcOffset, int srcEnd, + char[] dst, int dstOffset) + { + if (srcOffset < 0 || srcEnd > count || srcEnd < srcOffset) + throw new StringIndexOutOfBoundsException(); + System.arraycopy(value, srcOffset, dst, dstOffset, srcEnd - srcOffset); + } + + /** + * Set the character at the specified index. + * + * @param index the index of the character to set starting at 0 + * @param ch the value to set that character to + * @throws IndexOutOfBoundsException if index is negative or >= length() + * (while unspecified, this is a StringIndexOutOfBoundsException) + */ + public void setCharAt(int index, char ch) + { + if (index < 0 || index >= count) + throw new StringIndexOutOfBoundsException(index); + // Call ensureCapacity to enforce copy-on-write. + ensureCapacity(count); + value[index] = ch; + } + + /** + * Append the String value of the argument to this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param obj the Object to convert and append + * @return this StringBuffer + * @see String#valueOf(Object) + * @see #append(String) + */ + public CPStringBuilder append(Object obj) + { + return append(String.valueOf(obj)); + } + + /** + * Append the String to this StringBuffer. If + * str is null, the String "null" is appended. + * + * @param str the String to append + * @return this StringBuffer + */ + public CPStringBuilder append(String str) + { + if (str == null) + str = "null"; + int len = str.length(); + ensureCapacity(count + len); + str.getChars(0, len, value, count); + count += len; + return this; + } + + /** + * Append the StringBuilder value of the argument to this + * StringBuilder. This behaves the same as + * append((Object) stringBuffer), except it is more efficient. + * + * @param stringBuffer the StringBuilder to convert and append + * @return this StringBuilder + * @see #append(Object) + */ + public CPStringBuilder append(StringBuffer stringBuffer) + { + if (stringBuffer == null) + return append("null"); + synchronized (stringBuffer) + { + int len = stringBuffer.length(); + ensureCapacity(count + len); + stringBuffer.getChars(0, len, value, count); + count += len; + } + return this; + } + + /** + * Append the char array to this StringBuffer. + * This is similar (but more efficient) than + * append(new String(data)), except in the case of null. + * + * @param data the char[] to append + * @return this StringBuffer + * @throws NullPointerException if str is null + * @see #append(char[], int, int) + */ + public CPStringBuilder append(char[] data) + { + return append(data, 0, data.length); + } + + /** + * Append part of the char array to this + * StringBuffer. This is similar (but more efficient) than + * append(new String(data, offset, count)), except in the case + * of null. + * + * @param data the char[] to append + * @param offset the start location in str + * @param count the number of characters to get from str + * @return this StringBuffer + * @throws NullPointerException if str is null + * @throws IndexOutOfBoundsException if offset or count is out of range + * (while unspecified, this is a StringIndexOutOfBoundsException) + */ + public CPStringBuilder append(char[] data, int offset, int count) + { + if (offset < 0 || count < 0 || offset > data.length - count) + throw new StringIndexOutOfBoundsException(); + ensureCapacity(this.count + count); + System.arraycopy(data, offset, value, this.count, count); + this.count += count; + return this; + } + + /** + * Append the String value of the argument to this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param bool the boolean to convert and append + * @return this StringBuffer + * @see String#valueOf(boolean) + */ + public CPStringBuilder append(boolean bool) + { + return append(bool ? "true" : "false"); + } + + /** + * Append the char to this StringBuffer. + * + * @param ch the char to append + * @return this StringBuffer + */ + public CPStringBuilder append(char ch) + { + ensureCapacity(count + 1); + value[count++] = ch; + return this; + } + + /** + * Append the characters in the CharSequence to this + * buffer. + * + * @param seq the CharSequence providing the characters + * @return this StringBuffer + * @since 1.5 + */ + public CPStringBuilder append(CharSequence seq) + { + return append(seq, 0, seq.length()); + } + + /** + * Append some characters from the CharSequence to this + * buffer. If the argument is null, the four characters "null" are + * appended. + * + * @param seq the CharSequence providing the characters + * @param start the starting index + * @param end one past the final index + * @return this StringBuffer + * @since 1.5 + */ + public CPStringBuilder append(CharSequence seq, int start, int end) + { + if (seq == null) + return append("null"); + if (end - start > 0) + { + ensureCapacity(count + end - start); + for (; start < end; ++start) + value[count++] = seq.charAt(start); + } + return this; + } + + /** + * Append the String value of the argument to this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param inum the int to convert and append + * @return this StringBuffer + * @see String#valueOf(int) + */ + // This is native in libgcj, for efficiency. + public CPStringBuilder append(int inum) + { + return append(String.valueOf(inum)); + } + + /** + * Append the String value of the argument to this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param lnum the long to convert and append + * @return this StringBuffer + * @see String#valueOf(long) + */ + public CPStringBuilder append(long lnum) + { + return append(Long.toString(lnum, 10)); + } + + /** + * Append the String value of the argument to this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param fnum the float to convert and append + * @return this StringBuffer + * @see String#valueOf(float) + */ + public CPStringBuilder append(float fnum) + { + return append(Float.toString(fnum)); + } + + /** + * Append the String value of the argument to this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param dnum the double to convert and append + * @return this StringBuffer + * @see String#valueOf(double) + */ + public CPStringBuilder append(double dnum) + { + return append(Double.toString(dnum)); + } + + /** + * Append the code point to this StringBuffer. + * This is like #append(char), but will append two characters + * if a supplementary code point is given. + * + * @param code the code point to append + * @return this StringBuffer + * @see Character#toChars(int, char[], int) + * @since 1.5 + */ + public CPStringBuilder appendCodePoint(int code) + { + int len = Character.charCount(code); + ensureCapacity(count + len); + Character.toChars(code, value, count); + count += len; + return this; + } + + /** + * Delete characters from this StringBuffer. + * delete(10, 12) will delete 10 and 11, but not 12. It is + * harmless for end to be larger than length(). + * + * @param start the first character to delete + * @param end the index after the last character to delete + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if start or end are out of bounds + * @since 1.2 + */ + public CPStringBuilder delete(int start, int end) + { + if (start < 0 || start > count || start > end) + throw new StringIndexOutOfBoundsException(start); + if (end > count) + end = count; + ensureCapacity(count); + if (count - end != 0) + System.arraycopy(value, end, value, start, count - end); + count -= end - start; + return this; + } + + /** + * Delete a character from this StringBuffer. + * + * @param index the index of the character to delete + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if index is out of bounds + * @since 1.2 + */ + public CPStringBuilder deleteCharAt(int index) + { + return delete(index, index + 1); + } + + /** + * Replace characters between index start (inclusive) and + * end (exclusive) with str. If end + * is larger than the size of this StringBuffer, all characters after + * start are replaced. + * + * @param start the beginning index of characters to delete (inclusive) + * @param end the ending index of characters to delete (exclusive) + * @param str the new String to insert + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if start or end are out of bounds + * @throws NullPointerException if str is null + * @since 1.2 + */ + public CPStringBuilder replace(int start, int end, String str) + { + if (start < 0 || start > count || start > end) + throw new StringIndexOutOfBoundsException(start); + + int len = str.length(); + // Calculate the difference in 'count' after the replace. + int delta = len - (end > count ? count : end) + start; + ensureCapacity(count + delta); + + if (delta != 0 && end < count) + System.arraycopy(value, end, value, end + delta, count - end); + + str.getChars(0, len, value, start); + count += delta; + return this; + } + + /** + * Insert a subarray of the char[] argument into this + * StringBuffer. + * + * @param offset the place to insert in this buffer + * @param str the char[] to insert + * @param str_offset the index in str to start inserting from + * @param len the number of characters to insert + * @return this StringBuffer + * @throws NullPointerException if str is null + * @throws StringIndexOutOfBoundsException if any index is out of bounds + * @since 1.2 + */ + public CPStringBuilder insert(int offset, char[] str, int str_offset, int len) + { + if (offset < 0 || offset > count || len < 0 + || str_offset < 0 || str_offset > str.length - len) + throw new StringIndexOutOfBoundsException(); + ensureCapacity(count + len); + System.arraycopy(value, offset, value, offset + len, count - offset); + System.arraycopy(str, str_offset, value, offset, len); + count += len; + return this; + } + + /** + * Insert the String value of the argument into this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param offset the place to insert in this buffer + * @param obj the Object to convert and insert + * @return this StringBuffer + * @exception StringIndexOutOfBoundsException if offset is out of bounds + * @see String#valueOf(Object) + */ + public CPStringBuilder insert(int offset, Object obj) + { + return insert(offset, obj == null ? "null" : obj.toString()); + } + + /** + * Insert the String argument into this + * StringBuffer. If str is null, the String "null" is used + * instead. + * + * @param offset the place to insert in this buffer + * @param str the String to insert + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if offset is out of bounds + */ + public CPStringBuilder insert(int offset, String str) + { + if (offset < 0 || offset > count) + throw new StringIndexOutOfBoundsException(offset); + if (str == null) + str = "null"; + int len = str.length(); + ensureCapacity(count + len); + System.arraycopy(value, offset, value, offset + len, count - offset); + str.getChars(0, len, value, offset); + count += len; + return this; + } + + /** + * Insert the CharSequence argument into this + * StringBuffer. If the sequence is null, the String + * "null" is used instead. + * + * @param offset the place to insert in this buffer + * @param sequence the CharSequence to insert + * @return this StringBuffer + * @throws IndexOutOfBoundsException if offset is out of bounds + * @since 1.5 + */ + public CPStringBuilder insert(int offset, CharSequence sequence) + { + if (sequence == null) + sequence = "null"; + return insert(offset, sequence, 0, sequence.length()); + } + + /** + * Insert a subsequence of the CharSequence argument into this + * StringBuffer. If the sequence is null, the String + * "null" is used instead. + * + * @param offset the place to insert in this buffer + * @param sequence the CharSequence to insert + * @param start the starting index of the subsequence + * @param end one past the ending index of the subsequence + * @return this StringBuffer + * @throws IndexOutOfBoundsException if offset, start, + * or end are out of bounds + * @since 1.5 + */ + public CPStringBuilder insert(int offset, CharSequence sequence, int start, int end) + { + if (sequence == null) + sequence = "null"; + if (start < 0 || end < 0 || start > end || end > sequence.length()) + throw new IndexOutOfBoundsException(); + int len = end - start; + ensureCapacity(count + len); + System.arraycopy(value, offset, value, offset + len, count - offset); + for (int i = start; i < end; ++i) + value[offset++] = sequence.charAt(i); + count += len; + return this; + } + + /** + * Insert the char[] argument into this + * StringBuffer. + * + * @param offset the place to insert in this buffer + * @param data the char[] to insert + * @return this StringBuffer + * @throws NullPointerException if data is null + * @throws StringIndexOutOfBoundsException if offset is out of bounds + * @see #insert(int, char[], int, int) + */ + public CPStringBuilder insert(int offset, char[] data) + { + return insert(offset, data, 0, data.length); + } + + /** + * Insert the String value of the argument into this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param offset the place to insert in this buffer + * @param bool the boolean to convert and insert + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if offset is out of bounds + * @see String#valueOf(boolean) + */ + public CPStringBuilder insert(int offset, boolean bool) + { + return insert(offset, bool ? "true" : "false"); + } + + /** + * Insert the char argument into this StringBuffer. + * + * @param offset the place to insert in this buffer + * @param ch the char to insert + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if offset is out of bounds + */ + public CPStringBuilder insert(int offset, char ch) + { + if (offset < 0 || offset > count) + throw new StringIndexOutOfBoundsException(offset); + ensureCapacity(count + 1); + System.arraycopy(value, offset, value, offset + 1, count - offset); + value[offset] = ch; + count++; + return this; + } + + /** + * Insert the String value of the argument into this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param offset the place to insert in this buffer + * @param inum the int to convert and insert + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if offset is out of bounds + * @see String#valueOf(int) + */ + public CPStringBuilder insert(int offset, int inum) + { + return insert(offset, String.valueOf(inum)); + } + + /** + * Insert the String value of the argument into this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param offset the place to insert in this buffer + * @param lnum the long to convert and insert + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if offset is out of bounds + * @see String#valueOf(long) + */ + public CPStringBuilder insert(int offset, long lnum) + { + return insert(offset, Long.toString(lnum, 10)); + } + + /** + * Insert the String value of the argument into this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param offset the place to insert in this buffer + * @param fnum the float to convert and insert + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if offset is out of bounds + * @see String#valueOf(float) + */ + public CPStringBuilder insert(int offset, float fnum) + { + return insert(offset, Float.toString(fnum)); + } + + /** + * Insert the String value of the argument into this + * StringBuffer. Uses String.valueOf() to convert + * to String. + * + * @param offset the place to insert in this buffer + * @param dnum the double to convert and insert + * @return this StringBuffer + * @throws StringIndexOutOfBoundsException if offset is out of bounds + * @see String#valueOf(double) + */ + public CPStringBuilder insert(int offset, double dnum) + { + return insert(offset, Double.toString(dnum)); + } + + /** + * Finds the first instance of a substring in this StringBuilder. + * + * @param str String to find + * @return location (base 0) of the String, or -1 if not found + * @throws NullPointerException if str is null + * @see #indexOf(String, int) + */ + public int indexOf(String str) + { + return indexOf(str, 0); + } + + /** + * Finds the first instance of a String in this StringBuffer, starting at + * a given index. If starting index is less than 0, the search starts at + * the beginning of this String. If the starting index is greater than the + * length of this String, or the substring is not found, -1 is returned. + * + * @param str String to find + * @param fromIndex index to start the search + * @return location (base 0) of the String, or -1 if not found + * @throws NullPointerException if str is null + * @since 1.4 + */ + public int indexOf(String str, int fromIndex) + { + if (fromIndex < 0) + fromIndex = 0; + int olength = str.length(); + int limit = count - olength; + String s = VMCPStringBuilder.toString(value, 0, count); + for (; fromIndex <= limit; ++fromIndex) + if (s.regionMatches(fromIndex, str, 0, olength)) + return fromIndex; + return -1; + } + + /** + * Finds the last instance of a substring in this StringBuffer. + * + * @param str String to find + * @return location (base 0) of the String, or -1 if not found + * @throws NullPointerException if str is null + * @see #lastIndexOf(String, int) + * @since 1.4 + */ + public int lastIndexOf(String str) + { + return lastIndexOf(str, count - str.length()); + } + + /** + * Finds the last instance of a String in this StringBuffer, starting at a + * given index. If starting index is greater than the maximum valid index, + * then the search begins at the end of this String. If the starting index + * is less than zero, or the substring is not found, -1 is returned. + * + * @param str String to find + * @param fromIndex index to start the search + * @return location (base 0) of the String, or -1 if not found + * @throws NullPointerException if str is null + * @since 1.4 + */ + public int lastIndexOf(String str, int fromIndex) + { + fromIndex = Math.min(fromIndex, count - str.length()); + String s = VMCPStringBuilder.toString(value, 0, count); + int olength = str.length(); + for ( ; fromIndex >= 0; fromIndex--) + if (s.regionMatches(fromIndex, str, 0, olength)) + return fromIndex; + return -1; + } + + /** + * Reverse the characters in this StringBuffer. The same sequence of + * characters exists, but in the reverse index ordering. + * + * @return this StringBuffer + */ + public CPStringBuilder reverse() + { + // Call ensureCapacity to enforce copy-on-write. + ensureCapacity(count); + for (int i = count >> 1, j = count - i; --i >= 0; ++j) + { + char c = value[i]; + value[i] = value[j]; + value[j] = c; + } + return this; + } + + /** + * This may reduce the amount of memory used by the StringBuffer, + * by resizing the internal array to remove unused space. However, + * this method is not required to resize, so this behavior cannot + * be relied upon. + * @since 1.5 + */ + public void trimToSize() + { + int wouldSave = value.length - count; + // Some random heuristics: if we save less than 20 characters, who + // cares. + if (wouldSave < 20) + return; + // If we save more than 200 characters, shrink. + // If we save more than 1/4 of the buffer, shrink. + if (wouldSave > 200 || wouldSave * 4 > value.length) + allocateArray(count); + } + + /** + * Return the number of code points between two indices in the + * StringBuffer. An unpaired surrogate counts as a + * code point for this purpose. Characters outside the indicated + * range are not examined, even if the range ends in the middle of a + * surrogate pair. + * + * @param start the starting index + * @param end one past the ending index + * @return the number of code points + * @since 1.5 + */ + public int codePointCount(int start, int end) + { + if (start < 0 || end >= count || start > end) + throw new StringIndexOutOfBoundsException(); + + int count = 0; + while (start < end) + { + char base = value[start]; + if (base < Character.MIN_HIGH_SURROGATE + || base > Character.MAX_HIGH_SURROGATE + || start == end + || start == count + || value[start + 1] < Character.MIN_LOW_SURROGATE + || value[start + 1] > Character.MAX_LOW_SURROGATE) + { + // Nothing. + } + else + { + // Surrogate pair. + ++start; + } + ++start; + ++count; + } + return count; + } + + /** + * Starting at the given index, this counts forward by the indicated + * number of code points, and then returns the resulting index. An + * unpaired surrogate counts as a single code point for this + * purpose. + * + * @param start the starting index + * @param codePoints the number of code points + * @return the resulting index + * @since 1.5 + */ + public int offsetByCodePoints(int start, int codePoints) + { + while (codePoints > 0) + { + char base = value[start]; + if (base < Character.MIN_HIGH_SURROGATE + || base > Character.MAX_HIGH_SURROGATE + || start == count + || value[start + 1] < Character.MIN_LOW_SURROGATE + || value[start + 1] > Character.MAX_LOW_SURROGATE) + { + // Nothing. + } + else + { + // Surrogate pair. + ++start; + } + ++start; + --codePoints; + } + return start; + } + + /** + * Increase the capacity of this StringBuilder. This will + * ensure that an expensive growing operation will not occur until either + * minimumCapacity is reached or the array has been allocated. + * The buffer is grown to either minimumCapacity * 2, if + * the array has been allocated or the larger of minimumCapacity and + * capacity() * 2 + 2, if it is not already large enough. + * + * @param minimumCapacity the new capacity + * @see #length() + */ + public void ensureCapacity(int minimumCapacity) + { + if (allocated || minimumCapacity > value.length) + { + if (minimumCapacity > value.length) + { + int max = value.length * 2 + 2; + minimumCapacity = (minimumCapacity < max ? max : minimumCapacity); + } + else + minimumCapacity *= 2; + allocateArray(minimumCapacity); + } + } + + /** + * Allocates a new character array. This method is triggered when + * a write is attempted after the array has been passed to a + * {@link String} object, so that the builder does not modify + * the immutable {@link String}. + * + * @param capacity the size of the new array. + */ + private void allocateArray(int capacity) + { + char[] nb = new char[capacity]; + System.arraycopy(value, 0, nb, 0, count); + value = nb; + allocated = false; + } + + /** + * Get the length of the String this StringBuilder + * would create. Not to be confused with the capacity of the + * StringBuilder. + * + * @return the length of this StringBuilder + * @see #capacity() + * @see #setLength(int) + */ + public int length() + { + return count; + } + + /** + * Creates a substring of this StringBuilder, starting at a specified index + * and ending at one character before a specified index. This is implemented + * the same as substring(beginIndex, endIndex), to satisfy + * the CharSequence interface. + * + * @param beginIndex index to start at (inclusive, base 0) + * @param endIndex index to end at (exclusive) + * @return new String which is a substring of this StringBuilder + * @throws IndexOutOfBoundsException if beginIndex or endIndex is out of + * bounds + * @see #substring(int, int) + */ + public CharSequence subSequence(int beginIndex, int endIndex) + { + return substring(beginIndex, endIndex); + } + + /** + * Creates a substring of this CPStringBuilder, starting at a specified index + * and ending at the end of this StringBuilder. + * + * @param beginIndex index to start substring (base 0) + * @return new String which is a substring of this StringBuilder + * @throws StringIndexOutOfBoundsException if beginIndex is out of bounds + * @see #substring(int, int) + */ + public String substring(int beginIndex) + { + return substring(beginIndex, count); + } + + /** + * Creates a substring of this CPStringBuilder, starting at a specified index + * and ending at one character before a specified index. + * + * @param beginIndex index to start at (inclusive, base 0) + * @param endIndex index to end at (exclusive) + * @return new String which is a substring of this StringBuilder + * @throws StringIndexOutOfBoundsException if beginIndex or endIndex is out + * of bounds + */ + public String substring(int beginIndex, int endIndex) + { + if (beginIndex < 0 || endIndex > count || endIndex < beginIndex) + throw new StringIndexOutOfBoundsException(); + int len = endIndex - beginIndex; + if (len == 0) + return ""; + allocated = true; + return VMCPStringBuilder.toString(value, beginIndex, len); + } + + /** + * Convert this CPStringBuilder to a String. The + * String is composed of the characters currently in this StringBuilder. Note + * that the result is not a copy, so we flag this here and make sure to + * allocate a new array on the next write attempt (see {@link #ensureCapacity(int)}). + * + * @return the characters in this StringBuilder + */ + public String toString() + { + allocated = true; + return VMCPStringBuilder.toString(value, 0, count); + } + +} diff --git a/libjava/classpath/gnu/java/lang/ClassHelper.java b/libjava/classpath/gnu/java/lang/ClassHelper.java index 49dce21eaf9..e190889dede 100644 --- a/libjava/classpath/gnu/java/lang/ClassHelper.java +++ b/libjava/classpath/gnu/java/lang/ClassHelper.java @@ -102,7 +102,7 @@ public class ClassHelper String name = klass.getName(); if (arrayCount == 0) return name; - StringBuilder b = new StringBuilder(name.length() + 2 * arrayCount); + CPStringBuilder b = new CPStringBuilder(name.length() + 2 * arrayCount); b.append(name); for (int i = 0; i < arrayCount; ++i) b.append("[]"); diff --git a/libjava/classpath/gnu/java/lang/reflect/GenericSignatureParser.java b/libjava/classpath/gnu/java/lang/reflect/GenericSignatureParser.java index 06bc9e4ab06..e413c76c78e 100644 --- a/libjava/classpath/gnu/java/lang/reflect/GenericSignatureParser.java +++ b/libjava/classpath/gnu/java/lang/reflect/GenericSignatureParser.java @@ -38,7 +38,19 @@ exception statement from your version. */ package gnu.java.lang.reflect; -import java.lang.reflect.*; +import gnu.java.lang.CPStringBuilder; + +import java.lang.reflect.Constructor; +import java.lang.reflect.GenericArrayType; +import java.lang.reflect.GenericDeclaration; +import java.lang.reflect.GenericSignatureFormatError; +import java.lang.reflect.MalformedParameterizedTypeException; +import java.lang.reflect.Method; +import java.lang.reflect.ParameterizedType; +import java.lang.reflect.Type; +import java.lang.reflect.TypeVariable; +import java.lang.reflect.WildcardType; + import java.util.ArrayList; import java.util.Arrays; @@ -184,7 +196,7 @@ final class ParameterizedTypeImpl extends TypeImpl implements ParameterizedType public String toString() { - StringBuilder sb = new StringBuilder(); + CPStringBuilder sb = new CPStringBuilder(); if (owner != null) { sb.append(owner); diff --git a/libjava/classpath/gnu/java/lang/reflect/TypeSignature.java b/libjava/classpath/gnu/java/lang/reflect/TypeSignature.java index 78c17183792..612058dbfe8 100644 --- a/libjava/classpath/gnu/java/lang/reflect/TypeSignature.java +++ b/libjava/classpath/gnu/java/lang/reflect/TypeSignature.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.lang.reflect; +import gnu.java.lang.CPStringBuilder; + import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.Member; @@ -239,7 +241,7 @@ public class TypeSignature public static String getEncodingOfMethod(Method m) { Class[] paramTypes = m.getParameterTypes(); - StringBuilder buf = new StringBuilder("("); + CPStringBuilder buf = new CPStringBuilder("("); for (int i = 0; i < paramTypes.length; i++) buf.append(getEncodingOfClass(paramTypes[i].getName(), true)); buf.append(')').append(getEncodingOfClass(m.getReturnType().getName(), @@ -261,7 +263,7 @@ public class TypeSignature public static String getEncodingOfConstructor(Constructor c) { Class[] paramTypes = c.getParameterTypes(); - StringBuilder buf = new StringBuilder("("); + CPStringBuilder buf = new CPStringBuilder("("); for (int i = 0; i < paramTypes.length; i++) buf.append(getEncodingOfClass(paramTypes[i].getName(), true)); buf.append(")V"); diff --git a/libjava/classpath/gnu/java/math/GMP.java b/libjava/classpath/gnu/java/math/GMP.java new file mode 100644 index 00000000000..6fb49363ddd --- /dev/null +++ b/libjava/classpath/gnu/java/math/GMP.java @@ -0,0 +1,474 @@ +/* gnu.java.math.GMP -- Arbitary precision integers using GMP + Copyright (C) 2006 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.math; + +import gnu.classpath.Pointer; + +/** + * Implement BigInteger using GMP + */ +public final class GMP +{ + private Pointer native_ptr; + private int refCount = 1; + + public GMP() + { + super(); + + natInitialize(); + } + + private synchronized void acquireRef() + { + refCount++; + } + + private synchronized void releaseRef() + { + refCount--; + if (refCount == 0) + { + natFinalize(); + native_ptr = null; + } + } + + protected void finalize() + { + releaseRef(); + } + + + public void fromByteArray(byte[] v) + { + acquireRef(); + natFromByteArray(v); + releaseRef(); + } + + public void fromBI(GMP x) + { + acquireRef(); + x.acquireRef(); + natFromBI(x.native_ptr); + x.releaseRef(); + releaseRef(); + } + + public void fromLong(long n) + { + acquireRef(); + natFromLong(n); + releaseRef(); + } + + public int fromString(String s, int rdx) + { + acquireRef(); + int result = natFromString(s, rdx); + releaseRef(); + return result; + } + + public void fromSignedMagnitude(byte[] m, boolean isNegative) + { + acquireRef(); + natFromSignedMagnitude(m, isNegative); + releaseRef(); + } + + public String toString(int b) + { + acquireRef(); + String result = natToString(b); + releaseRef(); + return result; + } + + public void toByteArray(byte[] r) + { + acquireRef(); + natToByteArray(r); + releaseRef(); + } + + public double doubleValue() + { + acquireRef(); + double result = natDoubleValue(); + releaseRef(); + return result; + } + + public int absIntValue() + { + acquireRef(); + int result = natAbsIntValue(); + releaseRef(); + return result; + } + + public int compare(GMP x) + { + acquireRef(); + x.acquireRef(); + int result = natCompare(x.native_ptr); + x.releaseRef(); + releaseRef(); + return result; + } + + public void add(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natAdd(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void subtract(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natSubtract(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void multiply(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natMultiply(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void quotient(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natQuotient(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void remainder(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natRemainder(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void quotientAndRemainder(GMP x, GMP q, GMP r) + { + acquireRef(); + x.acquireRef(); + q.acquireRef(); + r.acquireRef(); + natQuotientAndRemainder(x.native_ptr, q.native_ptr, r.native_ptr); + r.releaseRef(); + q.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void modulo(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natModulo(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void pow(int n, GMP r) + { + acquireRef(); + r.acquireRef(); + natPow(n, r.native_ptr); + r.releaseRef(); + releaseRef(); + } + + public void modPow(GMP e, GMP m, GMP r) + { + acquireRef(); + e.acquireRef(); + m.acquireRef(); + r.acquireRef(); + natModPow(e.native_ptr, m.native_ptr, r.native_ptr); + r.releaseRef(); + m.releaseRef(); + e.releaseRef(); + releaseRef(); + } + + public void modInverse(GMP m, GMP r) + { + acquireRef(); + m.acquireRef(); + r.acquireRef(); + natModInverse(m.native_ptr, r.native_ptr); + r.releaseRef(); + m.releaseRef(); + releaseRef(); + } + + public void gcd(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natGCD(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void shiftLeft(int n, GMP r) + { + acquireRef(); + r.acquireRef(); + natShiftLeft(n, r.native_ptr); + r.releaseRef(); + releaseRef(); + } + + public void shiftRight(int n, GMP r) + { + acquireRef(); + r.acquireRef(); + natShiftRight(n, r.native_ptr); + r.releaseRef(); + releaseRef(); + } + + public void abs(GMP r) + { + acquireRef(); + r.acquireRef(); + natAbs(r.native_ptr); + r.releaseRef(); + releaseRef(); + } + + public void negate(GMP r) + { + acquireRef(); + r.acquireRef(); + natNegate(r.native_ptr); + r.releaseRef(); + releaseRef(); + } + + public int bitLength() + { + acquireRef(); + int result = natBitLength(); + releaseRef(); + return result; + } + + public int bitCount() + { + acquireRef(); + int result = natSetBitCount(); + releaseRef(); + return result; + } + + public void and(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natAnd(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void or(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natOr(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void xor(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natXor(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void andNot(GMP x, GMP r) + { + acquireRef(); + x.acquireRef(); + r.acquireRef(); + natAndNot(x.native_ptr, r.native_ptr); + r.releaseRef(); + x.releaseRef(); + releaseRef(); + } + + public void not(GMP r) + { + acquireRef(); + r.acquireRef(); + natNot(r.native_ptr); + r.releaseRef(); + releaseRef(); + } + + public void flipBit(int n, GMP r) + { + acquireRef(); + r.acquireRef(); + natFlipBit(n, r.native_ptr); + r.releaseRef(); + releaseRef(); + } + + public int testBit(int n) + { + acquireRef(); + int result = natTestBit(n); + releaseRef(); + return result; + } + + public void setBit(int n, boolean setIt, GMP r) + { + acquireRef(); + r.acquireRef(); + natSetBit(n, setIt, r.native_ptr); + r.releaseRef(); + releaseRef(); + } + + public int testPrimality(int certainty) + { + acquireRef(); + int result = natTestPrimality(certainty); + releaseRef(); + return result; + } + + public int lowestSetBit() + { + acquireRef(); + int result = natLowestSetBit(); + releaseRef(); + return result; + } + + // Native methods ......................................................... + + public static native void natInitializeLibrary(); + + private native void natInitialize(); + private native void natFinalize(); + + private native void natFromLong(long n); + private native void natFromBI(Pointer x); + private native void natFromByteArray(byte[] v); + private native int natFromString(String s, int rdx); + private native void natFromSignedMagnitude(byte[] m, boolean isNegative); + + private native String natToString(int base); + private native void natToByteArray(byte[] r); + private native int natAbsIntValue(); + private native double natDoubleValue(); + + private native int natCompare(Pointer y); + private native void natAdd(Pointer x, Pointer r); + private native void natSubtract(Pointer x, Pointer r); + private native void natMultiply(Pointer x, Pointer r); + private native void natQuotient(Pointer x, Pointer r); + private native void natRemainder(Pointer x, Pointer r); + private native void natQuotientAndRemainder(Pointer x, Pointer q, Pointer r); + private native void natModulo(Pointer m, Pointer r); + private native void natPow(int n, Pointer r); + private native void natModPow(Pointer e, Pointer m, Pointer r); + private native void natModInverse(Pointer x, Pointer r); + private native void natGCD(Pointer x, Pointer r); + private native int natTestPrimality(int c); + private native void natShiftLeft(int n, Pointer r); + private native void natShiftRight(int n, Pointer r); + private native int natLowestSetBit(); + private native void natAbs(Pointer r); + private native void natNegate(Pointer r); + private native int natBitLength(); + private native int natSetBitCount(); + private native void natXor(Pointer x, Pointer r); + private native void natOr(Pointer x, Pointer r); + private native void natAnd(Pointer x, Pointer r); + private native void natAndNot(Pointer x, Pointer r); + private native void natFlipBit(int n, Pointer r); + private native int natTestBit(int n); + private native void natSetBit(int n, boolean setIt, Pointer r); + private native void natNot(Pointer r); +} diff --git a/libjava/classpath/gnu/java/net/protocol/ftp/FTPConnection.java b/libjava/classpath/gnu/java/net/protocol/ftp/FTPConnection.java index fd79019183a..98e8a868d60 100644 --- a/libjava/classpath/gnu/java/net/protocol/ftp/FTPConnection.java +++ b/libjava/classpath/gnu/java/net/protocol/ftp/FTPConnection.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.net.protocol.ftp; +import gnu.java.lang.CPStringBuilder; + import gnu.java.net.CRLFInputStream; import gnu.java.net.CRLFOutputStream; import gnu.java.net.EmptyX509TrustManager; @@ -621,7 +623,7 @@ public class FTPConnection } // Send PORT command - StringBuffer buf = new StringBuffer(PORT); + CPStringBuilder buf = new CPStringBuilder(PORT); buf.append(' '); // Construct the address/port string form byte[] address = localhost.getAddress(); @@ -686,7 +688,7 @@ public class FTPConnection public void setRepresentationType(int type) throws IOException { - StringBuffer buf = new StringBuffer(TYPE); + CPStringBuilder buf = new CPStringBuilder(TYPE); buf.append(' '); switch (type) { @@ -732,7 +734,7 @@ public class FTPConnection public void setFileStructure(int structure) throws IOException { - StringBuffer buf = new StringBuffer(STRU); + CPStringBuilder buf = new CPStringBuilder(STRU); buf.append(' '); switch (structure) { @@ -776,7 +778,7 @@ public class FTPConnection public void setTransferMode(int mode) throws IOException { - StringBuffer buf = new StringBuffer(MODE); + CPStringBuilder buf = new CPStringBuilder(MODE); buf.append(' '); switch (mode) { @@ -1286,7 +1288,7 @@ public class FTPConnection } else if (c == '-') { - StringBuffer buf = new StringBuffer(line.substring(4)); + CPStringBuilder buf = new CPStringBuilder(line.substring(4)); buf.append('\n'); while(true) { diff --git a/libjava/classpath/gnu/java/net/protocol/http/ChunkedInputStream.java b/libjava/classpath/gnu/java/net/protocol/http/ChunkedInputStream.java index 8abef71d521..8a30e51db57 100644 --- a/libjava/classpath/gnu/java/net/protocol/http/ChunkedInputStream.java +++ b/libjava/classpath/gnu/java/net/protocol/http/ChunkedInputStream.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.net.protocol.http; +import gnu.java.lang.CPStringBuilder; + import java.io.IOException; import java.io.InputStream; import java.net.ProtocolException; @@ -113,7 +115,7 @@ public class ChunkedInputStream // Read chunk header int c, last = 0; boolean seenSemi = false; - StringBuilder buf = new StringBuilder(); + CPStringBuilder buf = new CPStringBuilder(); do { c = in.read(); diff --git a/libjava/classpath/gnu/java/net/protocol/http/Cookie.java b/libjava/classpath/gnu/java/net/protocol/http/Cookie.java index 0be7a097e5b..4482a121e59 100644 --- a/libjava/classpath/gnu/java/net/protocol/http/Cookie.java +++ b/libjava/classpath/gnu/java/net/protocol/http/Cookie.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.net.protocol.http; +import gnu.java.lang.CPStringBuilder; + import java.util.Date; /** @@ -139,7 +141,7 @@ public class Cookie public String toString(boolean showPath, boolean showDomain) { - StringBuilder buf = new StringBuilder(); + CPStringBuilder buf = new CPStringBuilder(); buf.append(name); buf.append('='); buf.append(value); diff --git a/libjava/classpath/gnu/java/net/protocol/http/HTTPConnection.java b/libjava/classpath/gnu/java/net/protocol/http/HTTPConnection.java index 9d19bfbdba4..44b1a608ac7 100644 --- a/libjava/classpath/gnu/java/net/protocol/http/HTTPConnection.java +++ b/libjava/classpath/gnu/java/net/protocol/http/HTTPConnection.java @@ -39,6 +39,8 @@ exception statement from your version. */ package gnu.java.net.protocol.http; import gnu.classpath.SystemProperties; + +import gnu.java.lang.CPStringBuilder; import gnu.java.net.EmptyX509TrustManager; import java.io.BufferedInputStream; @@ -668,7 +670,7 @@ public class HTTPConnection Cookie[] cookies = cookieManager.getCookies(hostname, secure, path); if (cookies != null && cookies.length > 0) { - StringBuilder buf = new StringBuilder(); + CPStringBuilder buf = new CPStringBuilder(); buf.append("$Version=1"); for (int i = 0; i < cookies.length; i++) { @@ -827,7 +829,7 @@ public class HTTPConnection */ protected String getURI() { - StringBuilder buf = new StringBuilder(); + CPStringBuilder buf = new CPStringBuilder(); buf.append(secure ? "https://" : "http://"); buf.append(hostname); if (secure) diff --git a/libjava/classpath/gnu/java/net/protocol/http/Headers.java b/libjava/classpath/gnu/java/net/protocol/http/Headers.java index c8736bbac8f..690a0c65bd0 100644 --- a/libjava/classpath/gnu/java/net/protocol/http/Headers.java +++ b/libjava/classpath/gnu/java/net/protocol/http/Headers.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.net.protocol.http; +import gnu.java.lang.CPStringBuilder; + import gnu.java.net.LineInputStream; import java.io.IOException; @@ -280,7 +282,7 @@ class Headers implements Iterable (LineInputStream) in : new LineInputStream(in); String name = null; - StringBuilder value = new StringBuilder(); + CPStringBuilder value = new CPStringBuilder(); while (true) { String line = lin.readLine(); diff --git a/libjava/classpath/gnu/java/net/protocol/http/LimitedLengthInputStream.java b/libjava/classpath/gnu/java/net/protocol/http/LimitedLengthInputStream.java index 16cf56a2919..568f830fd47 100644 --- a/libjava/classpath/gnu/java/net/protocol/http/LimitedLengthInputStream.java +++ b/libjava/classpath/gnu/java/net/protocol/http/LimitedLengthInputStream.java @@ -1,5 +1,5 @@ /* LimitedLengthInputStream.java -- - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2008 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -57,20 +57,17 @@ class LimitedLengthInputStream private boolean eof; private InputStream in; private boolean doClose; - - + private void handleClose() throws IOException { eof = true; + if (doClose) - { - in.close(); - } + in.close(); else - { - connection.release(); - } + connection.release(); + in = null; connection = null; } @@ -85,7 +82,7 @@ class LimitedLengthInputStream * @param restrictLen if true the number of bytes that can be read * from this stream will be limited to maxLen, otherwise the number * of bytes is not restricted. - * + * * @param con the HTTPConnection associated with this stream * * @param doClose if true con will be closed when finished reading, @@ -98,7 +95,6 @@ class LimitedLengthInputStream HTTPConnection con, boolean doClose) throws IOException - { this.in = in; this.remainingLen = maxLen; @@ -122,7 +118,7 @@ class LimitedLengthInputStream return -1; // EOF int r; - + if (restrictLen) { r = in.read(); @@ -138,7 +134,7 @@ class LimitedLengthInputStream if (r == -1) handleClose(); } - + return r; } @@ -156,12 +152,12 @@ class LimitedLengthInputStream if (restrictLen && length > remainingLen) length = (int) remainingLen; - + int r = in.read(buffer, offset, length); - + if (-1 == r) handleClose(); - + if (restrictLen && r > 0) { remainingLen -= r; @@ -182,7 +178,7 @@ class LimitedLengthInputStream n = remainingLen; long r = in.skip(n); - + if (restrictLen) { remainingLen -= r; @@ -214,7 +210,7 @@ class LimitedLengthInputStream // it away. doClose = true; - + handleClose(); } } diff --git a/libjava/classpath/gnu/java/net/protocol/http/Request.java b/libjava/classpath/gnu/java/net/protocol/http/Request.java index 90e3b7a0d64..88e2fd077f2 100644 --- a/libjava/classpath/gnu/java/net/protocol/http/Request.java +++ b/libjava/classpath/gnu/java/net/protocol/http/Request.java @@ -38,6 +38,7 @@ exception statement from your version. */ package gnu.java.net.protocol.http; +import gnu.java.lang.CPStringBuilder; import gnu.java.net.LineInputStream; import gnu.java.util.Base64; @@ -628,7 +629,7 @@ public class Request { int len = text.length(); String key = null; - StringBuilder buf = new StringBuilder(); + CPStringBuilder buf = new CPStringBuilder(); Properties ret = new Properties(); boolean inQuote = false; for (int i = 0; i < len; i++) @@ -681,7 +682,7 @@ public class Request { int nc = connection.getNonceCount(nonce); String hex = Integer.toHexString(nc); - StringBuilder buf = new StringBuilder(); + CPStringBuilder buf = new CPStringBuilder(); for (int i = 8 - hex.length(); i > 0; i--) { buf.append('0'); @@ -752,7 +753,7 @@ public class Request int len = text.length(); String attr = null; - StringBuilder buf = new StringBuilder(); + CPStringBuilder buf = new CPStringBuilder(); boolean inQuote = false; for (int i = 0; i <= len; i++) { diff --git a/libjava/classpath/gnu/java/net/protocol/jar/Handler.java b/libjava/classpath/gnu/java/net/protocol/jar/Handler.java index c57d0a36016..66f0fb6d983 100644 --- a/libjava/classpath/gnu/java/net/protocol/jar/Handler.java +++ b/libjava/classpath/gnu/java/net/protocol/jar/Handler.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.net.protocol.jar; +import gnu.java.lang.CPStringBuilder; + import gnu.java.net.URLParseError; import java.io.IOException; @@ -180,7 +182,7 @@ public class Handler extends URLStreamHandler tokens.add(token); } - StringBuffer path = new StringBuffer(url_string.length()); + CPStringBuilder path = new CPStringBuilder(url_string.length()); path.append(url_string.substring(0, jar_stop + 1)); Iterator it = tokens.iterator(); @@ -205,7 +207,7 @@ public class Handler extends URLStreamHandler // Do the concatenation manually to avoid resize StringBuffer's // internal buffer. The length of ref is not taken into consideration // as it's a rare path. - StringBuffer sb = new StringBuffer (file.length() + 5); + CPStringBuilder sb = new CPStringBuilder (file.length() + 5); sb.append ("jar:"); sb.append (file); if (ref != null) diff --git a/libjava/classpath/gnu/java/nio/charset/ByteDecodeLoopHelper.java b/libjava/classpath/gnu/java/nio/charset/ByteDecodeLoopHelper.java index 33dfa0263c7..a1eb5e2067b 100644 --- a/libjava/classpath/gnu/java/nio/charset/ByteDecodeLoopHelper.java +++ b/libjava/classpath/gnu/java/nio/charset/ByteDecodeLoopHelper.java @@ -119,6 +119,8 @@ public abstract class ByteDecodeLoopHelper int inRemaining = in.remaining(); int outRemaining = out.remaining(); CoderResult result; + + bailOut: if (inRemaining <= outRemaining) { for (int i = 0; i < inRemaining; i++) @@ -129,7 +131,7 @@ public abstract class ByteDecodeLoopHelper { inPos--; result = CoderResult.unmappableForLength(1); - break; + break bailOut; } char c = mapToChar(b); outArray[outPos] = c; @@ -147,7 +149,7 @@ public abstract class ByteDecodeLoopHelper { inPos--; result = CoderResult.unmappableForLength(1); - break; + break bailOut; } char c = mapToChar(b); outArray[outPos] = c; diff --git a/libjava/classpath/gnu/java/nio/charset/ByteEncodeLoopHelper.java b/libjava/classpath/gnu/java/nio/charset/ByteEncodeLoopHelper.java index 5f703b195f2..b1a4f10da92 100644 --- a/libjava/classpath/gnu/java/nio/charset/ByteEncodeLoopHelper.java +++ b/libjava/classpath/gnu/java/nio/charset/ByteEncodeLoopHelper.java @@ -120,6 +120,8 @@ public abstract class ByteEncodeLoopHelper int inRemaining = in.remaining(); int outRemaining = out.remaining(); CoderResult result; + + bailOut: if (inRemaining <= outRemaining) { for (int i = 0; i < inRemaining; i++) @@ -130,7 +132,7 @@ public abstract class ByteEncodeLoopHelper { inPos--; result = CoderResult.unmappableForLength(1); - break; + break bailOut; } byte b = mapToByte(inChar); outArray[outPos] = b; @@ -148,7 +150,7 @@ public abstract class ByteEncodeLoopHelper { inPos--; result = CoderResult.unmappableForLength(1); - break; + break bailOut; } byte b = mapToByte(inChar); outArray[outPos] = b; diff --git a/libjava/classpath/gnu/java/rmi/server/RMIClassLoaderImpl.java b/libjava/classpath/gnu/java/rmi/server/RMIClassLoaderImpl.java index 4d5e1b0269e..9c3edef76d8 100644 --- a/libjava/classpath/gnu/java/rmi/server/RMIClassLoaderImpl.java +++ b/libjava/classpath/gnu/java/rmi/server/RMIClassLoaderImpl.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.rmi.server; +import gnu.java.lang.CPStringBuilder; + import java.lang.reflect.Proxy; import java.net.MalformedURLException; import java.net.URL; @@ -69,7 +71,7 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi if (urls.length == 0) return null; - StringBuffer annotation = new StringBuffer (64 * urls.length); + CPStringBuilder annotation = new CPStringBuilder (64 * urls.length); for (int i = 0; i < urls.length; i++) { @@ -337,7 +339,7 @@ public class RMIClassLoaderImpl extends RMIClassLoaderSpi if (urls.length == 0) return null; - StringBuffer annotation = new StringBuffer (64 * urls.length); + CPStringBuilder annotation = new CPStringBuilder (64 * urls.length); for (int i = 0; i < urls.length; i++) { diff --git a/libjava/classpath/gnu/java/rmi/server/RMIHashes.java b/libjava/classpath/gnu/java/rmi/server/RMIHashes.java index 5a414404d4f..c3665a4e73b 100644 --- a/libjava/classpath/gnu/java/rmi/server/RMIHashes.java +++ b/libjava/classpath/gnu/java/rmi/server/RMIHashes.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.rmi.server; +import gnu.java.lang.CPStringBuilder; + import gnu.java.lang.reflect.TypeSignature; import java.io.ByteArrayOutputStream; @@ -61,7 +63,7 @@ public class RMIHashes ByteArrayOutputStream digest_out = new ByteArrayOutputStream(); DataOutputStream data_out = new DataOutputStream (digest_out); - StringBuffer sbuf = new StringBuffer(); + CPStringBuilder sbuf = new CPStringBuilder(); sbuf.append(meth.getName()); sbuf.append('('); Class params[] = meth.getParameterTypes(); diff --git a/libjava/classpath/gnu/java/security/Engine.java b/libjava/classpath/gnu/java/security/Engine.java index 2cb21832152..6c39d46acc6 100644 --- a/libjava/classpath/gnu/java/security/Engine.java +++ b/libjava/classpath/gnu/java/security/Engine.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.java.security; +import gnu.java.lang.CPStringBuilder; + import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; @@ -150,7 +152,7 @@ public final class Engine String alias; int count = 0; boolean algorithmFound = false; - StringBuilder sb = new StringBuilder(); + CPStringBuilder sb = new CPStringBuilder(); while (enumer.hasMoreElements()) { key = (String) enumer.nextElement(); diff --git a/libjava/classpath/gnu/java/security/OID.java b/libjava/classpath/gnu/java/security/OID.java index f61cf0fc37c..a3d70e22019 100644 --- a/libjava/classpath/gnu/java/security/OID.java +++ b/libjava/classpath/gnu/java/security/OID.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.der.DEREncodingException; import java.io.ByteArrayOutputStream; @@ -359,7 +361,7 @@ public class OID implements Cloneable, Comparable, java.io.Serializable return strRep; else { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); for (int i = 0; i < components.length; i++) { buf.append((long) components[i] & 0xFFFFFFFFL); diff --git a/libjava/classpath/gnu/java/security/PolicyFile.java b/libjava/classpath/gnu/java/security/PolicyFile.java index 8da3a7d72fe..e9c811644df 100644 --- a/libjava/classpath/gnu/java/security/PolicyFile.java +++ b/libjava/classpath/gnu/java/security/PolicyFile.java @@ -39,6 +39,8 @@ package gnu.java.security; import gnu.classpath.debug.Component; import gnu.classpath.debug.SystemLogger; + +import gnu.java.lang.CPStringBuilder; import gnu.java.security.action.GetPropertyAction; import java.io.File; @@ -150,7 +152,7 @@ public final class PolicyFile extends Policy protected static final Logger logger = SystemLogger.SYSTEM; // Added to cut redundant AccessController.doPrivileged calls - private static GetPropertyAction prop = new GetPropertyAction("file.seperator"); + private static GetPropertyAction prop = new GetPropertyAction("file.separator"); private static final String fs = (String) AccessController.doPrivileged(prop); private static final String DEFAULT_POLICY = @@ -629,8 +631,8 @@ public final class PolicyFile extends Policy */ private static String expand(final String s) { - final StringBuffer result = new StringBuffer(); - final StringBuffer prop = new StringBuffer(); + final CPStringBuilder result = new CPStringBuilder(); + final CPStringBuilder prop = new CPStringBuilder(); int state = 0; for (int i = 0; i < s.length(); i++) { diff --git a/libjava/classpath/gnu/java/security/der/BitString.java b/libjava/classpath/gnu/java/security/der/BitString.java index 02b1c037762..ac10be22e6b 100644 --- a/libjava/classpath/gnu/java/security/der/BitString.java +++ b/libjava/classpath/gnu/java/security/der/BitString.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.der; +import gnu.java.lang.CPStringBuilder; + import java.math.BigInteger; import java.util.Arrays; @@ -314,7 +316,7 @@ public class BitString implements Cloneable, Comparable public String toString() { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); for (int i = 0, j = 7, k = 0; i < size(); i++) { sb.append((bytes[k] & 1 << j) != 0 ? "1" : "0"); diff --git a/libjava/classpath/gnu/java/security/der/DERReader.java b/libjava/classpath/gnu/java/security/der/DERReader.java index 09ec1e2dff0..cd552c8bedd 100644 --- a/libjava/classpath/gnu/java/security/der/DERReader.java +++ b/libjava/classpath/gnu/java/security/der/DERReader.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.der; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.OID; import java.io.BufferedInputStream; @@ -286,7 +288,7 @@ public class DERReader implements DER private static String fromIso88591(byte[] bytes) { - StringBuffer str = new StringBuffer(bytes.length); + CPStringBuilder str = new CPStringBuilder(bytes.length); for (int i = 0; i < bytes.length; i++) str.append((char) (bytes[i] & 0xFF)); return str.toString(); @@ -296,7 +298,7 @@ public class DERReader implements DER { if ((bytes.length & 0x01) != 0) throw new IOException("UTF-16 bytes are odd in length"); - StringBuffer str = new StringBuffer(bytes.length / 2); + CPStringBuilder str = new CPStringBuilder(bytes.length / 2); for (int i = 0; i < bytes.length; i += 2) { char c = (char) ((bytes[i] << 8) & 0xFF); @@ -308,7 +310,7 @@ public class DERReader implements DER private static String fromUtf8(byte[] bytes) throws IOException { - StringBuffer str = new StringBuffer((int)(bytes.length / 1.5)); + CPStringBuilder str = new CPStringBuilder((int)(bytes.length / 1.5)); for (int i = 0; i < bytes.length; ) { char c = 0; diff --git a/libjava/classpath/gnu/java/security/hash/Whirlpool.java b/libjava/classpath/gnu/java/security/hash/Whirlpool.java index 89df5c51bf3..aebe1acb699 100644 --- a/libjava/classpath/gnu/java/security/hash/Whirlpool.java +++ b/libjava/classpath/gnu/java/security/hash/Whirlpool.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.hash; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import gnu.java.security.Registry; import gnu.java.security.util.Util; @@ -177,10 +179,10 @@ public final class Whirlpool { log.fine("Static data"); log.fine("T0[]:"); - StringBuilder sb; + CPStringBuilder sb; for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T0[i * 4 + j])).append(", "); @@ -189,7 +191,7 @@ public final class Whirlpool log.fine("T1[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T1[i * 4 + j])).append(", "); @@ -198,7 +200,7 @@ public final class Whirlpool log.fine("T2[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T2[i * 4 + j])).append(", "); @@ -207,7 +209,7 @@ public final class Whirlpool log.fine("T3[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T3[i * 4 + j])).append(", "); @@ -216,7 +218,7 @@ public final class Whirlpool log.fine("\nT4[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T4[i * 4 + j])).append(", "); @@ -225,7 +227,7 @@ public final class Whirlpool log.fine("T5[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T5[i * 4 + j])).append(", "); @@ -234,7 +236,7 @@ public final class Whirlpool log.fine("T6[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T5[i * 4 + j])).append(", "); @@ -243,7 +245,7 @@ public final class Whirlpool log.fine("T7[]:"); for (i = 0; i < 64; i++) { - sb = new StringBuilder(); + sb = new CPStringBuilder(); for (j = 0; j < 4; j++) sb.append("0x").append(Util.toString(T5[i * 4 + j])).append(", "); diff --git a/libjava/classpath/gnu/java/security/jce/sig/DSSParameters.java b/libjava/classpath/gnu/java/security/jce/sig/DSSParameters.java index eaccb009551..8a1cb4ca502 100644 --- a/libjava/classpath/gnu/java/security/jce/sig/DSSParameters.java +++ b/libjava/classpath/gnu/java/security/jce/sig/DSSParameters.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.jce.sig; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.der.DER; import gnu.java.security.der.DERReader; @@ -195,7 +197,7 @@ public class DSSParameters protected String engineToString() { - StringBuffer sb = new StringBuffer("p="); + CPStringBuilder sb = new CPStringBuilder("p="); if (p == null) sb.append("???"); else diff --git a/libjava/classpath/gnu/java/security/key/dss/DSSKey.java b/libjava/classpath/gnu/java/security/key/dss/DSSKey.java index 657de8dd02d..d4cf36513eb 100644 --- a/libjava/classpath/gnu/java/security/key/dss/DSSKey.java +++ b/libjava/classpath/gnu/java/security/key/dss/DSSKey.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.key.dss; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.util.FormatUtil; @@ -181,7 +183,7 @@ public abstract class DSSKey if (str == null) { String ls = (String) AccessController.doPrivileged(new GetPropertyAction("line.separator")); - StringBuilder sb = new StringBuilder(ls) + CPStringBuilder sb = new CPStringBuilder(ls) .append("defaultFormat=").append(defaultFormat).append(",") .append(ls); if (hasInheritedParameters()) diff --git a/libjava/classpath/gnu/java/security/key/dss/DSSPrivateKey.java b/libjava/classpath/gnu/java/security/key/dss/DSSPrivateKey.java index 6ed8de8460d..633fcf7ce08 100644 --- a/libjava/classpath/gnu/java/security/key/dss/DSSPrivateKey.java +++ b/libjava/classpath/gnu/java/security/key/dss/DSSPrivateKey.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.key.dss; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; @@ -191,7 +193,7 @@ public class DSSPrivateKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(this.getClass().getName()).append("(") + str = new CPStringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append("x=0x").append(Configuration.DEBUG ? x.toString(16) : "**...*").append(ls) diff --git a/libjava/classpath/gnu/java/security/key/dss/DSSPublicKey.java b/libjava/classpath/gnu/java/security/key/dss/DSSPublicKey.java index 9e1c4cf0a04..e5c53467176 100644 --- a/libjava/classpath/gnu/java/security/key/dss/DSSPublicKey.java +++ b/libjava/classpath/gnu/java/security/key/dss/DSSPublicKey.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.key.dss; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.key.IKeyPairCodec; @@ -190,7 +192,7 @@ public class DSSPublicKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(this.getClass().getName()).append("(") + str = new CPStringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append("y=0x").append(y.toString(16)).append(ls) .append(")") diff --git a/libjava/classpath/gnu/java/security/key/rsa/GnuRSAKey.java b/libjava/classpath/gnu/java/security/key/rsa/GnuRSAKey.java index 4bdce4011a5..0419ac96ee4 100644 --- a/libjava/classpath/gnu/java/security/key/rsa/GnuRSAKey.java +++ b/libjava/classpath/gnu/java/security/key/rsa/GnuRSAKey.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.key.rsa; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.util.FormatUtil; @@ -163,7 +165,7 @@ public abstract class GnuRSAKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(ls) + str = new CPStringBuilder(ls) .append("defaultFormat=").append(defaultFormat).append(",").append(ls) .append("n=0x").append(n.toString(16)).append(",").append(ls) .append("e=0x").append(e.toString(16)) diff --git a/libjava/classpath/gnu/java/security/key/rsa/GnuRSAPrivateKey.java b/libjava/classpath/gnu/java/security/key/rsa/GnuRSAPrivateKey.java index 00a1b822ad0..e554f2f3f02 100644 --- a/libjava/classpath/gnu/java/security/key/rsa/GnuRSAPrivateKey.java +++ b/libjava/classpath/gnu/java/security/key/rsa/GnuRSAPrivateKey.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.key.rsa; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.Registry; @@ -289,7 +291,7 @@ public class GnuRSAPrivateKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(this.getClass().getName()).append("(") + str = new CPStringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append("d=0x").append(Configuration.DEBUG ? d.toString(16) : "**...*").append(ls) diff --git a/libjava/classpath/gnu/java/security/key/rsa/GnuRSAPublicKey.java b/libjava/classpath/gnu/java/security/key/rsa/GnuRSAPublicKey.java index fe28d0ba3b0..3217130c258 100644 --- a/libjava/classpath/gnu/java/security/key/rsa/GnuRSAPublicKey.java +++ b/libjava/classpath/gnu/java/security/key/rsa/GnuRSAPublicKey.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.key.rsa; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.action.GetPropertyAction; import gnu.java.security.key.IKeyPairCodec; @@ -178,7 +180,7 @@ public class GnuRSAPublicKey { String ls = (String) AccessController.doPrivileged (new GetPropertyAction("line.separator")); - str = new StringBuilder(this.getClass().getName()).append("(") + str = new CPStringBuilder(this.getClass().getName()).append("(") .append(super.toString()).append(",").append(ls) .append(")") .toString(); diff --git a/libjava/classpath/gnu/java/security/provider/X509CertificateFactory.java b/libjava/classpath/gnu/java/security/provider/X509CertificateFactory.java index 7d61779f937..64403315672 100644 --- a/libjava/classpath/gnu/java/security/provider/X509CertificateFactory.java +++ b/libjava/classpath/gnu/java/security/provider/X509CertificateFactory.java @@ -39,6 +39,7 @@ exception statement from your version. */ package gnu.java.security.provider; import gnu.java.io.Base64InputStream; +import gnu.java.lang.CPStringBuilder; import gnu.java.security.x509.X509CRL; import gnu.java.security.x509.X509CertPath; import gnu.java.security.x509.X509Certificate; @@ -193,7 +194,7 @@ public class X509CertificateFactory if (i != 0x30) { inStream.reset(); - StringBuffer line = new StringBuffer(80); + CPStringBuilder line = new CPStringBuilder(80); do { line.setLength(0); @@ -252,7 +253,7 @@ public class X509CertificateFactory if (i != 0x30) { inStream.reset(); - StringBuffer line = new StringBuffer(80); + CPStringBuilder line = new CPStringBuilder(80); do { line.setLength(0); diff --git a/libjava/classpath/gnu/java/security/util/ByteArray.java b/libjava/classpath/gnu/java/security/util/ByteArray.java index 0d04d9127ae..51449204397 100644 --- a/libjava/classpath/gnu/java/security/util/ByteArray.java +++ b/libjava/classpath/gnu/java/security/util/ByteArray.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.util; +import gnu.java.lang.CPStringBuilder; + import java.io.PrintWriter; import java.io.StringWriter; @@ -86,7 +88,7 @@ public final class ByteArray public static String toHexString (byte[] buf, int off, int len, char sep) { - StringBuffer str = new StringBuffer(); + CPStringBuilder str = new CPStringBuilder(); for (int i = 0; i < len; i++) { str.append (Character.forDigit (buf[i+off] >>> 4 & 0x0F, 16)); @@ -100,7 +102,7 @@ public final class ByteArray public static String formatInt (int value, int radix, int len) { String s = Integer.toString (value, radix); - StringBuffer buf = new StringBuffer (); + CPStringBuilder buf = new CPStringBuilder (); for (int j = 0; j < len - s.length(); j++) buf.append ("0"); buf.append (s); diff --git a/libjava/classpath/gnu/java/security/util/Util.java b/libjava/classpath/gnu/java/security/util/Util.java index c7a6810fba3..50d4466d539 100644 --- a/libjava/classpath/gnu/java/security/util/Util.java +++ b/libjava/classpath/gnu/java/security/util/Util.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.util; +import gnu.java.lang.CPStringBuilder; + import java.math.BigInteger; /** @@ -296,7 +298,7 @@ public class Util */ public static final String toUnicodeString(byte[] ba, int offset, int length) { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); int i = 0; int j = 0; int k; @@ -328,7 +330,7 @@ public class Util */ public static String toUnicodeString(int[] ia) { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); int i = 0; int j = 0; int k; @@ -385,7 +387,7 @@ public class Util { if (data == null) return m + "null\n"; - StringBuffer sb = new StringBuffer(length * 3); + CPStringBuilder sb = new CPStringBuilder(length * 3); if (length > 32) sb.append(m).append("Hexadecimal dump of ") .append(length).append(" bytes...\n"); @@ -466,7 +468,7 @@ public class Util b2 = buffer[1]; break; } - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); int c; boolean notleading = false; do diff --git a/libjava/classpath/gnu/java/security/x509/PolicyNodeImpl.java b/libjava/classpath/gnu/java/security/x509/PolicyNodeImpl.java index 72cb4a9ea91..60d35574d01 100644 --- a/libjava/classpath/gnu/java/security/x509/PolicyNodeImpl.java +++ b/libjava/classpath/gnu/java/security/x509/PolicyNodeImpl.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.x509; +import gnu.java.lang.CPStringBuilder; + import java.security.cert.PolicyNode; import java.security.cert.PolicyQualifierInfo; @@ -186,7 +188,7 @@ public final class PolicyNodeImpl implements PolicyNode public String toString() { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); for (int i = 0; i < depth; i++) buf.append(" "); buf.append("("); diff --git a/libjava/classpath/gnu/java/security/x509/Util.java b/libjava/classpath/gnu/java/security/x509/Util.java index 1bd268a51e2..7b6c89f6aac 100644 --- a/libjava/classpath/gnu/java/security/x509/Util.java +++ b/libjava/classpath/gnu/java/security/x509/Util.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.x509; +import gnu.java.lang.CPStringBuilder; + /** * A collection of useful class methods. * @@ -65,7 +67,7 @@ public final class Util */ public static String toHexString(byte[] buf, int off, int len) { - StringBuffer str = new StringBuffer(); + CPStringBuilder str = new CPStringBuilder(); for (int i = 0; i < len; i++) { str.append(HEX.charAt(buf[i+off] >>> 4 & 0x0F)); @@ -94,7 +96,7 @@ public final class Util */ public static String toHexString(byte[] buf, int off, int len, char sep) { - StringBuffer str = new StringBuffer(); + CPStringBuilder str = new CPStringBuilder(); for (int i = 0; i < len; i++) { str.append(HEX.charAt(buf[i+off] >>> 4 & 0x0F)); @@ -130,7 +132,7 @@ public final class Util public static String hexDump(byte[] buf, int off, int len, String prefix) { String nl = System.getProperty("line.separator"); - StringBuffer str = new StringBuffer(); + CPStringBuilder str = new CPStringBuilder(); int i = 0; while (i < len) { @@ -174,7 +176,7 @@ public final class Util public static String formatInt(int i, int radix, int len) { String s = Integer.toString(i, radix); - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); for (int j = 0; j < len - s.length(); j++) buf.append("0"); buf.append(s); diff --git a/libjava/classpath/gnu/java/security/x509/X500DistinguishedName.java b/libjava/classpath/gnu/java/security/x509/X500DistinguishedName.java index 02adad7d2fd..e2e05c57e4b 100644 --- a/libjava/classpath/gnu/java/security/x509/X500DistinguishedName.java +++ b/libjava/classpath/gnu/java/security/x509/X500DistinguishedName.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.security.x509; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.OID; import gnu.java.security.der.DER; import gnu.java.security.der.DERReader; @@ -285,7 +287,7 @@ public class X500DistinguishedName implements Principal { if (fixed && stringRep != null) return stringRep; - StringBuffer str = new StringBuffer(); + CPStringBuilder str = new CPStringBuilder(); for (Iterator it = components.iterator(); it.hasNext(); ) { Map m = (Map) it.next(); @@ -377,7 +379,7 @@ public class X500DistinguishedName implements Principal private String readAttributeType(Reader in) throws IOException { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); int ch; while ((ch = in.read()) != '=') { @@ -399,7 +401,7 @@ public class X500DistinguishedName implements Principal private String readAttributeValue(Reader in) throws IOException { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); int ch = in.read(); if (ch == '#') { @@ -537,7 +539,7 @@ public class X500DistinguishedName implements Principal private static String compressWS(String str) { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); char lastChar = 0; for (int i = 0; i < str.length(); i++) { diff --git a/libjava/classpath/gnu/java/text/AttributedFormatBuffer.java b/libjava/classpath/gnu/java/text/AttributedFormatBuffer.java index ae3e6ef706c..c2aae96092a 100644 --- a/libjava/classpath/gnu/java/text/AttributedFormatBuffer.java +++ b/libjava/classpath/gnu/java/text/AttributedFormatBuffer.java @@ -36,21 +36,25 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package gnu.java.text; +import gnu.java.lang.CPStringBuilder; + import java.text.AttributedCharacterIterator; import java.util.ArrayList; import java.util.HashMap; /** * This class is an implementation of a FormatBuffer with attributes. - * + * Note that this class is not thread-safe; external synchronisation + * should be used if an instance is to be accessed from multiple threads. + * * @author Guilhem Lavaux * @date April 10, 2004 */ public class AttributedFormatBuffer implements FormatBuffer { - private StringBuffer buffer; - private ArrayList ranges; - private ArrayList attributes; + private final CPStringBuilder buffer; + private final ArrayList ranges; + private final ArrayList attributes; private int[] a_ranges; private HashMap[] a_attributes; private int startingRange; @@ -60,9 +64,9 @@ public class AttributedFormatBuffer implements FormatBuffer * This constructor accepts a StringBuffer. If the buffer contains * already some characters they will not be attributed. */ - public AttributedFormatBuffer(StringBuffer buffer) + public AttributedFormatBuffer(CPStringBuilder buffer) { - this.buffer = buffer; + this.buffer = new CPStringBuilder(buffer); this.ranges = new ArrayList(); this.attributes = new ArrayList(); this.defaultAttr = null; @@ -77,7 +81,7 @@ public class AttributedFormatBuffer implements FormatBuffer public AttributedFormatBuffer(int prebuffer) { - this(new StringBuffer(prebuffer)); + this(new CPStringBuilder(prebuffer)); } public AttributedFormatBuffer() @@ -214,12 +218,12 @@ public class AttributedFormatBuffer implements FormatBuffer } /** - * This method returns the internal StringBuffer describing + * This method returns the internal CPStringBuilder describing * the attributed string. * - * @return An instance of StringBuffer which contains the string. + * @return An instance of CPStringBuilder which contains the string. */ - public StringBuffer getBuffer() + public CPStringBuilder getBuffer() { return buffer; } diff --git a/libjava/classpath/gnu/java/text/StringFormatBuffer.java b/libjava/classpath/gnu/java/text/StringFormatBuffer.java index 19b621ce4fd..fc8d08ee6f8 100644 --- a/libjava/classpath/gnu/java/text/StringFormatBuffer.java +++ b/libjava/classpath/gnu/java/text/StringFormatBuffer.java @@ -47,7 +47,7 @@ import java.util.HashMap; */ public class StringFormatBuffer implements FormatBuffer { - private StringBuffer buffer; + private final StringBuffer buffer; private AttributedCharacterIterator.Attribute defaultAttr; public StringFormatBuffer(int prebuffer) diff --git a/libjava/classpath/gnu/java/util/Base64.java b/libjava/classpath/gnu/java/util/Base64.java index 592696bcc80..4401a151a36 100644 --- a/libjava/classpath/gnu/java/util/Base64.java +++ b/libjava/classpath/gnu/java/util/Base64.java @@ -83,6 +83,8 @@ DAMAGES. */ package gnu.java.util; +import gnu.java.lang.CPStringBuilder; + import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -143,7 +145,7 @@ public final class Base64 int srcLength = buf.length - offset; byte[] input = new byte[3]; int[] output = new int[4]; - StringBuffer out = new StringBuffer(); + CPStringBuilder out = new CPStringBuilder(); int i = offset; int chars = 0; diff --git a/libjava/classpath/gnu/java/util/EmptyEnumeration.java b/libjava/classpath/gnu/java/util/EmptyEnumeration.java index 46a82d6cb53..ca2c56d7335 100644 --- a/libjava/classpath/gnu/java/util/EmptyEnumeration.java +++ b/libjava/classpath/gnu/java/util/EmptyEnumeration.java @@ -51,25 +51,19 @@ import java.util.NoSuchElementException; * * @author Mark Wielaard (mark@klomp.org) */ -public final class EmptyEnumeration implements Enumeration, Serializable +public final class EmptyEnumeration implements Enumeration, Serializable { /** The only instance of this class */ - private static final EmptyEnumeration instance = new EmptyEnumeration(); + private static final EmptyEnumeration instance = + new EmptyEnumeration(); /** - * Private constructor that creates a new empty Enumeration. - */ - private EmptyEnumeration() - { - } - - /** - * Returns the only instance of this class. + * Returns an instance of this class for Object. * It can be shared by multiple objects and threads. * * @return the common empty enumeration */ - public static EmptyEnumeration getInstance() + public static EmptyEnumeration getInstance() { return instance; } @@ -89,7 +83,7 @@ public final class EmptyEnumeration implements Enumeration, Serializable * * @throws NoSuchElementException this is empty */ - public Object nextElement() + public T nextElement() { throw new NoSuchElementException(); } diff --git a/libjava/classpath/gnu/java/util/prefs/EventDispatcher.java b/libjava/classpath/gnu/java/util/prefs/EventDispatcher.java deleted file mode 100644 index f73c3e70311..00000000000 --- a/libjava/classpath/gnu/java/util/prefs/EventDispatcher.java +++ /dev/null @@ -1,113 +0,0 @@ -/* EventDispatcher.java -- Dispatch events for prefs - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.java.util.prefs; - -import java.util.ArrayList; - -/** - * This is a helper class used for dispatching events for - * the prefs package. - */ -public class EventDispatcher extends Thread -{ - // This is a singleton class. We dispatch all events via a - // new Thread which is created on demand. - private static final Thread dispatchThread = new EventDispatcher(); - - // This is a queue of events to dispatch. This thread waits on - // the queue and when notified will remove events until the queue - // is empty. - private static final ArrayList queue = new ArrayList(); - - // FIXME: this thread probably ought to go in some classpath-internal - // ThreadGroup. But we don't have that yet. - private EventDispatcher() - { - setDaemon(true); - start(); - } - - public void run() - { - while (true) - { - Runnable r; - synchronized (queue) - { - while (queue.size() == 0) - { - try - { - queue.wait(); - } - catch (InterruptedException _) - { - // Ignore. - } - } - r = queue.remove(0); - } - // Invoke outside the synchronization, so that - // we aren't blocking other threads from posting events. - try - { - r.run(); - } - catch (Throwable _) - { - // Ignore. - } - } - } - - /** - * Add a new runnable to the event dispatch queue. The - * runnable will be invoked in the event dispatch queue - * without any locks held. - * @param runner the Runnable to dispatch - */ - public static void dispatch(Runnable runner) - { - synchronized (queue) - { - queue.add(runner); - queue.notify(); - } - } -} diff --git a/libjava/classpath/gnu/java/util/prefs/GConfBasedPreferences.java b/libjava/classpath/gnu/java/util/prefs/GConfBasedPreferences.java index 0fd4df36616..c26fe63c9b6 100644 --- a/libjava/classpath/gnu/java/util/prefs/GConfBasedPreferences.java +++ b/libjava/classpath/gnu/java/util/prefs/GConfBasedPreferences.java @@ -165,11 +165,7 @@ public class GConfBasedPreferences GConfBasedPreferences preferenceNode = new GConfBasedPreferences(this, name, this.isUser); - - // register the node for to GConf so that it can listen - // events outside the scope of the application - backend.startWatchingNode(this.node); - + return preferenceNode; } diff --git a/libjava/classpath/gnu/java/util/prefs/NodeWriter.java b/libjava/classpath/gnu/java/util/prefs/NodeWriter.java index 231c047da06..d3c09535147 100644 --- a/libjava/classpath/gnu/java/util/prefs/NodeWriter.java +++ b/libjava/classpath/gnu/java/util/prefs/NodeWriter.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.java.util.prefs; +import gnu.java.lang.CPStringBuilder; + import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStream; @@ -273,7 +275,7 @@ public class NodeWriter { throws BackingStoreException, IOException { // construct String used for indentation - StringBuffer indentBuffer = new StringBuffer(2*indent); + CPStringBuilder indentBuffer = new CPStringBuilder(2*indent); for (int i=0; i < indent; i++) indentBuffer.append(" "); String indentString = indentBuffer.toString(); diff --git a/libjava/classpath/gnu/java/util/prefs/gconf/GConfNativePeer.java b/libjava/classpath/gnu/java/util/prefs/gconf/GConfNativePeer.java index 5e12c718b2c..3c029195989 100644 --- a/libjava/classpath/gnu/java/util/prefs/gconf/GConfNativePeer.java +++ b/libjava/classpath/gnu/java/util/prefs/gconf/GConfNativePeer.java @@ -49,19 +49,11 @@ import java.util.prefs.BackingStoreException; public final class GConfNativePeer { /** - * Object to achieve locks for methods that need to be synchronized. - */ - private static final Object[] semaphore = new Object[0]; - - /** * Creates a new instance of GConfNativePeer */ public GConfNativePeer() { - synchronized (semaphore) - { - init_class(); - } + init_class(); } /** @@ -72,31 +64,7 @@ public final class GConfNativePeer */ public boolean nodeExist(String node) { - return gconf_client_dir_exists(node); - } - - /** - * Add the node node to the list of nodes the GConf will watch. - * An event is raised everytime this node is changed. You can add a node - * multiple times. - * - * @param node the node to track. - */ - public void startWatchingNode(String node) - { - gconf_client_add_dir(node); - } - - /** - * Remove the node node to the list of nodes the GConf is - * watching. Note that if a node has been added multiple times, you must - * remove it the same number of times before the remove takes effect. - * - * @param node the node you don't want to track anymore. - */ - public void stopWatchingNode(String node) - { - gconf_client_remove_dir(node); + return gconf_dir_exists(node); } /** @@ -111,7 +79,7 @@ public final class GConfNativePeer */ public boolean setString(String key, String value) { - return gconf_client_set_string(key, value); + return gconf_set_string(key, value); } /** @@ -124,7 +92,7 @@ public final class GConfNativePeer */ public boolean unset(String key) { - return gconf_client_unset(key); + return gconf_unset(key); } /** @@ -135,7 +103,7 @@ public final class GConfNativePeer */ public String getKey(String key) { - return gconf_client_get_string(key); + return gconf_get_string(key); } /** @@ -149,7 +117,7 @@ public final class GConfNativePeer */ public List getKeys(String node) throws BackingStoreException { - return gconf_client_all_keys(node); + return gconf_all_keys(node); } /** @@ -161,7 +129,7 @@ public final class GConfNativePeer */ public List getChildrenNodes(String node) throws BackingStoreException { - return gconf_client_all_nodes(node); + return gconf_all_nodes(node); } /** @@ -185,17 +153,14 @@ public final class GConfNativePeer */ public void suggestSync() throws BackingStoreException { - gconf_client_suggest_sync(); + gconf_suggest_sync(); } protected void finalize() throws Throwable { try { - synchronized (semaphore) - { - finalize_class(); - } + finalize_class(); } finally { @@ -215,18 +180,18 @@ public final class GConfNativePeer * Initialize the GConf native peer and enable the object cache. * It is meant to be used by the static initializer. */ - native static final private void init_id_cache(); + native synchronized static final private void init_id_cache(); /** * Initialize the GConf native peer. This is meant to be used by the * class constructor. */ - native static final private void init_class(); + native synchronized static final private void init_class(); /** * Class finalizer. */ - native static final private void finalize_class(); + native synchronized static final private void finalize_class(); /** * Queries the GConf database to see if the given node exists, returning @@ -235,23 +200,8 @@ public final class GConfNativePeer * @param node the node to query for existence. * @return true if the node exist, false otherwise. */ - native static final protected boolean gconf_client_dir_exists(String node); - - /** - * Adds the given node to the list of nodes that GConf watches for - * changes. - * - * @param node the node to watch for changes. - */ - native static final protected void gconf_client_add_dir(String node); - - /** - * Removes the given node from the list of nodes that GConf watches for - * changes. - * - * @param node the node to remove from from the list of watched nodes. - */ - native static final protected void gconf_client_remove_dir(String node); + native synchronized + static final protected boolean gconf_dir_exists(String node); /** * Sets the given key/value pair into the GConf database. @@ -261,8 +211,8 @@ public final class GConfNativePeer * @param value the value to associate to the given key. * @return true if the change has effect, false otherwise. */ - native static final protected boolean gconf_client_set_string(String key, - String value); + native synchronized + static final protected boolean gconf_set_string(String key, String value); /** * Returns the key associated to the given key. Null is returned if the @@ -271,7 +221,8 @@ public final class GConfNativePeer * @param key the key to return the value of. * @return The value associated to the given key, or null. */ - native static final protected String gconf_client_get_string(String key); + native synchronized + static final protected String gconf_get_string(String key); /** * Usets the given key, removing the key from the database. @@ -279,13 +230,13 @@ public final class GConfNativePeer * @param key the key to remove. * @return true if the operation success, false otherwise. */ - native static final protected boolean gconf_client_unset(String key); + native synchronized static final protected boolean gconf_unset(String key); /** * Suggest to the GConf native peer a sync with the database. * */ - native static final protected void gconf_client_suggest_sync() + native synchronized static final protected void gconf_suggest_sync() throws BackingStoreException; /** @@ -295,7 +246,7 @@ public final class GConfNativePeer * @return A list of nodes under the given source node. */ native - static final protected List gconf_client_all_nodes(String node) + static synchronized final protected List gconf_all_nodes(String node) throws BackingStoreException; /** @@ -304,8 +255,8 @@ public final class GConfNativePeer * @param node the source node. * @return A list of all keys stored in the given node. */ - native - static final protected List gconf_client_all_keys(String node) + native synchronized + static final protected List gconf_all_keys(String node) throws BackingStoreException; /** @@ -314,7 +265,7 @@ public final class GConfNativePeer * @param plain the String to escape. * @return An escaped String for use with GConf. */ - native + native synchronized static final protected String gconf_escape_key(String plain); /** @@ -324,7 +275,7 @@ public final class GConfNativePeer * @param escaped key as returned by gconf_escape_key * @return An unescaped key. */ - native + native synchronized static final protected String gconf_unescape_key(String escaped); static diff --git a/libjava/classpath/gnu/java/util/regex/BacktrackStack.java b/libjava/classpath/gnu/java/util/regex/BacktrackStack.java index d711945e43b..68472615e6a 100644 --- a/libjava/classpath/gnu/java/util/regex/BacktrackStack.java +++ b/libjava/classpath/gnu/java/util/regex/BacktrackStack.java @@ -44,69 +44,81 @@ package gnu.java.util.regex; * * @author Ito Kazumitsu */ -final class BacktrackStack { +final class BacktrackStack +{ /** A set of data to be used for backtracking. */ - static class Backtrack { - /** REToken to which to go back */ - REToken token; + static class Backtrack + { + /** REToken to which to go back */ + REToken token; /** CharIndexed on which matches are being searched for. */ - CharIndexed input; + CharIndexed input; /** REMatch to be used by the REToken token. */ - REMatch match; + REMatch match; /** Some parameter used by the token's backtrack method. */ - Object param; - Backtrack(REToken token, CharIndexed input, REMatch match, Object param) { - this.token = token; - this.input = input; - // REMatch may change before backtracking is needed. So we - // keep a clone of it. - this.match = (REMatch) match.clone(); - this.param = param; - } - } - - Backtrack[] stack; - private int size; - private int capacity; - private static final int INITIAL_CAPACITY = 32; - private static final int CAPACITY_INCREMENT = 16; - - BacktrackStack() { - stack = new Backtrack[INITIAL_CAPACITY]; - size = 0; - capacity = INITIAL_CAPACITY; - } - - boolean empty() { - return size == 0; - } - - Backtrack peek() { - return stack[size - 1]; - } - - Backtrack pop() { - Backtrack bt = stack[--size]; - stack[size] = null; - return bt; - } - - void clear() { - for (int i = 0; i < size; i++) { - stack[i] = null; - } - size = 0; - } - - void push(Backtrack bt) { - if (size >= capacity) { - capacity += CAPACITY_INCREMENT; - Backtrack[] newStack = new Backtrack[capacity]; - System.arraycopy(stack, 0, newStack, 0, size); - stack = newStack; - } - stack[size++] = bt; + Object param; + Backtrack (REToken token, CharIndexed input, REMatch match, + Object param) + { + this.token = token; + this.input = input; + // REMatch may change before backtracking is needed. So we + // keep a clone of it. + this.match = (REMatch) match.clone (); + this.param = param; } + } + + Backtrack[] stack; + private int size; + private int capacity; + private static final int INITIAL_CAPACITY = 32; + private static final int CAPACITY_INCREMENT = 16; + + BacktrackStack () + { + stack = new Backtrack[INITIAL_CAPACITY]; + size = 0; + capacity = INITIAL_CAPACITY; + } + + boolean empty () + { + return size == 0; + } + + Backtrack peek () + { + return stack[size - 1]; + } + + Backtrack pop () + { + Backtrack bt = stack[--size]; + stack[size] = null; + return bt; + } + + void clear () + { + for (int i = 0; i < size; i++) + { + stack[i] = null; + } + size = 0; + } + + void push (Backtrack bt) + { + if (size >= capacity) + { + capacity += CAPACITY_INCREMENT; + Backtrack[]newStack = new Backtrack[capacity]; + System.arraycopy (stack, 0, newStack, 0, size); + stack = newStack; + } + stack[size++] = bt; + } } diff --git a/libjava/classpath/gnu/java/util/regex/CharIndexed.java b/libjava/classpath/gnu/java/util/regex/CharIndexed.java index 27e07b2f8ff..070547d7feb 100644 --- a/libjava/classpath/gnu/java/util/regex/CharIndexed.java +++ b/libjava/classpath/gnu/java/util/regex/CharIndexed.java @@ -48,13 +48,14 @@ package gnu.java.util.regex; * * @author Wes Biggs */ -public interface CharIndexed { +public interface CharIndexed +{ /** * Defines a constant (0xFFFF was somewhat arbitrarily chosen) * that can be returned by the charAt() function indicating that * the specified index is out of range. */ - char OUT_OF_BOUNDS = '\uFFFF'; + char OUT_OF_BOUNDS = '\uFFFF'; /** * Returns the character at the given offset past the current cursor @@ -68,66 +69,66 @@ public interface CharIndexed { * @return the character at the specified index, or the OUT_OF_BOUNDS * character defined by this interface. */ - char charAt(int index); + char charAt (int index); /** * Shifts the input buffer by a given number of positions. Returns * true if the new cursor position is valid. */ - boolean move(int index); + boolean move (int index); /** * Shifts the input buffer by a given number of positions. Returns * true if the new cursor position is valid or cursor position is at * the end of input. */ - boolean move1(int index); // I cannot think of a better name for this. + boolean move1 (int index); // I cannot think of a better name for this. /** * Returns true if the most recent move() operation placed the cursor * position at a valid position in the input. */ - boolean isValid(); + boolean isValid (); /** * Returns another CharIndexed containing length characters to the left * of the given index. The given length is an expected maximum and * the returned CharIndexed may not necessarily contain so many characters. */ - CharIndexed lookBehind(int index, int length); + CharIndexed lookBehind (int index, int length); /** * Returns the effective length of this CharIndexed */ - int length(); + int length (); /** * Sets the REMatch last found on this input. */ - void setLastMatch(REMatch match); + void setLastMatch (REMatch match); /** * Returns the REMatch last found on this input. */ - REMatch getLastMatch(); + REMatch getLastMatch (); /** * Sets the information used for hitEnd(). */ - void setHitEnd(REMatch match); + void setHitEnd (REMatch match); /** * Returns whether the matcher has hit the end of input. */ - boolean hitEnd(); + boolean hitEnd (); /** * Returns the anchor. */ - int getAnchor(); + int getAnchor (); /** * Sets the anchor. */ - void setAnchor(int anchor); + void setAnchor (int anchor); } diff --git a/libjava/classpath/gnu/java/util/regex/CharIndexedCharArray.java b/libjava/classpath/gnu/java/util/regex/CharIndexedCharArray.java index 6f74c992f8f..565773837e8 100644 --- a/libjava/classpath/gnu/java/util/regex/CharIndexedCharArray.java +++ b/libjava/classpath/gnu/java/util/regex/CharIndexedCharArray.java @@ -38,9 +38,11 @@ exception statement from your version. */ package gnu.java.util.regex; import java.nio.CharBuffer; -class CharIndexedCharArray extends CharIndexedCharSequence { - - CharIndexedCharArray(char[] str, int index) { - super(CharBuffer.wrap(str), index); - } +class CharIndexedCharArray extends CharIndexedCharSequence +{ + + CharIndexedCharArray (char[]str, int index) + { + super (CharBuffer.wrap (str), index); + } } diff --git a/libjava/classpath/gnu/java/util/regex/CharIndexedCharSequence.java b/libjava/classpath/gnu/java/util/regex/CharIndexedCharSequence.java index 8a0578eb80f..bc3cbbd1d72 100644 --- a/libjava/classpath/gnu/java/util/regex/CharIndexedCharSequence.java +++ b/libjava/classpath/gnu/java/util/regex/CharIndexedCharSequence.java @@ -38,58 +38,82 @@ exception statement from your version. */ package gnu.java.util.regex; import java.io.Serializable; -class CharIndexedCharSequence implements CharIndexed, Serializable { - private CharSequence s; - private int anchor; - private int len; - - CharIndexedCharSequence(CharSequence s, int index) { - this.s = s; - len = s.length(); - anchor = index; - } - - public char charAt(int index) { - int pos = anchor + index; - return ((pos < len) && (pos >= 0)) ? s.charAt(pos) : OUT_OF_BOUNDS; - } - - public boolean isValid() { - return (anchor < len); - } - - public boolean move(int index) { - return ((anchor += index) < len); - } - - public boolean move1(int index) { - return ((anchor += index) <= len); - } - - public CharIndexed lookBehind(int index, int length) { - if (length > (anchor + index)) length = anchor + index; - return new CharIndexedCharSequence(s, anchor + index - length); - } - - public int length() { - return len - anchor; - } - - private REMatch lastMatch; - public void setLastMatch(REMatch match) { - lastMatch = (REMatch)match.clone(); - lastMatch.anchor = anchor; - } - public REMatch getLastMatch() { return lastMatch; } - - private int rightmostTriedPosition = 0; - public void setHitEnd(REMatch match) { - int pos = anchor + match.index; - if (pos > rightmostTriedPosition) rightmostTriedPosition = pos; - } - public boolean hitEnd() { return rightmostTriedPosition >= len; } - - public int getAnchor() { return anchor; } - public void setAnchor(int anchor) { this.anchor = anchor; } +class CharIndexedCharSequence implements CharIndexed, Serializable +{ + private CharSequence s; + private int anchor; + private int len; + + CharIndexedCharSequence (CharSequence s, int index) + { + this.s = s; + len = s.length (); + anchor = index; + } + + public char charAt (int index) + { + int pos = anchor + index; + return ((pos < len) && (pos >= 0)) ? s.charAt (pos) : OUT_OF_BOUNDS; + } + + public boolean isValid () + { + return (anchor < len); + } + + public boolean move (int index) + { + return ((anchor += index) < len); + } + + public boolean move1 (int index) + { + return ((anchor += index) <= len); + } + + public CharIndexed lookBehind (int index, int length) + { + if (length > (anchor + index)) + length = anchor + index; + return new CharIndexedCharSequence (s, anchor + index - length); + } + + public int length () + { + return len - anchor; + } + + private REMatch lastMatch; + public void setLastMatch (REMatch match) + { + lastMatch = (REMatch) match.clone (); + lastMatch.anchor = anchor; + } + public REMatch getLastMatch () + { + return lastMatch; + } + + private int rightmostTriedPosition = 0; + public void setHitEnd (REMatch match) + { + int pos = anchor + match.index; + if (pos > rightmostTriedPosition) + rightmostTriedPosition = pos; + } + public boolean hitEnd () + { + return rightmostTriedPosition >= len; + } + + public int getAnchor () + { + return anchor; + } + public void setAnchor (int anchor) + { + this.anchor = anchor; + } } diff --git a/libjava/classpath/gnu/java/util/regex/CharIndexedInputStream.java b/libjava/classpath/gnu/java/util/regex/CharIndexedInputStream.java dissimilarity index 65% index 844fada51fc..e42710b5de1 100644 --- a/libjava/classpath/gnu/java/util/regex/CharIndexedInputStream.java +++ b/libjava/classpath/gnu/java/util/regex/CharIndexedInputStream.java @@ -1,195 +1,253 @@ -/* gnu/regexp/CharIndexedInputStream.java - Copyright (C) 1998-2001, 2004, 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.java.util.regex; -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.InputStream; - -// TODO: move(x) shouldn't rely on calling next() x times - -class CharIndexedInputStream implements CharIndexed { - private static final int BUFFER_INCREMENT = 1024; - private static final int UNKNOWN = Integer.MAX_VALUE; // value for end - - private BufferedInputStream br; - - // so that we don't try to reset() right away - private int index = -1; - - private int bufsize = BUFFER_INCREMENT; - - private int end = UNKNOWN; - - private char cached = OUT_OF_BOUNDS; - - // Big enough for a \r\n pair - // lookBehind[0] = most recent - // lookBehind[1] = second most recent - private char[] lookBehind = new char[] { OUT_OF_BOUNDS, OUT_OF_BOUNDS }; - - CharIndexedInputStream(InputStream str, int index) { - if (str instanceof BufferedInputStream) br = (BufferedInputStream) str; - else br = new BufferedInputStream(str,BUFFER_INCREMENT); - next(); - if (index > 0) move(index); - } - - private boolean next() { - if (end == 1) return false; - end--; // closer to end - - try { - if (index != -1) { - br.reset(); - } - int i = br.read(); - br.mark(bufsize); - if (i == -1) { - end = 1; - cached = OUT_OF_BOUNDS; - return false; - } - cached = (char) i; - index = 1; - } catch (IOException e) { - e.printStackTrace(); - cached = OUT_OF_BOUNDS; - return false; - } - return true; - } - - public char charAt(int index) { - if (index == 0) { - return cached; - } else if (index >= end) { - return OUT_OF_BOUNDS; - } else if (index == -1) { - return lookBehind[0]; - } else if (index == -2) { - return lookBehind[1]; - } else if (index < -2) { - return OUT_OF_BOUNDS; - } else if (index >= bufsize) { - // Allocate more space in the buffer. - try { - while (bufsize <= index) bufsize += BUFFER_INCREMENT; - br.reset(); - br.mark(bufsize); - br.skip(index-1); - } catch (IOException e) { } - } else if (this.index != index) { - try { - br.reset(); - br.skip(index-1); - } catch (IOException e) { } - } - char ch = OUT_OF_BOUNDS; - - try { - int i = br.read(); - this.index = index+1; // this.index is index of next pos relative to charAt(0) - if (i == -1) { - // set flag that next should fail next time? - end = index; - return ch; - } - ch = (char) i; - } catch (IOException ie) { } - - return ch; - } - - public boolean move(int index) { - // move read position [index] clicks from 'charAt(0)' - boolean retval = true; - while (retval && (index-- > 0)) retval = next(); - return retval; - } - - public boolean isValid() { - return (cached != OUT_OF_BOUNDS); - } - - public CharIndexed lookBehind(int index, int length) { - throw new UnsupportedOperationException( - "difficult to look behind for an input stream"); - } - - public int length() { - throw new UnsupportedOperationException( - "difficult to tell the length for an input stream"); - } - - public void setLastMatch(REMatch match) { - throw new UnsupportedOperationException( - "difficult to support setLastMatch for an input stream"); - } - - public REMatch getLastMatch() { - throw new UnsupportedOperationException( - "difficult to support getLastMatch for an input stream"); - } - - public void setHitEnd(REMatch match) { - throw new UnsupportedOperationException( - "difficult to support setHitEnd for an input stream"); - } - - public boolean hitEnd() { - throw new UnsupportedOperationException( - "difficult to support hitEnd for an input stream"); - } - - public int getAnchor() { - throw new UnsupportedOperationException( - "difficult to support getAnchor for an input stream"); - } - - public void setAnchor(int anchor) { - throw new UnsupportedOperationException( - "difficult to support setAnchor for an input stream"); - } - - public boolean move1(int index) { - throw new UnsupportedOperationException( - "difficult to support move1 for an input stream"); - } - -} - +/* gnu/regexp/CharIndexedInputStream.java + Copyright (C) 1998-2001, 2004, 2006 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.util.regex; +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.InputStream; + +// TODO: move(x) shouldn't rely on calling next() x times + +class CharIndexedInputStream implements CharIndexed +{ + private static final int BUFFER_INCREMENT = 1024; + private static final int UNKNOWN = Integer.MAX_VALUE; // value for end + + private BufferedInputStream br; + + // so that we don't try to reset() right away + private int index = -1; + + private int bufsize = BUFFER_INCREMENT; + + private int end = UNKNOWN; + + private char cached = OUT_OF_BOUNDS; + + // Big enough for a \r\n pair + // lookBehind[0] = most recent + // lookBehind[1] = second most recent + private char[] lookBehind = new char[]{ OUT_OF_BOUNDS, OUT_OF_BOUNDS }; + + CharIndexedInputStream (InputStream str, int index) + { + if (str instanceof BufferedInputStream) + br = (BufferedInputStream) str; + else + br = new BufferedInputStream (str, BUFFER_INCREMENT); + next (); + if (index > 0) + move (index); + } + + private boolean next () + { + if (end == 1) + return false; + end--; // closer to end + + try + { + if (index != -1) + { + br.reset (); + } + int i = br.read (); + br.mark (bufsize); + if (i == -1) + { + end = 1; + cached = OUT_OF_BOUNDS; + return false; + } + cached = (char) i; + index = 1; + } catch (IOException e) + { + e.printStackTrace (); + cached = OUT_OF_BOUNDS; + return false; + } + return true; + } + + public char charAt (int index) + { + if (index == 0) + { + return cached; + } + else if (index >= end) + { + return OUT_OF_BOUNDS; + } + else if (index == -1) + { + return lookBehind[0]; + } + else if (index == -2) + { + return lookBehind[1]; + } + else if (index < -2) + { + return OUT_OF_BOUNDS; + } + else if (index >= bufsize) + { + // Allocate more space in the buffer. + try + { + while (bufsize <= index) + bufsize += BUFFER_INCREMENT; + br.reset (); + br.mark (bufsize); + br.skip (index - 1); + } + catch (IOException e) + { + } + } + else if (this.index != index) + { + try + { + br.reset (); + br.skip (index - 1); + } + catch (IOException e) + { + } + } + char ch = OUT_OF_BOUNDS; + + try + { + int i = br.read (); + this.index = index + 1; // this.index is index of next pos relative to charAt(0) + if (i == -1) + { + // set flag that next should fail next time? + end = index; + return ch; + } + ch = (char) i; + } catch (IOException ie) + { + } + + return ch; + } + + public boolean move (int index) + { + // move read position [index] clicks from 'charAt(0)' + boolean retval = true; + while (retval && (index-- > 0)) + retval = next (); + return retval; + } + + public boolean isValid () + { + return (cached != OUT_OF_BOUNDS); + } + + public CharIndexed lookBehind (int index, int length) + { + throw new + UnsupportedOperationException + ("difficult to look behind for an input stream"); + } + + public int length () + { + throw new + UnsupportedOperationException + ("difficult to tell the length for an input stream"); + } + + public void setLastMatch (REMatch match) + { + throw new + UnsupportedOperationException + ("difficult to support setLastMatch for an input stream"); + } + + public REMatch getLastMatch () + { + throw new + UnsupportedOperationException + ("difficult to support getLastMatch for an input stream"); + } + + public void setHitEnd (REMatch match) + { + throw new + UnsupportedOperationException + ("difficult to support setHitEnd for an input stream"); + } + + public boolean hitEnd () + { + throw new + UnsupportedOperationException + ("difficult to support hitEnd for an input stream"); + } + + public int getAnchor () + { + throw new + UnsupportedOperationException + ("difficult to support getAnchor for an input stream"); + } + + public void setAnchor (int anchor) + { + throw new + UnsupportedOperationException + ("difficult to support setAnchor for an input stream"); + } + + public boolean move1 (int index) + { + throw new + UnsupportedOperationException + ("difficult to support move1 for an input stream"); + } + +} diff --git a/libjava/classpath/gnu/java/util/regex/CharIndexedString.java b/libjava/classpath/gnu/java/util/regex/CharIndexedString.java index fab6d78360b..7a56f487eba 100644 --- a/libjava/classpath/gnu/java/util/regex/CharIndexedString.java +++ b/libjava/classpath/gnu/java/util/regex/CharIndexedString.java @@ -37,8 +37,10 @@ exception statement from your version. */ package gnu.java.util.regex; -class CharIndexedString extends CharIndexedCharSequence { - CharIndexedString(String str, int index) { - super(str, index); - } +class CharIndexedString extends CharIndexedCharSequence +{ + CharIndexedString (String str, int index) + { + super (str, index); + } } diff --git a/libjava/classpath/gnu/java/util/regex/CharIndexedStringBuffer.java b/libjava/classpath/gnu/java/util/regex/CharIndexedStringBuffer.java index 10005b66831..d6484f89b7c 100644 --- a/libjava/classpath/gnu/java/util/regex/CharIndexedStringBuffer.java +++ b/libjava/classpath/gnu/java/util/regex/CharIndexedStringBuffer.java @@ -37,9 +37,11 @@ exception statement from your version. */ package gnu.java.util.regex; -class CharIndexedStringBuffer extends CharIndexedCharSequence { +class CharIndexedStringBuffer extends CharIndexedCharSequence +{ - CharIndexedStringBuffer(StringBuffer str, int index) { - super(str, index); - } + CharIndexedStringBuffer (StringBuffer str, int index) + { + super (str, index); + } } diff --git a/libjava/classpath/gnu/java/util/regex/RE.java b/libjava/classpath/gnu/java/util/regex/RE.java dissimilarity index 64% index 421640ff293..d064f7a3579 100644 --- a/libjava/classpath/gnu/java/util/regex/RE.java +++ b/libjava/classpath/gnu/java/util/regex/RE.java @@ -1,2153 +1,2675 @@ -/* gnu/regexp/RE.java - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.java.util.regex; -import java.io.InputStream; -import java.io.Serializable; -import java.util.Locale; -import java.util.PropertyResourceBundle; -import java.util.ResourceBundle; -import java.util.Vector; - -/** - * RE provides the user interface for compiling and matching regular - * expressions. - *

- * A regular expression object (class RE) is compiled by constructing it - * from a String, StringBuffer or character array, with optional - * compilation flags (below) - * and an optional syntax specification (see RESyntax; if not specified, - * RESyntax.RE_SYNTAX_PERL5 is used). - *

- * Once compiled, a regular expression object is reusable as well as - * threadsafe: multiple threads can use the RE instance simultaneously - * to match against different input text. - *

- * Various methods attempt to match input text against a compiled - * regular expression. These methods are: - *

  • isMatch: returns true if the input text in its - * entirety matches the regular expression pattern. - *
  • getMatch: returns the first match found in the - * input text, or null if no match is found. - *
  • getAllMatches: returns an array of all - * non-overlapping matches found in the input text. If no matches are - * found, the array is zero-length. - *
  • substitute: substitute the first occurence of the - * pattern in the input text with a replacement string (which may - * include metacharacters $0-$9, see REMatch.substituteInto). - *
  • substituteAll: same as above, but repeat for each - * match before returning. - *
  • getMatchEnumeration: returns an REMatchEnumeration - * object that allows iteration over the matches (see - * REMatchEnumeration for some reasons why you may want to do this - * instead of using getAllMatches. - *

    - * - * These methods all have similar argument lists. The input can be a - * CharIndexed, String, a character array, a StringBuffer, or an - * InputStream of some sort. Note that when using an - * InputStream, the stream read position cannot be guaranteed after - * attempting a match (this is not a bug, but a consequence of the way - * regular expressions work). Using an REMatchEnumeration can - * eliminate most positioning problems. - * - * Although the input object can be of various types, it is recommended - * that it should be a CharIndexed because {@link CharIndexed#getLastMatch()} - * can show the last match found on this input, which helps the expression - * \G work as the end of the previous match. - * - *

    - * - * The optional index argument specifies the offset from the beginning - * of the text at which the search should start (see the descriptions - * of some of the execution flags for how this can affect positional - * pattern operators). For an InputStream, this means an - * offset from the current read position, so subsequent calls with the - * same index argument on an InputStream will not - * necessarily access the same position on the stream, whereas - * repeated searches at a given index in a fixed string will return - * consistent results. - * - *

    - * You can optionally affect the execution environment by using a - * combination of execution flags (constants listed below). - * - *

    - * All operations on a regular expression are performed in a - * thread-safe manner. - * - * @author Wes Biggs - * @version 1.1.5-dev, to be released - */ - -public class RE extends REToken { - - private static final class IntPair implements Serializable { - public int first, second; - } - - private static final class CharUnit implements Serializable { - public char ch; - public boolean bk; - } - - // This String will be returned by getVersion() - private static final String VERSION = "1.1.5-dev"; - - // The localized strings are kept in a separate file - // Used by getLocalizedMessage(). - private static ResourceBundle messages; - - // Name of the bundle that contains the localized messages. - private static final String bundle = "gnu/java/util/regex/MessagesBundle"; - - // These are, respectively, the first and last tokens in our linked list - // If there is only one token, firstToken == lastToken - private REToken firstToken, lastToken; - - // This is the number of subexpressions in this regular expression, - // with a minimum value of zero. Returned by getNumSubs() - private int numSubs; - - /** Minimum length, in characters, of any possible match. */ - private int minimumLength; - private int maximumLength; - - /** - * Compilation flag. Do not differentiate case. Subsequent - * searches using this RE will be case insensitive. - */ - public static final int REG_ICASE = 0x02; - - /** - * Compilation flag. The match-any-character operator (dot) - * will match a newline character. When set this overrides the syntax - * bit RE_DOT_NEWLINE (see RESyntax for details). This is equivalent to - * the "/s" operator in Perl. - */ - public static final int REG_DOT_NEWLINE = 0x04; - - /** - * Compilation flag. Use multiline mode. In this mode, the ^ and $ - * anchors will match based on newlines within the input. This is - * equivalent to the "/m" operator in Perl. - */ - public static final int REG_MULTILINE = 0x08; - - /** - * Execution flag. - * The match-beginning operator (^) will not match at the beginning - * of the input string. Useful for matching on a substring when you - * know the context of the input is such that position zero of the - * input to the match test is not actually position zero of the text. - *

    - * This example demonstrates the results of various ways of matching on - * a substring. - *

    - * - * String s = "food bar fool";
    - * RE exp = new RE("^foo.");
    - * REMatch m0 = exp.getMatch(s);
    - * REMatch m1 = exp.getMatch(s.substring(8));
    - * REMatch m2 = exp.getMatch(s.substring(8),0,RE.REG_NOTBOL);
    - * REMatch m3 = exp.getMatch(s,8);
    - * REMatch m4 = exp.getMatch(s,8,RE.REG_ANCHORINDEX);
    - *

    - * // Results:
    - * // m0.toString(): "food"
    - * // m1.toString(): "fool"
    - * // m2.toString(): null
    - * // m3.toString(): null
    - * // m4.toString(): "fool"
    - *
    - */ - public static final int REG_NOTBOL = 0x10; - - /** - * Execution flag. - * The match-end operator ($) does not match at the end - * of the input string. Useful for matching on substrings. - */ - public static final int REG_NOTEOL = 0x20; - - /** - * Execution flag. - * When a match method is invoked that starts matching at a non-zero - * index into the input, treat the input as if it begins at the index - * given. The effect of this flag is that the engine does not "see" - * any text in the input before the given index. This is useful so - * that the match-beginning operator (^) matches not at position 0 - * in the input string, but at the position the search started at - * (based on the index input given to the getMatch function). See - * the example under REG_NOTBOL. It also affects the use of the \< - * and \b operators. - */ - public static final int REG_ANCHORINDEX = 0x40; - - /** - * Execution flag. - * The substitute and substituteAll methods will not attempt to - * interpolate occurrences of $1-$9 in the replacement text with - * the corresponding subexpressions. For example, you may want to - * replace all matches of "one dollar" with "$1". - */ - public static final int REG_NO_INTERPOLATE = 0x80; - - /** - * Execution flag. - * Try to match the whole input string. An implicit match-end operator - * is added to this regexp. - */ - public static final int REG_TRY_ENTIRE_MATCH = 0x0100; - - /** - * Execution flag. - * The substitute and substituteAll methods will treat the - * character '\' in the replacement as an escape to a literal - * character. In this case "\n", "\$", "\\", "\x40" and "\012" - * will become "n", "$", "\", "x40" and "012" respectively. - * This flag has no effect if REG_NO_INTERPOLATE is set on. - */ - public static final int REG_REPLACE_USE_BACKSLASHESCAPE = 0x0200; - - /** - * Compilation flag. Allow whitespace and comments in pattern. - * This is equivalent to the "/x" operator in Perl. - */ - public static final int REG_X_COMMENTS = 0x0400; - - /** - * Compilation flag. If set, REG_ICASE is effective only for US-ASCII. - */ - public static final int REG_ICASE_USASCII = 0x0800; - - /** - * Execution flag. - * Do not move the position at which the search begins. If not set, - * the starting position will be moved until a match is found. - */ - public static final int REG_FIX_STARTING_POSITION = 0x1000; - - /** Returns a string representing the version of the gnu.regexp package. */ - public static final String version() { - return VERSION; - } - - // Retrieves a message from the ResourceBundle - static final String getLocalizedMessage(String key) { - if (messages == null) - messages = PropertyResourceBundle.getBundle(bundle, Locale.getDefault()); - return messages.getString(key); - } - - /** - * Constructs a regular expression pattern buffer without any compilation - * flags set, and using the default syntax (RESyntax.RE_SYNTAX_PERL5). - * - * @param pattern A regular expression pattern, in the form of a String, - * StringBuffer or char[]. Other input types will be converted to - * strings using the toString() method. - * @exception REException The input pattern could not be parsed. - * @exception NullPointerException The pattern was null. - */ - public RE(Object pattern) throws REException { - this(pattern,0,RESyntax.RE_SYNTAX_PERL5,0,0); - } - - /** - * Constructs a regular expression pattern buffer using the specified - * compilation flags and the default syntax (RESyntax.RE_SYNTAX_PERL5). - * - * @param pattern A regular expression pattern, in the form of a String, - * StringBuffer, or char[]. Other input types will be converted to - * strings using the toString() method. - * @param cflags The logical OR of any combination of the compilation flags listed above. - * @exception REException The input pattern could not be parsed. - * @exception NullPointerException The pattern was null. - */ - public RE(Object pattern, int cflags) throws REException { - this(pattern,cflags,RESyntax.RE_SYNTAX_PERL5,0,0); - } - - /** - * Constructs a regular expression pattern buffer using the specified - * compilation flags and regular expression syntax. - * - * @param pattern A regular expression pattern, in the form of a String, - * StringBuffer, or char[]. Other input types will be converted to - * strings using the toString() method. - * @param cflags The logical OR of any combination of the compilation flags listed above. - * @param syntax The type of regular expression syntax to use. - * @exception REException The input pattern could not be parsed. - * @exception NullPointerException The pattern was null. - */ - public RE(Object pattern, int cflags, RESyntax syntax) throws REException { - this(pattern,cflags,syntax,0,0); - } - - // internal constructor used for alternation - private RE(REToken first, REToken last,int subs, int subIndex, int minLength, int maxLength) { - super(subIndex); - firstToken = first; - lastToken = last; - numSubs = subs; - minimumLength = minLength; - maximumLength = maxLength; - addToken(new RETokenEndSub(subIndex)); - } - - private RE(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { - super(myIndex); // Subexpression index of this token. - initialize(patternObj, cflags, syntax, myIndex, nextSub); - } - - // For use by subclasses - protected RE() { super(0); } - - // The meat of construction - protected void initialize(Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub) throws REException { - char[] pattern; - if (patternObj instanceof String) { - pattern = ((String) patternObj).toCharArray(); - } else if (patternObj instanceof char[]) { - pattern = (char[]) patternObj; - } else if (patternObj instanceof StringBuffer) { - pattern = new char [((StringBuffer) patternObj).length()]; - ((StringBuffer) patternObj).getChars(0,pattern.length,pattern,0); - } else { - pattern = patternObj.toString().toCharArray(); - } - - int pLength = pattern.length; - - numSubs = 0; // Number of subexpressions in this token. - Vector branches = null; - - // linked list of tokens (sort of -- some closed loops can exist) - firstToken = lastToken = null; - - // Precalculate these so we don't pay for the math every time we - // need to access them. - boolean insens = ((cflags & REG_ICASE) > 0); - boolean insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); - - // Parse pattern into tokens. Does anyone know if it's more efficient - // to use char[] than a String.charAt()? I'm assuming so. - - // index tracks the position in the char array - int index = 0; - - // this will be the current parse character (pattern[index]) - CharUnit unit = new CharUnit(); - - // This is used for {x,y} calculations - IntPair minMax = new IntPair(); - - // Buffer a token so we can create a TokenRepeated, etc. - REToken currentToken = null; - char ch; - boolean quot = false; - - // Saved syntax and flags. - RESyntax savedSyntax = null; - int savedCflags = 0; - boolean flagsSaved = false; - - while (index < pLength) { - // read the next character unit (including backslash escapes) - index = getCharUnit(pattern,index,unit,quot); - - if (unit.bk) - if (unit.ch == 'Q') { - quot = true; - continue; - } else if (unit.ch == 'E') { - quot = false; - continue; - } - if (quot) - unit.bk = false; - - if (((cflags & REG_X_COMMENTS) > 0) && (!unit.bk) && (!quot)) { - if (Character.isWhitespace(unit.ch)) { - continue; - } - if (unit.ch == '#') { - for (int i = index; i < pLength; i++) { - if (pattern[i] == '\n') { - index = i + 1; - continue; - } - else if (pattern[i] == '\r') { - if (i + 1 < pLength && pattern[i + 1] == '\n') { - index = i + 2; - } - else { - index = i + 1; - } - continue; - } - } - index = pLength; - continue; - } - } - - // ALTERNATION OPERATOR - // \| or | (if RE_NO_BK_VBAR) or newline (if RE_NEWLINE_ALT) - // not available if RE_LIMITED_OPS is set - - // TODO: the '\n' literal here should be a test against REToken.newline, - // which unfortunately may be more than a single character. - if ( ( (unit.ch == '|' && (syntax.get(RESyntax.RE_NO_BK_VBAR) ^ (unit.bk || quot))) - || (syntax.get(RESyntax.RE_NEWLINE_ALT) && (unit.ch == '\n') && !(unit.bk || quot)) ) - && !syntax.get(RESyntax.RE_LIMITED_OPS)) { - // make everything up to here be a branch. create vector if nec. - addToken(currentToken); - RE theBranch = new RE(firstToken, lastToken, numSubs, subIndex, minimumLength, maximumLength); - minimumLength = 0; - maximumLength = 0; - if (branches == null) { - branches = new Vector(); - } - branches.addElement(theBranch); - firstToken = lastToken = currentToken = null; - } - - // INTERVAL OPERATOR: - // {x} | {x,} | {x,y} (RE_INTERVALS && RE_NO_BK_BRACES) - // \{x\} | \{x,\} | \{x,y\} (RE_INTERVALS && !RE_NO_BK_BRACES) - // - // OPEN QUESTION: - // what is proper interpretation of '{' at start of string? - // - // This method used to check "repeat.empty.token" to avoid such regexp - // as "(a*){2,}", but now "repeat.empty.token" is allowed. - - else if ((unit.ch == '{') && syntax.get(RESyntax.RE_INTERVALS) && (syntax.get(RESyntax.RE_NO_BK_BRACES) ^ (unit.bk || quot))) { - int newIndex = getMinMax(pattern,index,minMax,syntax); - if (newIndex > index) { - if (minMax.first > minMax.second) - throw new REException(getLocalizedMessage("interval.order"),REException.REG_BADRPT,newIndex); - if (currentToken == null) - throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,newIndex); - if (currentToken instanceof RETokenRepeated) - throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,newIndex); - if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary) - throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,newIndex); - index = newIndex; - currentToken = setRepeated(currentToken,minMax.first,minMax.second,index); - } - else { - addToken(currentToken); - currentToken = new RETokenChar(subIndex,unit.ch,insens); - if (insensUSASCII) currentToken.unicodeAware = false; - } - } - - // LIST OPERATOR: - // [...] | [^...] - - else if ((unit.ch == '[') && !(unit.bk || quot)) { - // Create a new RETokenOneOf - ParseCharClassResult result = parseCharClass( - subIndex, pattern, index, pLength, cflags, syntax, 0); - addToken(currentToken); - currentToken = result.token; - index = result.index; - } - - // SUBEXPRESSIONS - // (...) | \(...\) depending on RE_NO_BK_PARENS - - else if ((unit.ch == '(') && (syntax.get(RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot))) { - boolean pure = false; - boolean comment = false; - boolean lookAhead = false; - boolean lookBehind = false; - boolean independent = false; - boolean negativelh = false; - boolean negativelb = false; - if ((index+1 < pLength) && (pattern[index] == '?')) { - switch (pattern[index+1]) { - case '!': - if (syntax.get(RESyntax.RE_LOOKAHEAD)) { - pure = true; - negativelh = true; - lookAhead = true; - index += 2; - } - break; - case '=': - if (syntax.get(RESyntax.RE_LOOKAHEAD)) { - pure = true; - lookAhead = true; - index += 2; - } - break; - case '<': - // We assume that if the syntax supports look-ahead, - // it also supports look-behind. - if (syntax.get(RESyntax.RE_LOOKAHEAD)) { - index++; - switch (pattern[index +1]) { - case '!': - pure = true; - negativelb = true; - lookBehind = true; - index += 2; - break; - case '=': - pure = true; - lookBehind = true; - index += 2; - } - } - break; - case '>': - // We assume that if the syntax supports look-ahead, - // it also supports independent group. - if (syntax.get(RESyntax.RE_LOOKAHEAD)) { - pure = true; - independent = true; - index += 2; - } - break; - case 'i': - case 'd': - case 'm': - case 's': - case 'u': - case 'x': - case '-': - if (!syntax.get(RESyntax.RE_EMBEDDED_FLAGS)) break; - // Set or reset syntax flags. - int flagIndex = index + 1; - int endFlag = -1; - RESyntax newSyntax = new RESyntax(syntax); - int newCflags = cflags; - boolean negate = false; - while (flagIndex < pLength && endFlag < 0) { - switch(pattern[flagIndex]) { - case 'i': - if (negate) - newCflags &= ~REG_ICASE; - else - newCflags |= REG_ICASE; - flagIndex++; - break; - case 'd': - if (negate) - newSyntax.setLineSeparator(RESyntax.DEFAULT_LINE_SEPARATOR); - else - newSyntax.setLineSeparator("\n"); - flagIndex++; - break; - case 'm': - if (negate) - newCflags &= ~REG_MULTILINE; - else - newCflags |= REG_MULTILINE; - flagIndex++; - break; - case 's': - if (negate) - newCflags &= ~REG_DOT_NEWLINE; - else - newCflags |= REG_DOT_NEWLINE; - flagIndex++; - break; - case 'u': - if (negate) - newCflags |= REG_ICASE_USASCII; - else - newCflags &= ~REG_ICASE_USASCII; - flagIndex++; - break; - case 'x': - if (negate) - newCflags &= ~REG_X_COMMENTS; - else - newCflags |= REG_X_COMMENTS; - flagIndex++; - break; - case '-': - negate = true; - flagIndex++; - break; - case ':': - case ')': - endFlag = pattern[flagIndex]; - break; - default: - throw new REException(getLocalizedMessage("repeat.no.token"), REException.REG_BADRPT, index); - } - } - if (endFlag == ')') { - syntax = newSyntax; - cflags = newCflags; - insens = ((cflags & REG_ICASE) > 0); - insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); - // This can be treated as though it were a comment. - comment = true; - index = flagIndex - 1; - break; - } - if (endFlag == ':') { - savedSyntax = syntax; - savedCflags = cflags; - flagsSaved = true; - syntax = newSyntax; - cflags = newCflags; - insens = ((cflags & REG_ICASE) > 0); - insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); - index = flagIndex -1; - // Fall through to the next case. - } - else { - throw new REException(getLocalizedMessage("unmatched.paren"), REException.REG_ESUBREG,index); - } - case ':': - if (syntax.get(RESyntax.RE_PURE_GROUPING)) { - pure = true; - index += 2; - } - break; - case '#': - if (syntax.get(RESyntax.RE_COMMENTS)) { - comment = true; - } - break; - default: - throw new REException(getLocalizedMessage("repeat.no.token"), REException.REG_BADRPT, index); - } - } - - if (index >= pLength) { - throw new REException(getLocalizedMessage("unmatched.paren"), REException.REG_ESUBREG,index); - } - - // find end of subexpression - int endIndex = index; - int nextIndex = index; - int nested = 0; - - while ( ((nextIndex = getCharUnit(pattern,endIndex,unit,false)) > 0) - && !(nested == 0 && (unit.ch == ')') && (syntax.get(RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot))) ) { - if ((endIndex = nextIndex) >= pLength) - throw new REException(getLocalizedMessage("subexpr.no.end"),REException.REG_ESUBREG,nextIndex); - else if ((unit.ch == '[') && !(unit.bk || quot)) { - // I hate to do something similar to the LIST OPERATOR matters - // above, but ... - int listIndex = nextIndex; - if (listIndex < pLength && pattern[listIndex] == '^') listIndex++; - if (listIndex < pLength && pattern[listIndex] == ']') listIndex++; - int listEndIndex = -1; - int listNest = 0; - while (listIndex < pLength && listEndIndex < 0) { - switch(pattern[listIndex++]) { - case '\\': - listIndex++; - break; - case '[': - // Sun's API document says that regexp like "[a-d[m-p]]" - // is legal. Even something like "[[[^]]]]" is accepted. - listNest++; - if (listIndex < pLength && pattern[listIndex] == '^') listIndex++; - if (listIndex < pLength && pattern[listIndex] == ']') listIndex++; - break; - case ']': - if (listNest == 0) - listEndIndex = listIndex; - listNest--; - break; - } - } - if (listEndIndex >= 0) { - nextIndex = listEndIndex; - if ((endIndex = nextIndex) >= pLength) - throw new REException(getLocalizedMessage("subexpr.no.end"),REException.REG_ESUBREG,nextIndex); - else - continue; - } - throw new REException(getLocalizedMessage("subexpr.no.end"),REException.REG_ESUBREG,nextIndex); - } - else if (unit.ch == '(' && (syntax.get(RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot))) - nested++; - else if (unit.ch == ')' && (syntax.get(RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot))) - nested--; - } - - // endIndex is now position at a ')','\)' - // nextIndex is end of string or position after ')' or '\)' - - if (comment) index = nextIndex; - else { // not a comment - // create RE subexpression as token. - addToken(currentToken); - if (!pure) { - numSubs++; - } - - int useIndex = (pure || lookAhead || lookBehind || independent) ? - 0 : nextSub + numSubs; - currentToken = new RE(String.valueOf(pattern,index,endIndex-index).toCharArray(),cflags,syntax,useIndex,nextSub + numSubs); - numSubs += ((RE) currentToken).getNumSubs(); - - if (lookAhead) { - currentToken = new RETokenLookAhead(currentToken,negativelh); - } - else if (lookBehind) { - currentToken = new RETokenLookBehind(currentToken,negativelb); - } - else if (independent) { - currentToken = new RETokenIndependent(currentToken); - } - - index = nextIndex; - if (flagsSaved) { - syntax = savedSyntax; - cflags = savedCflags; - insens = ((cflags & REG_ICASE) > 0); - insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); - flagsSaved = false; - } - } // not a comment - } // subexpression - - // UNMATCHED RIGHT PAREN - // ) or \) throw exception if - // !syntax.get(RESyntax.RE_UNMATCHED_RIGHT_PAREN_ORD) - else if (!syntax.get(RESyntax.RE_UNMATCHED_RIGHT_PAREN_ORD) && ((unit.ch == ')') && (syntax.get(RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot)))) { - throw new REException(getLocalizedMessage("unmatched.paren"),REException.REG_EPAREN,index); - } - - // START OF LINE OPERATOR - // ^ - - else if ((unit.ch == '^') && !(unit.bk || quot)) { - addToken(currentToken); - currentToken = null; - RETokenStart token = null; - if ((cflags & REG_MULTILINE) > 0) { - String sep = syntax.getLineSeparator(); - if (sep == null) { - token = new RETokenStart(subIndex, null, true); - } - else { - token = new RETokenStart(subIndex, sep); - } - } - else { - token = new RETokenStart(subIndex, null); - } - addToken(token); - } - - // END OF LINE OPERATOR - // $ - - else if ((unit.ch == '$') && !(unit.bk || quot)) { - addToken(currentToken); - currentToken = null; - RETokenEnd token = null; - if ((cflags & REG_MULTILINE) > 0) { - String sep = syntax.getLineSeparator(); - if (sep == null) { - token = new RETokenEnd(subIndex, null, true); - } - else { - token = new RETokenEnd(subIndex, sep); - } - } - else { - token = new RETokenEnd(subIndex, null); - } - addToken(token); - } - - // MATCH-ANY-CHARACTER OPERATOR (except possibly newline and null) - // . - - else if ((unit.ch == '.') && !(unit.bk || quot)) { - addToken(currentToken); - currentToken = new RETokenAny(subIndex,syntax.get(RESyntax.RE_DOT_NEWLINE) || ((cflags & REG_DOT_NEWLINE) > 0),syntax.get(RESyntax.RE_DOT_NOT_NULL)); - } - - // ZERO-OR-MORE REPEAT OPERATOR - // * - // - // This method used to check "repeat.empty.token" to avoid such regexp - // as "(a*)*", but now "repeat.empty.token" is allowed. - - else if ((unit.ch == '*') && !(unit.bk || quot)) { - if (currentToken == null) - throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index); - if (currentToken instanceof RETokenRepeated) - throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index); - if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary) - throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index); - currentToken = setRepeated(currentToken,0,Integer.MAX_VALUE,index); - } - - // ONE-OR-MORE REPEAT OPERATOR / POSSESSIVE MATCHING OPERATOR - // + | \+ depending on RE_BK_PLUS_QM - // not available if RE_LIMITED_OPS is set - // - // This method used to check "repeat.empty.token" to avoid such regexp - // as "(a*)+", but now "repeat.empty.token" is allowed. - - else if ((unit.ch == '+') && !syntax.get(RESyntax.RE_LIMITED_OPS) && (!syntax.get(RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot))) { - if (currentToken == null) - throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index); - - // Check for possessive matching on RETokenRepeated - if (currentToken instanceof RETokenRepeated) { - RETokenRepeated tokenRep = (RETokenRepeated)currentToken; - if (syntax.get(RESyntax.RE_POSSESSIVE_OPS) && !tokenRep.isPossessive() && !tokenRep.isStingy()) - tokenRep.makePossessive(); - else - throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index); - - } - else if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary) - throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index); - else - currentToken = setRepeated(currentToken,1,Integer.MAX_VALUE,index); - } - - // ZERO-OR-ONE REPEAT OPERATOR / STINGY MATCHING OPERATOR - // ? | \? depending on RE_BK_PLUS_QM - // not available if RE_LIMITED_OPS is set - // stingy matching if RE_STINGY_OPS is set and it follows a quantifier - - else if ((unit.ch == '?') && !syntax.get(RESyntax.RE_LIMITED_OPS) && (!syntax.get(RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot))) { - if (currentToken == null) throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index); - - // Check for stingy matching on RETokenRepeated - if (currentToken instanceof RETokenRepeated) { - RETokenRepeated tokenRep = (RETokenRepeated)currentToken; - if (syntax.get(RESyntax.RE_STINGY_OPS) && !tokenRep.isStingy() && !tokenRep.isPossessive()) - tokenRep.makeStingy(); - else - throw new REException(getLocalizedMessage("repeat.chained"),REException.REG_BADRPT,index); - } - else if (currentToken instanceof RETokenWordBoundary || currentToken instanceof RETokenWordBoundary) - throw new REException(getLocalizedMessage("repeat.assertion"),REException.REG_BADRPT,index); - else - currentToken = setRepeated(currentToken,0,1,index); - } - - // OCTAL CHARACTER - // \0377 - - else if (unit.bk && (unit.ch == '0') && syntax.get(RESyntax.RE_OCTAL_CHAR)) { - CharExpression ce = getCharExpression(pattern, index - 2, pLength, syntax); - if (ce == null) - throw new REException("invalid octal character", REException.REG_ESCAPE, index); - index = index - 2 + ce.len; - addToken(currentToken); - currentToken = new RETokenChar(subIndex,ce.ch,insens); - if (insensUSASCII) currentToken.unicodeAware = false; - } - - // BACKREFERENCE OPERATOR - // \1 \2 ... \9 and \10 \11 \12 ... - // not available if RE_NO_BK_REFS is set - // Perl recognizes \10, \11, and so on only if enough number of - // parentheses have opened before it, otherwise they are treated - // as aliases of \010, \011, ... (octal characters). In case of - // Sun's JDK, octal character expression must always begin with \0. - // We will do as JDK does. But FIXME, take a look at "(a)(b)\29". - // JDK treats \2 as a back reference to the 2nd group because - // there are only two groups. But in our poor implementation, - // we cannot help but treat \29 as a back reference to the 29th group. - - else if (unit.bk && Character.isDigit(unit.ch) && !syntax.get(RESyntax.RE_NO_BK_REFS)) { - addToken(currentToken); - int numBegin = index - 1; - int numEnd = pLength; - for (int i = index; i < pLength; i++) { - if (! Character.isDigit(pattern[i])) { - numEnd = i; - break; - } - } - int num = parseInt(pattern, numBegin, numEnd-numBegin, 10); - - currentToken = new RETokenBackRef(subIndex,num,insens); - if (insensUSASCII) currentToken.unicodeAware = false; - index = numEnd; - } - - // START OF STRING OPERATOR - // \A if RE_STRING_ANCHORS is set - - else if (unit.bk && (unit.ch == 'A') && syntax.get(RESyntax.RE_STRING_ANCHORS)) { - addToken(currentToken); - currentToken = new RETokenStart(subIndex,null); - } - - // WORD BREAK OPERATOR - // \b if ???? - - else if (unit.bk && (unit.ch == 'b') && syntax.get(RESyntax.RE_STRING_ANCHORS)) { - addToken(currentToken); - currentToken = new RETokenWordBoundary(subIndex, RETokenWordBoundary.BEGIN | RETokenWordBoundary.END, false); - } - - // WORD BEGIN OPERATOR - // \< if ???? - else if (unit.bk && (unit.ch == '<')) { - addToken(currentToken); - currentToken = new RETokenWordBoundary(subIndex, RETokenWordBoundary.BEGIN, false); - } - - // WORD END OPERATOR - // \> if ???? - else if (unit.bk && (unit.ch == '>')) { - addToken(currentToken); - currentToken = new RETokenWordBoundary(subIndex, RETokenWordBoundary.END, false); - } - - // NON-WORD BREAK OPERATOR - // \B if ???? - - else if (unit.bk && (unit.ch == 'B') && syntax.get(RESyntax.RE_STRING_ANCHORS)) { - addToken(currentToken); - currentToken = new RETokenWordBoundary(subIndex, RETokenWordBoundary.BEGIN | RETokenWordBoundary.END, true); - } - - - // DIGIT OPERATOR - // \d if RE_CHAR_CLASS_ESCAPES is set - - else if (unit.bk && (unit.ch == 'd') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) { - addToken(currentToken); - currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.DIGIT,insens,false); - if (insensUSASCII) currentToken.unicodeAware = false; - } - - // NON-DIGIT OPERATOR - // \D - - else if (unit.bk && (unit.ch == 'D') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) { - addToken(currentToken); - currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.DIGIT,insens,true); - if (insensUSASCII) currentToken.unicodeAware = false; - } - - // NEWLINE ESCAPE - // \n - - else if (unit.bk && (unit.ch == 'n')) { - addToken(currentToken); - currentToken = new RETokenChar(subIndex,'\n',false); - } - - // RETURN ESCAPE - // \r - - else if (unit.bk && (unit.ch == 'r')) { - addToken(currentToken); - currentToken = new RETokenChar(subIndex,'\r',false); - } - - // WHITESPACE OPERATOR - // \s if RE_CHAR_CLASS_ESCAPES is set - - else if (unit.bk && (unit.ch == 's') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) { - addToken(currentToken); - currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.SPACE,insens,false); - if (insensUSASCII) currentToken.unicodeAware = false; - } - - // NON-WHITESPACE OPERATOR - // \S - - else if (unit.bk && (unit.ch == 'S') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) { - addToken(currentToken); - currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.SPACE,insens,true); - if (insensUSASCII) currentToken.unicodeAware = false; - } - - // TAB ESCAPE - // \t - - else if (unit.bk && (unit.ch == 't')) { - addToken(currentToken); - currentToken = new RETokenChar(subIndex,'\t',false); - } - - // ALPHANUMERIC OPERATOR - // \w - - else if (unit.bk && (unit.ch == 'w') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) { - addToken(currentToken); - currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.ALNUM,insens,false); - if (insensUSASCII) currentToken.unicodeAware = false; - } - - // NON-ALPHANUMERIC OPERATOR - // \W - - else if (unit.bk && (unit.ch == 'W') && syntax.get(RESyntax.RE_CHAR_CLASS_ESCAPES)) { - addToken(currentToken); - currentToken = new RETokenPOSIX(subIndex,RETokenPOSIX.ALNUM,insens,true); - if (insensUSASCII) currentToken.unicodeAware = false; - } - - // END OF STRING OPERATOR - // \Z, \z - - // FIXME: \Z and \z are different in that if the input string - // ends with a line terminator, \Z matches the position before - // the final terminator. This special behavior of \Z is yet - // to be implemented. - - else if (unit.bk && (unit.ch == 'Z' || unit.ch == 'z') && - syntax.get(RESyntax.RE_STRING_ANCHORS)) { - addToken(currentToken); - currentToken = new RETokenEnd(subIndex,null); - } - - // HEX CHARACTER, UNICODE CHARACTER - // \x1B, \u1234 - - else if ((unit.bk && (unit.ch == 'x') && syntax.get(RESyntax.RE_HEX_CHAR)) || - (unit.bk && (unit.ch == 'u') && syntax.get(RESyntax.RE_UNICODE_CHAR))) { - CharExpression ce = getCharExpression(pattern, index - 2, pLength, syntax); - if (ce == null) - throw new REException("invalid hex character", REException.REG_ESCAPE, index); - index = index - 2 + ce.len; - addToken(currentToken); - currentToken = new RETokenChar(subIndex,ce.ch,insens); - if (insensUSASCII) currentToken.unicodeAware = false; - } - - // NAMED PROPERTY - // \p{prop}, \P{prop} - - else if ((unit.bk && (unit.ch == 'p') && syntax.get(RESyntax.RE_NAMED_PROPERTY)) || - (unit.bk && (unit.ch == 'P') && syntax.get(RESyntax.RE_NAMED_PROPERTY))) { - NamedProperty np = getNamedProperty(pattern, index - 2, pLength); - if (np == null) - throw new REException("invalid escape sequence", REException.REG_ESCAPE, index); - index = index - 2 + np.len; - addToken(currentToken); - currentToken = getRETokenNamedProperty(subIndex,np,insens,index); - if (insensUSASCII) currentToken.unicodeAware = false; - } - - // END OF PREVIOUS MATCH - // \G - - else if (unit.bk && (unit.ch == 'G') && - syntax.get(RESyntax.RE_STRING_ANCHORS)) { - addToken(currentToken); - currentToken = new RETokenEndOfPreviousMatch(subIndex); - } - - // NON-SPECIAL CHARACTER (or escape to make literal) - // c | \* for example - - else { // not a special character - addToken(currentToken); - currentToken = new RETokenChar(subIndex,unit.ch,insens); - if (insensUSASCII) currentToken.unicodeAware = false; - } - } // end while - - // Add final buffered token and an EndSub marker - addToken(currentToken); - - if (branches != null) { - branches.addElement(new RE(firstToken,lastToken,numSubs,subIndex,minimumLength, maximumLength)); - branches.trimToSize(); // compact the Vector - minimumLength = 0; - maximumLength = 0; - firstToken = lastToken = null; - addToken(new RETokenOneOf(subIndex,branches,false)); - } - else addToken(new RETokenEndSub(subIndex)); - - } - - private static class ParseCharClassResult { - RETokenOneOf token; - int index; - boolean returnAtAndOperator = false; - } - - /** - * Parse [...] or [^...] and make an RETokenOneOf instance. - * @param subIndex subIndex to be given to the created RETokenOneOf instance. - * @param pattern Input array of characters to be parsed. - * @param index Index pointing to the character next to the beginning '['. - * @param pLength Limit of the input array. - * @param cflags Compilation flags used to parse the pattern. - * @param pflags Flags that affect the behavior of this method. - * @param syntax Syntax used to parse the pattern. - */ - private static ParseCharClassResult parseCharClass(int subIndex, - char[] pattern, int index, - int pLength, int cflags, RESyntax syntax, int pflags) - throws REException { - - boolean insens = ((cflags & REG_ICASE) > 0); - boolean insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); - Vector options = new Vector(); - Vector addition = new Vector(); - boolean additionAndAppeared = false; - final int RETURN_AT_AND = 0x01; - boolean returnAtAndOperator = ((pflags & RETURN_AT_AND) != 0); - boolean negative = false; - char ch; - - char lastChar = 0; - boolean lastCharIsSet = false; - if (index == pLength) throw new REException(getLocalizedMessage("unmatched.bracket"),REException.REG_EBRACK,index); - - // Check for initial caret, negation - if ((ch = pattern[index]) == '^') { - negative = true; - if (++index == pLength) throw new REException(getLocalizedMessage("class.no.end"),REException.REG_EBRACK,index); - ch = pattern[index]; - } - - // Check for leading right bracket literal - if (ch == ']') { - lastChar = ch; lastCharIsSet = true; - if (++index == pLength) throw new REException(getLocalizedMessage("class.no.end"),REException.REG_EBRACK,index); - } - - while ((ch = pattern[index++]) != ']') { - if ((ch == '-') && (lastCharIsSet)) { - if (index == pLength) throw new REException(getLocalizedMessage("class.no.end"),REException.REG_EBRACK,index); - if ((ch = pattern[index]) == ']') { - RETokenChar t = new RETokenChar(subIndex,lastChar,insens); - if (insensUSASCII) t.unicodeAware = false; - options.addElement(t); - lastChar = '-'; - } else { - if ((ch == '\\') && syntax.get(RESyntax.RE_BACKSLASH_ESCAPE_IN_LISTS)) { - CharExpression ce = getCharExpression(pattern, index, pLength, syntax); - if (ce == null) - throw new REException("invalid escape sequence", REException.REG_ESCAPE, index); - ch = ce.ch; - index = index + ce.len - 1; - } - RETokenRange t = new RETokenRange(subIndex,lastChar,ch,insens); - if (insensUSASCII) t.unicodeAware = false; - options.addElement(t); - lastChar = 0; lastCharIsSet = false; - index++; - } - } else if ((ch == '\\') && syntax.get(RESyntax.RE_BACKSLASH_ESCAPE_IN_LISTS)) { - if (index == pLength) throw new REException(getLocalizedMessage("class.no.end"),REException.REG_EBRACK,index); - int posixID = -1; - boolean negate = false; - char asciiEsc = 0; - boolean asciiEscIsSet = false; - NamedProperty np = null; - if (("dswDSW".indexOf(pattern[index]) != -1) && syntax.get(RESyntax.RE_CHAR_CLASS_ESC_IN_LISTS)) { - switch (pattern[index]) { - case 'D': - negate = true; - case 'd': - posixID = RETokenPOSIX.DIGIT; - break; - case 'S': - negate = true; - case 's': - posixID = RETokenPOSIX.SPACE; - break; - case 'W': - negate = true; - case 'w': - posixID = RETokenPOSIX.ALNUM; - break; - } - } - if (("pP".indexOf(pattern[index]) != -1) && syntax.get(RESyntax.RE_NAMED_PROPERTY)) { - np = getNamedProperty(pattern, index - 1, pLength); - if (np == null) - throw new REException("invalid escape sequence", REException.REG_ESCAPE, index); - index = index - 1 + np.len - 1; - } - else { - CharExpression ce = getCharExpression(pattern, index - 1, pLength, syntax); - if (ce == null) - throw new REException("invalid escape sequence", REException.REG_ESCAPE, index); - asciiEsc = ce.ch; asciiEscIsSet = true; - index = index - 1 + ce.len - 1; - } - if (lastCharIsSet) { - RETokenChar t = new RETokenChar(subIndex,lastChar,insens); - if (insensUSASCII) t.unicodeAware = false; - options.addElement(t); - } - - if (posixID != -1) { - RETokenPOSIX t = new RETokenPOSIX(subIndex,posixID,insens,negate); - if (insensUSASCII) t.unicodeAware = false; - options.addElement(t); - } else if (np != null) { - RETokenNamedProperty t = getRETokenNamedProperty(subIndex,np,insens,index); - if (insensUSASCII) t.unicodeAware = false; - options.addElement(t); - } else if (asciiEscIsSet) { - lastChar = asciiEsc; lastCharIsSet = true; - } else { - lastChar = pattern[index]; lastCharIsSet = true; - } - ++index; - } else if ((ch == '[') && (syntax.get(RESyntax.RE_CHAR_CLASSES)) && (index < pLength) && (pattern[index] == ':')) { - StringBuffer posixSet = new StringBuffer(); - index = getPosixSet(pattern,index+1,posixSet); - int posixId = RETokenPOSIX.intValue(posixSet.toString()); - if (posixId != -1) { - RETokenPOSIX t = new RETokenPOSIX(subIndex,posixId,insens,false); - if (insensUSASCII) t.unicodeAware = false; - options.addElement(t); - } - } else if ((ch == '[') && (syntax.get(RESyntax.RE_NESTED_CHARCLASS))) { - ParseCharClassResult result = parseCharClass( - subIndex, pattern, index, pLength, cflags, syntax, 0); - addition.addElement(result.token); - addition.addElement("|"); - index = result.index; - } else if ((ch == '&') && - (syntax.get(RESyntax.RE_NESTED_CHARCLASS)) && - (index < pLength) && (pattern[index] == '&')) { - if (returnAtAndOperator) { - ParseCharClassResult result = new ParseCharClassResult(); - options.trimToSize(); - if (additionAndAppeared) addition.addElement("&"); - if (addition.size() == 0) addition = null; - result.token = new RETokenOneOf(subIndex, - options, addition, negative); - result.index = index - 1; - result.returnAtAndOperator = true; - return result; - } - // The precedence of the operator "&&" is the lowest. - // So we postpone adding "&" until other elements - // are added. And we insert Boolean.FALSE at the - // beginning of the list of tokens following "&&". - // So, "&&[a-b][k-m]" will be stored in the Vecter - // addition in this order: - // Boolean.FALSE, [a-b], "|", [k-m], "|", "&" - if (additionAndAppeared) addition.addElement("&"); - addition.addElement(Boolean.FALSE); - additionAndAppeared = true; - - // The part on which "&&" operates may be either - // (1) explicitly enclosed by [] - // or - // (2) not enclosed by [] and terminated by the - // next "&&" or the end of the character list. - // Let the preceding else if block do the case (1). - // We must do something in case of (2). - if ((index + 1 < pLength) && (pattern[index + 1] != '[')) { - ParseCharClassResult result = parseCharClass( - subIndex, pattern, index+1, pLength, cflags, syntax, - RETURN_AT_AND); - addition.addElement(result.token); - addition.addElement("|"); - // If the method returned at the next "&&", it is OK. - // Otherwise we have eaten the mark of the end of this - // character list "]". In this case we must give back - // the end mark. - index = (result.returnAtAndOperator ? - result.index: result.index - 1); - } - } else { - if (lastCharIsSet) { - RETokenChar t = new RETokenChar(subIndex,lastChar,insens); - if (insensUSASCII) t.unicodeAware = false; - options.addElement(t); - } - lastChar = ch; lastCharIsSet = true; - } - if (index == pLength) throw new REException(getLocalizedMessage("class.no.end"),REException.REG_EBRACK,index); - } // while in list - // Out of list, index is one past ']' - - if (lastCharIsSet) { - RETokenChar t = new RETokenChar(subIndex,lastChar,insens); - if (insensUSASCII) t.unicodeAware = false; - options.addElement(t); - } - - ParseCharClassResult result = new ParseCharClassResult(); - // Create a new RETokenOneOf - options.trimToSize(); - if (additionAndAppeared) addition.addElement("&"); - if (addition.size() == 0) addition = null; - result.token = new RETokenOneOf(subIndex,options, addition, negative); - result.index = index; - return result; - } - - private static int getCharUnit(char[] input, int index, CharUnit unit, boolean quot) throws REException { - unit.ch = input[index++]; - unit.bk = (unit.ch == '\\' - && (!quot || index >= input.length || input[index] == 'E')); - if (unit.bk) - if (index < input.length) - unit.ch = input[index++]; - else throw new REException(getLocalizedMessage("ends.with.backslash"),REException.REG_ESCAPE,index); - return index; - } - - private static int parseInt(char[] input, int pos, int len, int radix) { - int ret = 0; - for (int i = pos; i < pos + len; i++) { - ret = ret * radix + Character.digit(input[i], radix); - } - return ret; - } - - /** - * This class represents various expressions for a character. - * "a" : 'a' itself. - * "\0123" : Octal char 0123 - * "\x1b" : Hex char 0x1b - * "\u1234" : Unicode char \u1234 - */ - private static class CharExpression { - /** character represented by this expression */ - char ch; - /** String expression */ - String expr; - /** length of this expression */ - int len; - public String toString() { return expr; } - } - - private static CharExpression getCharExpression(char[] input, int pos, int lim, - RESyntax syntax) { - CharExpression ce = new CharExpression(); - char c = input[pos]; - if (c == '\\') { - if (pos + 1 >= lim) return null; - c = input[pos + 1]; - switch(c) { - case 't': - ce.ch = '\t'; - ce.len = 2; - break; - case 'n': - ce.ch = '\n'; - ce.len = 2; - break; - case 'r': - ce.ch = '\r'; - ce.len = 2; - break; - case 'x': - case 'u': - if ((c == 'x' && syntax.get(RESyntax.RE_HEX_CHAR)) || - (c == 'u' && syntax.get(RESyntax.RE_UNICODE_CHAR))) { - int l = 0; - int expectedLength = (c == 'x' ? 2 : 4); - for (int i = pos + 2; i < pos + 2 + expectedLength; i++) { - if (i >= lim) break; - if (!((input[i] >= '0' && input[i] <= '9') || - (input[i] >= 'A' && input[i] <= 'F') || - (input[i] >= 'a' && input[i] <= 'f'))) - break; - l++; - } - if (l != expectedLength) return null; - ce.ch = (char)(parseInt(input, pos + 2, l, 16)); - ce.len = l + 2; - } - else { - ce.ch = c; - ce.len = 2; - } - break; - case '0': - if (syntax.get(RESyntax.RE_OCTAL_CHAR)) { - int l = 0; - for (int i = pos + 2; i < pos + 2 + 3; i++) { - if (i >= lim) break; - if (input[i] < '0' || input[i] > '7') break; - l++; - } - if (l == 3 && input[pos + 2] > '3') l--; - if (l <= 0) return null; - ce.ch = (char)(parseInt(input, pos + 2, l, 8)); - ce.len = l + 2; - } - else { - ce.ch = c; - ce.len = 2; - } - break; - default: - ce.ch = c; - ce.len = 2; - break; - } - } - else { - ce.ch = input[pos]; - ce.len = 1; - } - ce.expr = new String(input, pos, ce.len); - return ce; - } - - /** - * This class represents a substring in a pattern string expressing - * a named property. - * "\pA" : Property named "A" - * "\p{prop}" : Property named "prop" - * "\PA" : Property named "A" (Negated) - * "\P{prop}" : Property named "prop" (Negated) - */ - private static class NamedProperty { - /** Property name */ - String name; - /** Negated or not */ - boolean negate; - /** length of this expression */ - int len; - } - - private static NamedProperty getNamedProperty(char[] input, int pos, int lim) { - NamedProperty np = new NamedProperty(); - char c = input[pos]; - if (c == '\\') { - if (++pos >= lim) return null; - c = input[pos++]; - switch(c) { - case 'p': - np.negate = false; - break; - case 'P': - np.negate = true; - break; - default: - return null; - } - c = input[pos++]; - if (c == '{') { - int p = -1; - for (int i = pos; i < lim; i++) { - if (input[i] == '}') { - p = i; - break; - } - } - if (p < 0) return null; - int len = p - pos; - np.name = new String(input, pos, len); - np.len = len + 4; - } - else { - np.name = new String(input, pos - 1, 1); - np.len = 3; - } - return np; - } - else return null; - } - - private static RETokenNamedProperty getRETokenNamedProperty( - int subIndex, NamedProperty np, boolean insens, int index) - throws REException { - try { - return new RETokenNamedProperty(subIndex, np.name, insens, np.negate); - } - catch (REException e) { - REException ree; - ree = new REException(e.getMessage(), REException.REG_ESCAPE, index); - ree.initCause(e); - throw ree; - } - } - - /** - * Checks if the regular expression matches the input in its entirety. - * - * @param input The input text. - */ - public boolean isMatch(Object input) { - return isMatch(input,0,0); - } - - /** - * Checks if the input string, starting from index, is an exact match of - * this regular expression. - * - * @param input The input text. - * @param index The offset index at which the search should be begin. - */ - public boolean isMatch(Object input,int index) { - return isMatch(input,index,0); - } - - - /** - * Checks if the input, starting from index and using the specified - * execution flags, is an exact match of this regular expression. - * - * @param input The input text. - * @param index The offset index at which the search should be begin. - * @param eflags The logical OR of any execution flags above. - */ - public boolean isMatch(Object input,int index,int eflags) { - return isMatchImpl(makeCharIndexed(input,index),index,eflags); - } - - private boolean isMatchImpl(CharIndexed input, int index, int eflags) { - if (firstToken == null) // Trivial case - return (input.charAt(0) == CharIndexed.OUT_OF_BOUNDS); - REMatch m = new REMatch(numSubs, index, eflags); - if (firstToken.match(input, m)) { - if (m != null) { - if (input.charAt(m.index) == CharIndexed.OUT_OF_BOUNDS) { - return true; - } - } - } - return false; - } - - /** - * Returns the maximum number of subexpressions in this regular expression. - * If the expression contains branches, the value returned will be the - * maximum subexpressions in any of the branches. - */ - public int getNumSubs() { - return numSubs; - } - - // Overrides REToken.setUncle - void setUncle(REToken uncle) { - if (lastToken != null) { - lastToken.setUncle(uncle); - } else super.setUncle(uncle); // to deal with empty subexpressions - } - - // Overrides REToken.chain - - boolean chain(REToken next) { - super.chain(next); - setUncle(next); - return true; - } - - /** - * Returns the minimum number of characters that could possibly - * constitute a match of this regular expression. - */ - public int getMinimumLength() { - return minimumLength; - } - - public int getMaximumLength() { - return maximumLength; - } - - /** - * Returns an array of all matches found in the input. - * - * If the regular expression allows the empty string to match, it will - * substitute matches at all positions except the end of the input. - * - * @param input The input text. - * @return a non-null (but possibly zero-length) array of matches - */ - public REMatch[] getAllMatches(Object input) { - return getAllMatches(input,0,0); - } - - /** - * Returns an array of all matches found in the input, - * beginning at the specified index position. - * - * If the regular expression allows the empty string to match, it will - * substitute matches at all positions except the end of the input. - * - * @param input The input text. - * @param index The offset index at which the search should be begin. - * @return a non-null (but possibly zero-length) array of matches - */ - public REMatch[] getAllMatches(Object input, int index) { - return getAllMatches(input,index,0); - } - - /** - * Returns an array of all matches found in the input string, - * beginning at the specified index position and using the specified - * execution flags. - * - * If the regular expression allows the empty string to match, it will - * substitute matches at all positions except the end of the input. - * - * @param input The input text. - * @param index The offset index at which the search should be begin. - * @param eflags The logical OR of any execution flags above. - * @return a non-null (but possibly zero-length) array of matches - */ - public REMatch[] getAllMatches(Object input, int index, int eflags) { - return getAllMatchesImpl(makeCharIndexed(input,index),index,eflags); - } - - // this has been changed since 1.03 to be non-overlapping matches - private REMatch[] getAllMatchesImpl(CharIndexed input, int index, int eflags) { - Vector all = new Vector(); - REMatch m = null; - while ((m = getMatchImpl(input,index,eflags,null)) != null) { - all.addElement(m); - index = m.getEndIndex(); - if (m.end[0] == 0) { // handle pathological case of zero-length match - index++; - input.move(1); - } else { - input.move(m.end[0]); - } - if (!input.isValid()) break; - } - REMatch[] mset = new REMatch[all.size()]; - all.copyInto(mset); - return mset; - } - - /* Implements abstract method REToken.match() */ - boolean match(CharIndexed input, REMatch mymatch) { - input.setHitEnd(mymatch); - if (firstToken == null) { - return next(input, mymatch); - } - - // Note the start of this subexpression - mymatch.start1[subIndex] = mymatch.index; - - return firstToken.match(input, mymatch); - } - - REMatch findMatch(CharIndexed input, REMatch mymatch) { - if (mymatch.backtrackStack == null) - mymatch.backtrackStack = new BacktrackStack(); - boolean b = match(input, mymatch); - if (b) { - return mymatch; - } - return null; - } - - /** - * Returns the first match found in the input. If no match is found, - * null is returned. - * - * @param input The input text. - * @return An REMatch instance referencing the match, or null if none. - */ - public REMatch getMatch(Object input) { - return getMatch(input,0,0); - } - - /** - * Returns the first match found in the input, beginning - * the search at the specified index. If no match is found, - * returns null. - * - * @param input The input text. - * @param index The offset within the text to begin looking for a match. - * @return An REMatch instance referencing the match, or null if none. - */ - public REMatch getMatch(Object input, int index) { - return getMatch(input,index,0); - } - - /** - * Returns the first match found in the input, beginning - * the search at the specified index, and using the specified - * execution flags. If no match is found, returns null. - * - * @param input The input text. - * @param index The offset index at which the search should be begin. - * @param eflags The logical OR of any execution flags above. - * @return An REMatch instance referencing the match, or null if none. - */ - public REMatch getMatch(Object input, int index, int eflags) { - return getMatch(input,index,eflags,null); - } - - /** - * Returns the first match found in the input, beginning the search - * at the specified index, and using the specified execution flags. - * If no match is found, returns null. If a StringBuffer is - * provided and is non-null, the contents of the input text from the - * index to the beginning of the match (or to the end of the input, - * if there is no match) are appended to the StringBuffer. - * - * @param input The input text. - * @param index The offset index at which the search should be begin. - * @param eflags The logical OR of any execution flags above. - * @param buffer The StringBuffer to save pre-match text in. - * @return An REMatch instance referencing the match, or null if none. */ - public REMatch getMatch(Object input, int index, int eflags, StringBuffer buffer) { - return getMatchImpl(makeCharIndexed(input,index),index,eflags,buffer); - } - - REMatch getMatchImpl(CharIndexed input, int anchor, int eflags, StringBuffer buffer) { - boolean tryEntireMatch = ((eflags & REG_TRY_ENTIRE_MATCH) != 0); - boolean doMove = ((eflags & REG_FIX_STARTING_POSITION) == 0); - RE re = (tryEntireMatch ? (RE) this.clone() : this); - if (tryEntireMatch) { - RETokenEnd reEnd = new RETokenEnd(0, null); - reEnd.setFake(true); - re.chain(reEnd); - } - // Create a new REMatch to hold results - REMatch mymatch = new REMatch(numSubs, anchor, eflags); - do { - /* The following potimization is commented out because - the matching should be tried even if the length of - input is obviously too short in order that - java.util.regex.Matcher#hitEnd() may work correctly. - // Optimization: check if anchor + minimumLength > length - if (minimumLength == 0 || input.charAt(minimumLength-1) != CharIndexed.OUT_OF_BOUNDS) { - */ - if (re.match(input, mymatch)) { - REMatch best = mymatch; - // We assume that the match that coms first is the best. - // And the following "The longer, the better" rule has - // been commented out. The longest is not neccesarily - // the best. For example, "a" out of "aaa" is the best - // match for /a+?/. - /* - // Find best match of them all to observe leftmost longest - while ((mymatch = mymatch.next) != null) { - if (mymatch.index > best.index) { - best = mymatch; - } - } - */ - best.end[0] = best.index; - best.finish(input); - input.setLastMatch(best); - return best; - } - /* End of the optimization commented out - } - */ - mymatch.clear(++anchor); - // Append character to buffer if needed - if (buffer != null && input.charAt(0) != CharIndexed.OUT_OF_BOUNDS) { - buffer.append(input.charAt(0)); - } - // java.util.regex.Matcher#hitEnd() requires that the search should - // be tried at the end of input, so we use move1(1) instead of move(1) - } while (doMove && input.move1(1)); - - // Special handling at end of input for e.g. "$" - if (minimumLength == 0) { - if (match(input, mymatch)) { - mymatch.finish(input); - return mymatch; - } - } - - return null; - } - - /** - * Returns an REMatchEnumeration that can be used to iterate over the - * matches found in the input text. - * - * @param input The input text. - * @return A non-null REMatchEnumeration instance. - */ - public REMatchEnumeration getMatchEnumeration(Object input) { - return getMatchEnumeration(input,0,0); - } - - - /** - * Returns an REMatchEnumeration that can be used to iterate over the - * matches found in the input text. - * - * @param input The input text. - * @param index The offset index at which the search should be begin. - * @return A non-null REMatchEnumeration instance, with its input cursor - * set to the index position specified. - */ - public REMatchEnumeration getMatchEnumeration(Object input, int index) { - return getMatchEnumeration(input,index,0); - } - - /** - * Returns an REMatchEnumeration that can be used to iterate over the - * matches found in the input text. - * - * @param input The input text. - * @param index The offset index at which the search should be begin. - * @param eflags The logical OR of any execution flags above. - * @return A non-null REMatchEnumeration instance, with its input cursor - * set to the index position specified. - */ - public REMatchEnumeration getMatchEnumeration(Object input, int index, int eflags) { - return new REMatchEnumeration(this,makeCharIndexed(input,index),index,eflags); - } - - - /** - * Substitutes the replacement text for the first match found in the input. - * - * @param input The input text. - * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). - * @return A String interpolating the substituted text. - * @see REMatch#substituteInto - */ - public String substitute(Object input,String replace) { - return substitute(input,replace,0,0); - } - - /** - * Substitutes the replacement text for the first match found in the input - * beginning at the specified index position. Specifying an index - * effectively causes the regular expression engine to throw away the - * specified number of characters. - * - * @param input The input text. - * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). - * @param index The offset index at which the search should be begin. - * @return A String containing the substring of the input, starting - * at the index position, and interpolating the substituted text. - * @see REMatch#substituteInto - */ - public String substitute(Object input,String replace,int index) { - return substitute(input,replace,index,0); - } - - /** - * Substitutes the replacement text for the first match found in the input - * string, beginning at the specified index position and using the - * specified execution flags. - * - * @param input The input text. - * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). - * @param index The offset index at which the search should be begin. - * @param eflags The logical OR of any execution flags above. - * @return A String containing the substring of the input, starting - * at the index position, and interpolating the substituted text. - * @see REMatch#substituteInto - */ - public String substitute(Object input,String replace,int index,int eflags) { - return substituteImpl(makeCharIndexed(input,index),replace,index,eflags); - } - - private String substituteImpl(CharIndexed input,String replace,int index,int eflags) { - StringBuffer buffer = new StringBuffer(); - REMatch m = getMatchImpl(input,index,eflags,buffer); - if (m==null) return buffer.toString(); - buffer.append(getReplacement(replace, m, eflags)); - if (input.move(m.end[0])) { - do { - buffer.append(input.charAt(0)); - } while (input.move(1)); - } - return buffer.toString(); - } - - /** - * Substitutes the replacement text for each non-overlapping match found - * in the input text. - * - * @param input The input text. - * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). - * @return A String interpolating the substituted text. - * @see REMatch#substituteInto - */ - public String substituteAll(Object input,String replace) { - return substituteAll(input,replace,0,0); - } - - /** - * Substitutes the replacement text for each non-overlapping match found - * in the input text, starting at the specified index. - * - * If the regular expression allows the empty string to match, it will - * substitute matches at all positions except the end of the input. - * - * @param input The input text. - * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). - * @param index The offset index at which the search should be begin. - * @return A String containing the substring of the input, starting - * at the index position, and interpolating the substituted text. - * @see REMatch#substituteInto - */ - public String substituteAll(Object input,String replace,int index) { - return substituteAll(input,replace,index,0); - } - - /** - * Substitutes the replacement text for each non-overlapping match found - * in the input text, starting at the specified index and using the - * specified execution flags. - * - * @param input The input text. - * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). - * @param index The offset index at which the search should be begin. - * @param eflags The logical OR of any execution flags above. - * @return A String containing the substring of the input, starting - * at the index position, and interpolating the substituted text. - * @see REMatch#substituteInto - */ - public String substituteAll(Object input,String replace,int index,int eflags) { - return substituteAllImpl(makeCharIndexed(input,index),replace,index,eflags); - } - - private String substituteAllImpl(CharIndexed input,String replace,int index,int eflags) { - StringBuffer buffer = new StringBuffer(); - REMatch m; - while ((m = getMatchImpl(input,index,eflags,buffer)) != null) { - buffer.append(getReplacement(replace, m, eflags)); - index = m.getEndIndex(); - if (m.end[0] == 0) { - char ch = input.charAt(0); - if (ch != CharIndexed.OUT_OF_BOUNDS) - buffer.append(ch); - input.move(1); - } else { - input.move(m.end[0]); - } - - if (!input.isValid()) break; - } - return buffer.toString(); - } - - public static String getReplacement(String replace, REMatch m, int eflags) { - if ((eflags & REG_NO_INTERPOLATE) > 0) - return replace; - else { - if ((eflags & REG_REPLACE_USE_BACKSLASHESCAPE) > 0) { - StringBuffer sb = new StringBuffer(); - int l = replace.length(); - for (int i = 0; i < l; i++) { - char c = replace.charAt(i); - switch(c) { - case '\\': - i++; - // Let StringIndexOutOfBoundsException be thrown. - sb.append(replace.charAt(i)); - break; - case '$': - int i1 = i + 1; - while (i1 < replace.length() && - Character.isDigit(replace.charAt(i1))) i1++; - sb.append(m.substituteInto(replace.substring(i, i1))); - i = i1 - 1; - break; - default: - sb.append(c); - } - } - return sb.toString(); - } - else - return m.substituteInto(replace); - } - } - - /* Helper function for constructor */ - private void addToken(REToken next) { - if (next == null) return; - minimumLength += next.getMinimumLength(); - int nmax = next.getMaximumLength(); - if (nmax < Integer.MAX_VALUE && maximumLength < Integer.MAX_VALUE) - maximumLength += nmax; - else - maximumLength = Integer.MAX_VALUE; - - if (firstToken == null) { - lastToken = firstToken = next; - } else { - // if chain returns false, it "rejected" the token due to - // an optimization, and next was combined with lastToken - if (lastToken.chain(next)) { - lastToken = next; - } - } - } - - private static REToken setRepeated(REToken current, int min, int max, int index) throws REException { - if (current == null) throw new REException(getLocalizedMessage("repeat.no.token"),REException.REG_BADRPT,index); - return new RETokenRepeated(current.subIndex,current,min,max); - } - - private static int getPosixSet(char[] pattern,int index,StringBuffer buf) { - // Precondition: pattern[index-1] == ':' - // we will return pos of closing ']'. - int i; - for (i=index; i<(pattern.length-1); i++) { - if ((pattern[i] == ':') && (pattern[i+1] == ']')) - return i+2; - buf.append(pattern[i]); - } - return index; // didn't match up - } - - private int getMinMax(char[] input,int index,IntPair minMax,RESyntax syntax) throws REException { - // Precondition: input[index-1] == '{', minMax != null - - boolean mustMatch = !syntax.get(RESyntax.RE_NO_BK_BRACES); - int startIndex = index; - if (index == input.length) { - if (mustMatch) - throw new REException(getLocalizedMessage("unmatched.brace"),REException.REG_EBRACE,index); - else - return startIndex; - } - - int min,max=0; - CharUnit unit = new CharUnit(); - StringBuffer buf = new StringBuffer(); - - // Read string of digits - do { - index = getCharUnit(input,index,unit,false); - if (Character.isDigit(unit.ch)) - buf.append(unit.ch); - } while ((index != input.length) && Character.isDigit(unit.ch)); - - // Check for {} tomfoolery - if (buf.length() == 0) { - if (mustMatch) - throw new REException(getLocalizedMessage("interval.error"),REException.REG_EBRACE,index); - else - return startIndex; - } - - min = Integer.parseInt(buf.toString()); - - if ((unit.ch == '}') && (syntax.get(RESyntax.RE_NO_BK_BRACES) ^ unit.bk)) - max = min; - else if (index == input.length) - if (mustMatch) - throw new REException(getLocalizedMessage("interval.no.end"),REException.REG_EBRACE,index); - else - return startIndex; - else if ((unit.ch == ',') && !unit.bk) { - buf = new StringBuffer(); - // Read string of digits - while (((index = getCharUnit(input,index,unit,false)) != input.length) && Character.isDigit(unit.ch)) - buf.append(unit.ch); - - if (!((unit.ch == '}') && (syntax.get(RESyntax.RE_NO_BK_BRACES) ^ unit.bk))) - if (mustMatch) - throw new REException(getLocalizedMessage("interval.error"),REException.REG_EBRACE,index); - else - return startIndex; - - // This is the case of {x,} - if (buf.length() == 0) max = Integer.MAX_VALUE; - else max = Integer.parseInt(buf.toString()); - } else - if (mustMatch) - throw new REException(getLocalizedMessage("interval.error"),REException.REG_EBRACE,index); - else - return startIndex; - - // We know min and max now, and they are valid. - - minMax.first = min; - minMax.second = max; - - // return the index following the '}' - return index; - } - - /** - * Return a human readable form of the compiled regular expression, - * useful for debugging. - */ - public String toString() { - StringBuffer sb = new StringBuffer(); - dump(sb); - return sb.toString(); - } - - void dump(StringBuffer os) { - os.append("(?#startRE subIndex=" + subIndex + ")"); - if (subIndex == 0) - os.append("?:"); - if (firstToken != null) - firstToken.dumpAll(os); - if (subIndex == 0) - os.append(")"); - os.append("(?#endRE subIndex=" + subIndex + ")"); - } - - // Cast input appropriately or throw exception - // This method was originally a private method, but has been made - // public because java.util.regex.Matcher uses this. - public static CharIndexed makeCharIndexed(Object input, int index) { - // The case where input is already a CharIndexed is supposed - // be the most likely because this is the case with - // java.util.regex.Matcher. - // We could let a String or a CharSequence fall through - // to final input, but since it'a very likely input type, - // we check it first. - if (input instanceof CharIndexed) { - CharIndexed ci = (CharIndexed) input; - ci.setAnchor(index); - return ci; - } - else if (input instanceof CharSequence) - return new CharIndexedCharSequence((CharSequence) input,index); - else if (input instanceof String) - return new CharIndexedString((String) input,index); - else if (input instanceof char[]) - return new CharIndexedCharArray((char[]) input,index); - else if (input instanceof StringBuffer) - return new CharIndexedStringBuffer((StringBuffer) input,index); - else if (input instanceof InputStream) - return new CharIndexedInputStream((InputStream) input,index); - else - return new CharIndexedString(input.toString(), index); - } -} +/* gnu/regexp/RE.java + Copyright (C) 2006 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.util.regex; + +import gnu.java.lang.CPStringBuilder; + +import java.io.InputStream; +import java.io.Serializable; + +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.PropertyResourceBundle; +import java.util.ResourceBundle; + +/** + * RE provides the user interface for compiling and matching regular + * expressions. + *

    + * A regular expression object (class RE) is compiled by constructing it + * from a String, StringBuffer or character array, with optional + * compilation flags (below) + * and an optional syntax specification (see RESyntax; if not specified, + * RESyntax.RE_SYNTAX_PERL5 is used). + *

    + * Once compiled, a regular expression object is reusable as well as + * threadsafe: multiple threads can use the RE instance simultaneously + * to match against different input text. + *

    + * Various methods attempt to match input text against a compiled + * regular expression. These methods are: + *

  • isMatch: returns true if the input text in its + * entirety matches the regular expression pattern. + *
  • getMatch: returns the first match found in the + * input text, or null if no match is found. + *
  • getAllMatches: returns an array of all + * non-overlapping matches found in the input text. If no matches are + * found, the array is zero-length. + *
  • substitute: substitute the first occurence of the + * pattern in the input text with a replacement string (which may + * include metacharacters $0-$9, see REMatch.substituteInto). + *
  • substituteAll: same as above, but repeat for each + * match before returning. + *
  • getMatchEnumeration: returns an REMatchEnumeration + * object that allows iteration over the matches (see + * REMatchEnumeration for some reasons why you may want to do this + * instead of using getAllMatches. + *

    + * + * These methods all have similar argument lists. The input can be a + * CharIndexed, String, a character array, a StringBuffer, or an + * InputStream of some sort. Note that when using an + * InputStream, the stream read position cannot be guaranteed after + * attempting a match (this is not a bug, but a consequence of the way + * regular expressions work). Using an REMatchEnumeration can + * eliminate most positioning problems. + * + * Although the input object can be of various types, it is recommended + * that it should be a CharIndexed because {@link CharIndexed#getLastMatch()} + * can show the last match found on this input, which helps the expression + * \G work as the end of the previous match. + * + *

    + * + * The optional index argument specifies the offset from the beginning + * of the text at which the search should start (see the descriptions + * of some of the execution flags for how this can affect positional + * pattern operators). For an InputStream, this means an + * offset from the current read position, so subsequent calls with the + * same index argument on an InputStream will not + * necessarily access the same position on the stream, whereas + * repeated searches at a given index in a fixed string will return + * consistent results. + * + *

    + * You can optionally affect the execution environment by using a + * combination of execution flags (constants listed below). + * + *

    + * All operations on a regular expression are performed in a + * thread-safe manner. + * + * @author Wes Biggs + * @version 1.1.5-dev, to be released + */ + +public class RE extends REToken +{ + + private static final class IntPair implements Serializable + { + public int first, second; + } + + private static final class CharUnit implements Serializable + { + public char ch; + public boolean bk; + } + + // This String will be returned by getVersion() + private static final String VERSION = "1.1.5-dev"; + + // The localized strings are kept in a separate file + // Used by getLocalizedMessage(). + private static ResourceBundle messages; + + // Name of the bundle that contains the localized messages. + private static final String bundle = "gnu/java/util/regex/MessagesBundle"; + + // These are, respectively, the first and last tokens in our linked list + // If there is only one token, firstToken == lastToken + private REToken firstToken, lastToken; + + // This is the number of subexpressions in this regular expression, + // with a minimum value of zero. Returned by getNumSubs() + private int numSubs; + + /** Minimum length, in characters, of any possible match. */ + private int minimumLength; + private int maximumLength; + + /** + * Compilation flag. Do not differentiate case. Subsequent + * searches using this RE will be case insensitive. + */ + public static final int REG_ICASE = 0x02; + + /** + * Compilation flag. The match-any-character operator (dot) + * will match a newline character. When set this overrides the syntax + * bit RE_DOT_NEWLINE (see RESyntax for details). This is equivalent to + * the "/s" operator in Perl. + */ + public static final int REG_DOT_NEWLINE = 0x04; + + /** + * Compilation flag. Use multiline mode. In this mode, the ^ and $ + * anchors will match based on newlines within the input. This is + * equivalent to the "/m" operator in Perl. + */ + public static final int REG_MULTILINE = 0x08; + + /** + * Execution flag. + * The match-beginning operator (^) will not match at the beginning + * of the input string. Useful for matching on a substring when you + * know the context of the input is such that position zero of the + * input to the match test is not actually position zero of the text. + *

    + * This example demonstrates the results of various ways of matching on + * a substring. + *

    + * + * String s = "food bar fool";
    + * RE exp = new RE("^foo.");
    + * REMatch m0 = exp.getMatch(s);
    + * REMatch m1 = exp.getMatch(s.substring(8));
    + * REMatch m2 = exp.getMatch(s.substring(8),0,RE.REG_NOTBOL);
    + * REMatch m3 = exp.getMatch(s,8);
    + * REMatch m4 = exp.getMatch(s,8,RE.REG_ANCHORINDEX);
    + *

    + * // Results:
    + * // m0.toString(): "food"
    + * // m1.toString(): "fool"
    + * // m2.toString(): null
    + * // m3.toString(): null
    + * // m4.toString(): "fool"
    + *
    + */ + public static final int REG_NOTBOL = 0x10; + + /** + * Execution flag. + * The match-end operator ($) does not match at the end + * of the input string. Useful for matching on substrings. + */ + public static final int REG_NOTEOL = 0x20; + + /** + * Execution flag. + * When a match method is invoked that starts matching at a non-zero + * index into the input, treat the input as if it begins at the index + * given. The effect of this flag is that the engine does not "see" + * any text in the input before the given index. This is useful so + * that the match-beginning operator (^) matches not at position 0 + * in the input string, but at the position the search started at + * (based on the index input given to the getMatch function). See + * the example under REG_NOTBOL. It also affects the use of the \< + * and \b operators. + */ + public static final int REG_ANCHORINDEX = 0x40; + + /** + * Execution flag. + * The substitute and substituteAll methods will not attempt to + * interpolate occurrences of $1-$9 in the replacement text with + * the corresponding subexpressions. For example, you may want to + * replace all matches of "one dollar" with "$1". + */ + public static final int REG_NO_INTERPOLATE = 0x80; + + /** + * Execution flag. + * Try to match the whole input string. An implicit match-end operator + * is added to this regexp. + */ + public static final int REG_TRY_ENTIRE_MATCH = 0x0100; + + /** + * Execution flag. + * The substitute and substituteAll methods will treat the + * character '\' in the replacement as an escape to a literal + * character. In this case "\n", "\$", "\\", "\x40" and "\012" + * will become "n", "$", "\", "x40" and "012" respectively. + * This flag has no effect if REG_NO_INTERPOLATE is set on. + */ + public static final int REG_REPLACE_USE_BACKSLASHESCAPE = 0x0200; + + /** + * Compilation flag. Allow whitespace and comments in pattern. + * This is equivalent to the "/x" operator in Perl. + */ + public static final int REG_X_COMMENTS = 0x0400; + + /** + * Compilation flag. If set, REG_ICASE is effective only for US-ASCII. + */ + public static final int REG_ICASE_USASCII = 0x0800; + + /** + * Execution flag. + * Do not move the position at which the search begins. If not set, + * the starting position will be moved until a match is found. + */ + public static final int REG_FIX_STARTING_POSITION = 0x1000; + + /** Returns a string representing the version of the gnu.regexp package. */ + public static final String version () + { + return VERSION; + } + + // Retrieves a message from the ResourceBundle + static final String getLocalizedMessage (String key) + { + if (messages == null) + messages = + PropertyResourceBundle.getBundle (bundle, Locale.getDefault ()); + return messages.getString (key); + } + + /** + * Constructs a regular expression pattern buffer without any compilation + * flags set, and using the default syntax (RESyntax.RE_SYNTAX_PERL5). + * + * @param pattern A regular expression pattern, in the form of a String, + * StringBuffer or char[]. Other input types will be converted to + * strings using the toString() method. + * @exception REException The input pattern could not be parsed. + * @exception NullPointerException The pattern was null. + */ + public RE (Object pattern) throws REException + { + this (pattern, 0, RESyntax.RE_SYNTAX_PERL5, 0, 0); + } + + /** + * Constructs a regular expression pattern buffer using the specified + * compilation flags and the default syntax (RESyntax.RE_SYNTAX_PERL5). + * + * @param pattern A regular expression pattern, in the form of a String, + * StringBuffer, or char[]. Other input types will be converted to + * strings using the toString() method. + * @param cflags The logical OR of any combination of the compilation flags listed above. + * @exception REException The input pattern could not be parsed. + * @exception NullPointerException The pattern was null. + */ + public RE (Object pattern, int cflags) throws REException + { + this (pattern, cflags, RESyntax.RE_SYNTAX_PERL5, 0, 0); + } + + /** + * Constructs a regular expression pattern buffer using the specified + * compilation flags and regular expression syntax. + * + * @param pattern A regular expression pattern, in the form of a String, + * StringBuffer, or char[]. Other input types will be converted to + * strings using the toString() method. + * @param cflags The logical OR of any combination of the compilation flags listed above. + * @param syntax The type of regular expression syntax to use. + * @exception REException The input pattern could not be parsed. + * @exception NullPointerException The pattern was null. + */ + public RE (Object pattern, int cflags, RESyntax syntax) throws REException + { + this (pattern, cflags, syntax, 0, 0); + } + + // internal constructor used for alternation + private RE (REToken first, REToken last, int subs, int subIndex, + int minLength, int maxLength) + { + super (subIndex); + firstToken = first; + lastToken = last; + numSubs = subs; + minimumLength = minLength; + maximumLength = maxLength; + addToken (new RETokenEndSub (subIndex)); + } + + private RE (Object patternObj, int cflags, RESyntax syntax, int myIndex, + int nextSub) throws REException + { + super (myIndex); // Subexpression index of this token. + initialize (patternObj, cflags, syntax, myIndex, nextSub); + } + + // For use by subclasses + protected RE () + { + super (0); + } + + // The meat of construction + protected void initialize (Object patternObj, int cflags, RESyntax syntax, + int myIndex, int nextSub) throws REException + { + char[] pattern; + if (patternObj instanceof String) + { + pattern = ((String) patternObj).toCharArray (); + } + else if (patternObj instanceof char[]) + { + pattern = (char[]) patternObj; + } + else if (patternObj instanceof StringBuffer) + { + pattern = new char[((StringBuffer) patternObj).length ()]; + ((StringBuffer) patternObj).getChars (0, pattern.length, pattern, 0); + } + else if (patternObj instanceof StringBuilder) + { + pattern = new char[((StringBuilder) patternObj).length ()]; + ((StringBuilder) patternObj).getChars (0, pattern.length, pattern, 0); + } + else if (patternObj instanceof CPStringBuilder) + { + pattern = new char[((CPStringBuilder) patternObj).length ()]; + ((CPStringBuilder) patternObj).getChars (0, pattern.length, pattern, + 0); + } + else + { + pattern = patternObj.toString ().toCharArray (); + } + + int pLength = pattern.length; + + numSubs = 0; // Number of subexpressions in this token. + ArrayList < REToken > branches = null; + + // linked list of tokens (sort of -- some closed loops can exist) + firstToken = lastToken = null; + + // Precalculate these so we don't pay for the math every time we + // need to access them. + boolean insens = ((cflags & REG_ICASE) > 0); + boolean insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); + + // Parse pattern into tokens. Does anyone know if it's more efficient + // to use char[] than a String.charAt()? I'm assuming so. + + // index tracks the position in the char array + int index = 0; + + // this will be the current parse character (pattern[index]) + CharUnit unit = new CharUnit (); + + // This is used for {x,y} calculations + IntPair minMax = new IntPair (); + + // Buffer a token so we can create a TokenRepeated, etc. + REToken currentToken = null; + boolean quot = false; + + // Saved syntax and flags. + RESyntax savedSyntax = null; + int savedCflags = 0; + boolean flagsSaved = false; + + while (index < pLength) + { + // read the next character unit (including backslash escapes) + index = getCharUnit (pattern, index, unit, quot); + + if (unit.bk) + if (unit.ch == 'Q') + { + quot = true; + continue; + } + else if (unit.ch == 'E') + { + quot = false; + continue; + } + if (quot) + unit.bk = false; + + if (((cflags & REG_X_COMMENTS) > 0) && (!unit.bk) && (!quot)) + { + if (Character.isWhitespace (unit.ch)) + { + continue; + } + if (unit.ch == '#') + { + for (int i = index; i < pLength; i++) + { + if (pattern[i] == '\n') + { + index = i + 1; + continue; + } + else if (pattern[i] == '\r') + { + if (i + 1 < pLength && pattern[i + 1] == '\n') + { + index = i + 2; + } + else + { + index = i + 1; + } + continue; + } + } + index = pLength; + continue; + } + } + + // ALTERNATION OPERATOR + // \| or | (if RE_NO_BK_VBAR) or newline (if RE_NEWLINE_ALT) + // not available if RE_LIMITED_OPS is set + + // TODO: the '\n' literal here should be a test against REToken.newline, + // which unfortunately may be more than a single character. + if (((unit.ch == '|' + && (syntax.get (RESyntax.RE_NO_BK_VBAR) ^ (unit.bk || quot))) + || (syntax.get (RESyntax.RE_NEWLINE_ALT) && (unit.ch == '\n') + && !(unit.bk || quot))) + && !syntax.get (RESyntax.RE_LIMITED_OPS)) + { + // make everything up to here be a branch. create vector if nec. + addToken (currentToken); + RE theBranch = + new RE (firstToken, lastToken, numSubs, subIndex, minimumLength, + maximumLength); + minimumLength = 0; + maximumLength = 0; + if (branches == null) + { + branches = new ArrayList < REToken > (); + } + branches.add (theBranch); + firstToken = lastToken = currentToken = null; + } + + // INTERVAL OPERATOR: + // {x} | {x,} | {x,y} (RE_INTERVALS && RE_NO_BK_BRACES) + // \{x\} | \{x,\} | \{x,y\} (RE_INTERVALS && !RE_NO_BK_BRACES) + // + // OPEN QUESTION: + // what is proper interpretation of '{' at start of string? + // + // This method used to check "repeat.empty.token" to avoid such regexp + // as "(a*){2,}", but now "repeat.empty.token" is allowed. + + else if ((unit.ch == '{') && syntax.get (RESyntax.RE_INTERVALS) + && (syntax. + get (RESyntax.RE_NO_BK_BRACES) ^ (unit.bk || quot))) + { + int newIndex = getMinMax (pattern, index, minMax, syntax); + if (newIndex > index) + { + if (minMax.first > minMax.second) + throw new + REException (getLocalizedMessage ("interval.order"), + REException.REG_BADRPT, newIndex); + if (currentToken == null) + throw new + REException (getLocalizedMessage ("repeat.no.token"), + REException.REG_BADRPT, newIndex); + if (currentToken instanceof RETokenRepeated) + throw new + REException (getLocalizedMessage ("repeat.chained"), + REException.REG_BADRPT, newIndex); + if (currentToken instanceof RETokenWordBoundary + || currentToken instanceof RETokenWordBoundary) + throw new + REException (getLocalizedMessage ("repeat.assertion"), + REException.REG_BADRPT, newIndex); + index = newIndex; + currentToken = + setRepeated (currentToken, minMax.first, minMax.second, + index); + } + else + { + addToken (currentToken); + currentToken = new RETokenChar (subIndex, unit.ch, insens); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + } + + // LIST OPERATOR: + // [...] | [^...] + + else if ((unit.ch == '[') && !(unit.bk || quot)) + { + // Create a new RETokenOneOf + ParseCharClassResult result = + parseCharClass (subIndex, pattern, index, pLength, cflags, + syntax, 0); + addToken (currentToken); + currentToken = result.token; + index = result.index; + } + + // SUBEXPRESSIONS + // (...) | \(...\) depending on RE_NO_BK_PARENS + + else if ((unit.ch == '(') + && (syntax. + get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot))) + { + boolean pure = false; + boolean comment = false; + boolean lookAhead = false; + boolean lookBehind = false; + boolean independent = false; + boolean negativelh = false; + boolean negativelb = false; + if ((index + 1 < pLength) && (pattern[index] == '?')) + { + switch (pattern[index + 1]) + { + case '!': + if (syntax.get (RESyntax.RE_LOOKAHEAD)) + { + pure = true; + negativelh = true; + lookAhead = true; + index += 2; + } + break; + case '=': + if (syntax.get (RESyntax.RE_LOOKAHEAD)) + { + pure = true; + lookAhead = true; + index += 2; + } + break; + case '<': + // We assume that if the syntax supports look-ahead, + // it also supports look-behind. + if (syntax.get (RESyntax.RE_LOOKAHEAD)) + { + index++; + switch (pattern[index + 1]) + { + case '!': + pure = true; + negativelb = true; + lookBehind = true; + index += 2; + break; + case '=': + pure = true; + lookBehind = true; + index += 2; + } + } + break; + case '>': + // We assume that if the syntax supports look-ahead, + // it also supports independent group. + if (syntax.get (RESyntax.RE_LOOKAHEAD)) + { + pure = true; + independent = true; + index += 2; + } + break; + case 'i': + case 'd': + case 'm': + case 's': + case 'u': + case 'x': + case '-': + if (!syntax.get (RESyntax.RE_EMBEDDED_FLAGS)) + break; + // Set or reset syntax flags. + int flagIndex = index + 1; + int endFlag = -1; + RESyntax newSyntax = new RESyntax (syntax); + int newCflags = cflags; + boolean negate = false; + while (flagIndex < pLength && endFlag < 0) + { + switch (pattern[flagIndex]) + { + case 'i': + if (negate) + newCflags &= ~REG_ICASE; + else + newCflags |= REG_ICASE; + flagIndex++; + break; + case 'd': + if (negate) + newSyntax.setLineSeparator (RESyntax. + DEFAULT_LINE_SEPARATOR); + else + newSyntax.setLineSeparator ("\n"); + flagIndex++; + break; + case 'm': + if (negate) + newCflags &= ~REG_MULTILINE; + else + newCflags |= REG_MULTILINE; + flagIndex++; + break; + case 's': + if (negate) + newCflags &= ~REG_DOT_NEWLINE; + else + newCflags |= REG_DOT_NEWLINE; + flagIndex++; + break; + case 'u': + if (negate) + newCflags |= REG_ICASE_USASCII; + else + newCflags &= ~REG_ICASE_USASCII; + flagIndex++; + break; + case 'x': + if (negate) + newCflags &= ~REG_X_COMMENTS; + else + newCflags |= REG_X_COMMENTS; + flagIndex++; + break; + case '-': + negate = true; + flagIndex++; + break; + case ':': + case ')': + endFlag = pattern[flagIndex]; + break; + default: + throw new + REException (getLocalizedMessage + ("repeat.no.token"), + REException.REG_BADRPT, index); + } + } + if (endFlag == ')') + { + syntax = newSyntax; + cflags = newCflags; + insens = ((cflags & REG_ICASE) > 0); + insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); + // This can be treated as though it were a comment. + comment = true; + index = flagIndex - 1; + break; + } + if (endFlag == ':') + { + savedSyntax = syntax; + savedCflags = cflags; + flagsSaved = true; + syntax = newSyntax; + cflags = newCflags; + insens = ((cflags & REG_ICASE) > 0); + insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); + index = flagIndex - 1; + // Fall through to the next case. + } + else + { + throw new + REException (getLocalizedMessage + ("unmatched.paren"), + REException.REG_ESUBREG, index); + } + case ':': + if (syntax.get (RESyntax.RE_PURE_GROUPING)) + { + pure = true; + index += 2; + } + break; + case '#': + if (syntax.get (RESyntax.RE_COMMENTS)) + { + comment = true; + } + break; + default: + throw new + REException (getLocalizedMessage ("repeat.no.token"), + REException.REG_BADRPT, index); + } + } + + if (index >= pLength) + { + throw new + REException (getLocalizedMessage ("unmatched.paren"), + REException.REG_ESUBREG, index); + } + + // find end of subexpression + int endIndex = index; + int nextIndex = index; + int nested = 0; + + while (((nextIndex = + getCharUnit (pattern, endIndex, unit, false)) > 0) + && !(nested == 0 && (unit.ch == ')') + && (syntax. + get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk + || quot)))) + { + if ((endIndex = nextIndex) >= pLength) + throw new + REException (getLocalizedMessage ("subexpr.no.end"), + REException.REG_ESUBREG, nextIndex); + else + if ((unit.ch == '[') && !(unit.bk || quot)) + { + // I hate to do something similar to the LIST OPERATOR matters + // above, but ... + int listIndex = nextIndex; + if (listIndex < pLength && pattern[listIndex] == '^') + listIndex++; + if (listIndex < pLength && pattern[listIndex] == ']') + listIndex++; + int listEndIndex = -1; + int listNest = 0; + while (listIndex < pLength && listEndIndex < 0) + { + switch (pattern[listIndex++]) + { + case '\\': + listIndex++; + break; + case '[': + // Sun's API document says that regexp like "[a-d[m-p]]" + // is legal. Even something like "[[[^]]]]" is accepted. + listNest++; + if (listIndex < pLength + && pattern[listIndex] == '^') + listIndex++; + if (listIndex < pLength + && pattern[listIndex] == ']') + listIndex++; + break; + case ']': + if (listNest == 0) + listEndIndex = listIndex; + listNest--; + break; + } + } + if (listEndIndex >= 0) + { + nextIndex = listEndIndex; + if ((endIndex = nextIndex) >= pLength) + throw new + REException (getLocalizedMessage ("subexpr.no.end"), + REException.REG_ESUBREG, nextIndex); + else + continue; + } + throw new + REException (getLocalizedMessage ("subexpr.no.end"), + REException.REG_ESUBREG, nextIndex); + } + else if (unit.ch == '(' + && (syntax. + get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk + || quot))) + nested++; + else if (unit.ch == ')' + && (syntax. + get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk + || quot))) + nested--; + } + + // endIndex is now position at a ')','\)' + // nextIndex is end of string or position after ')' or '\)' + + if (comment) + index = nextIndex; + else + { // not a comment + // create RE subexpression as token. + addToken (currentToken); + if (!pure) + { + numSubs++; + } + + int useIndex = (pure || lookAhead || lookBehind + || independent) ? 0 : nextSub + numSubs; + currentToken = + new RE (String.valueOf (pattern, index, endIndex - index). + toCharArray (), cflags, syntax, useIndex, + nextSub + numSubs); + numSubs += ((RE) currentToken).getNumSubs (); + + if (lookAhead) + { + currentToken = + new RETokenLookAhead (currentToken, negativelh); + } + else if (lookBehind) + { + currentToken = + new RETokenLookBehind (currentToken, negativelb); + } + else if (independent) + { + currentToken = new RETokenIndependent (currentToken); + } + + index = nextIndex; + if (flagsSaved) + { + syntax = savedSyntax; + cflags = savedCflags; + insens = ((cflags & REG_ICASE) > 0); + insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); + flagsSaved = false; + } + } // not a comment + } // subexpression + + // UNMATCHED RIGHT PAREN + // ) or \) throw exception if + // !syntax.get(RESyntax.RE_UNMATCHED_RIGHT_PAREN_ORD) + else if (!syntax.get (RESyntax.RE_UNMATCHED_RIGHT_PAREN_ORD) + && ((unit.ch == ')') + && (syntax. + get (RESyntax.RE_NO_BK_PARENS) ^ (unit.bk || quot)))) + { + throw new REException (getLocalizedMessage ("unmatched.paren"), + REException.REG_EPAREN, index); + } + + // START OF LINE OPERATOR + // ^ + + else if ((unit.ch == '^') && !(unit.bk || quot)) + { + addToken (currentToken); + currentToken = null; + RETokenStart token = null; + if ((cflags & REG_MULTILINE) > 0) + { + String sep = syntax.getLineSeparator (); + if (sep == null) + { + token = new RETokenStart (subIndex, null, true); + } + else + { + token = new RETokenStart (subIndex, sep); + } + } + else + { + token = new RETokenStart (subIndex, null); + } + addToken (token); + } + + // END OF LINE OPERATOR + // $ + + else if ((unit.ch == '$') && !(unit.bk || quot)) + { + addToken (currentToken); + currentToken = null; + RETokenEnd token = null; + if ((cflags & REG_MULTILINE) > 0) + { + String sep = syntax.getLineSeparator (); + if (sep == null) + { + token = new RETokenEnd (subIndex, null, true); + } + else + { + token = new RETokenEnd (subIndex, sep); + } + } + else + { + token = new RETokenEnd (subIndex, null); + } + addToken (token); + } + + // MATCH-ANY-CHARACTER OPERATOR (except possibly newline and null) + // . + + else if ((unit.ch == '.') && !(unit.bk || quot)) + { + addToken (currentToken); + currentToken = + new RETokenAny (subIndex, syntax.get (RESyntax.RE_DOT_NEWLINE) + || ((cflags & REG_DOT_NEWLINE) > 0), + syntax.get (RESyntax.RE_DOT_NOT_NULL)); + } + + // ZERO-OR-MORE REPEAT OPERATOR + // * + // + // This method used to check "repeat.empty.token" to avoid such regexp + // as "(a*)*", but now "repeat.empty.token" is allowed. + + else if ((unit.ch == '*') && !(unit.bk || quot)) + { + if (currentToken == null) + throw new REException (getLocalizedMessage ("repeat.no.token"), + REException.REG_BADRPT, index); + if (currentToken instanceof RETokenRepeated) + throw new REException (getLocalizedMessage ("repeat.chained"), + REException.REG_BADRPT, index); + if (currentToken instanceof RETokenWordBoundary + || currentToken instanceof RETokenWordBoundary) + throw new REException (getLocalizedMessage ("repeat.assertion"), + REException.REG_BADRPT, index); + currentToken = + setRepeated (currentToken, 0, Integer.MAX_VALUE, index); + } + + // ONE-OR-MORE REPEAT OPERATOR / POSSESSIVE MATCHING OPERATOR + // + | \+ depending on RE_BK_PLUS_QM + // not available if RE_LIMITED_OPS is set + // + // This method used to check "repeat.empty.token" to avoid such regexp + // as "(a*)+", but now "repeat.empty.token" is allowed. + + else if ((unit.ch == '+') && !syntax.get (RESyntax.RE_LIMITED_OPS) + && (!syntax. + get (RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot))) + { + if (currentToken == null) + throw new REException (getLocalizedMessage ("repeat.no.token"), + REException.REG_BADRPT, index); + + // Check for possessive matching on RETokenRepeated + if (currentToken instanceof RETokenRepeated) + { + RETokenRepeated tokenRep = (RETokenRepeated) currentToken; + if (syntax.get (RESyntax.RE_POSSESSIVE_OPS) + && !tokenRep.isPossessive () && !tokenRep.isStingy ()) + tokenRep.makePossessive (); + else + throw new + REException (getLocalizedMessage ("repeat.chained"), + REException.REG_BADRPT, index); + + } + else if (currentToken instanceof RETokenWordBoundary + || currentToken instanceof RETokenWordBoundary) + throw new REException (getLocalizedMessage ("repeat.assertion"), + REException.REG_BADRPT, index); + else + currentToken = + setRepeated (currentToken, 1, Integer.MAX_VALUE, index); + } + + // ZERO-OR-ONE REPEAT OPERATOR / STINGY MATCHING OPERATOR + // ? | \? depending on RE_BK_PLUS_QM + // not available if RE_LIMITED_OPS is set + // stingy matching if RE_STINGY_OPS is set and it follows a quantifier + + else if ((unit.ch == '?') && !syntax.get (RESyntax.RE_LIMITED_OPS) + && (!syntax. + get (RESyntax.RE_BK_PLUS_QM) ^ (unit.bk || quot))) + { + if (currentToken == null) + throw new REException (getLocalizedMessage ("repeat.no.token"), + REException.REG_BADRPT, index); + + // Check for stingy matching on RETokenRepeated + if (currentToken instanceof RETokenRepeated) + { + RETokenRepeated tokenRep = (RETokenRepeated) currentToken; + if (syntax.get (RESyntax.RE_STINGY_OPS) + && !tokenRep.isStingy () && !tokenRep.isPossessive ()) + tokenRep.makeStingy (); + else + throw new + REException (getLocalizedMessage ("repeat.chained"), + REException.REG_BADRPT, index); + } + else if (currentToken instanceof RETokenWordBoundary + || currentToken instanceof RETokenWordBoundary) + throw new REException (getLocalizedMessage ("repeat.assertion"), + REException.REG_BADRPT, index); + else + currentToken = setRepeated (currentToken, 0, 1, index); + } + + // OCTAL CHARACTER + // \0377 + + else if (unit.bk && (unit.ch == '0') + && syntax.get (RESyntax.RE_OCTAL_CHAR)) + { + CharExpression ce = + getCharExpression (pattern, index - 2, pLength, syntax); + if (ce == null) + throw new REException ("invalid octal character", + REException.REG_ESCAPE, index); + index = index - 2 + ce.len; + addToken (currentToken); + currentToken = new RETokenChar (subIndex, ce.ch, insens); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + + // BACKREFERENCE OPERATOR + // \1 \2 ... \9 and \10 \11 \12 ... + // not available if RE_NO_BK_REFS is set + // Perl recognizes \10, \11, and so on only if enough number of + // parentheses have opened before it, otherwise they are treated + // as aliases of \010, \011, ... (octal characters). In case of + // Sun's JDK, octal character expression must always begin with \0. + // We will do as JDK does. But FIXME, take a look at "(a)(b)\29". + // JDK treats \2 as a back reference to the 2nd group because + // there are only two groups. But in our poor implementation, + // we cannot help but treat \29 as a back reference to the 29th group. + + else if (unit.bk && Character.isDigit (unit.ch) + && !syntax.get (RESyntax.RE_NO_BK_REFS)) + { + addToken (currentToken); + int numBegin = index - 1; + int numEnd = pLength; + for (int i = index; i < pLength; i++) + { + if (!Character.isDigit (pattern[i])) + { + numEnd = i; + break; + } + } + int num = parseInt (pattern, numBegin, numEnd - numBegin, 10); + + currentToken = new RETokenBackRef (subIndex, num, insens); + if (insensUSASCII) + currentToken.unicodeAware = false; + index = numEnd; + } + + // START OF STRING OPERATOR + // \A if RE_STRING_ANCHORS is set + + else if (unit.bk && (unit.ch == 'A') + && syntax.get (RESyntax.RE_STRING_ANCHORS)) + { + addToken (currentToken); + currentToken = new RETokenStart (subIndex, null); + } + + // WORD BREAK OPERATOR + // \b if ???? + + else if (unit.bk && (unit.ch == 'b') + && syntax.get (RESyntax.RE_STRING_ANCHORS)) + { + addToken (currentToken); + currentToken = + new RETokenWordBoundary (subIndex, + RETokenWordBoundary. + BEGIN | RETokenWordBoundary.END, + false); + } + + // WORD BEGIN OPERATOR + // \< if ???? + else if (unit.bk && (unit.ch == '<')) + { + addToken (currentToken); + currentToken = + new RETokenWordBoundary (subIndex, RETokenWordBoundary.BEGIN, + false); + } + + // WORD END OPERATOR + // \> if ???? + else if (unit.bk && (unit.ch == '>')) + { + addToken (currentToken); + currentToken = + new RETokenWordBoundary (subIndex, RETokenWordBoundary.END, + false); + } + + // NON-WORD BREAK OPERATOR + // \B if ???? + + else if (unit.bk && (unit.ch == 'B') + && syntax.get (RESyntax.RE_STRING_ANCHORS)) + { + addToken (currentToken); + currentToken = + new RETokenWordBoundary (subIndex, + RETokenWordBoundary. + BEGIN | RETokenWordBoundary.END, true); + } + + + // DIGIT OPERATOR + // \d if RE_CHAR_CLASS_ESCAPES is set + + else if (unit.bk && (unit.ch == 'd') + && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES)) + { + addToken (currentToken); + currentToken = + new RETokenPOSIX (subIndex, RETokenPOSIX.DIGIT, insens, false); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + + // NON-DIGIT OPERATOR + // \D + + else if (unit.bk && (unit.ch == 'D') + && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES)) + { + addToken (currentToken); + currentToken = + new RETokenPOSIX (subIndex, RETokenPOSIX.DIGIT, insens, true); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + + // NEWLINE ESCAPE + // \n + + else if (unit.bk && (unit.ch == 'n')) + { + addToken (currentToken); + currentToken = new RETokenChar (subIndex, '\n', false); + } + + // RETURN ESCAPE + // \r + + else if (unit.bk && (unit.ch == 'r')) + { + addToken (currentToken); + currentToken = new RETokenChar (subIndex, '\r', false); + } + + // WHITESPACE OPERATOR + // \s if RE_CHAR_CLASS_ESCAPES is set + + else if (unit.bk && (unit.ch == 's') + && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES)) + { + addToken (currentToken); + currentToken = + new RETokenPOSIX (subIndex, RETokenPOSIX.SPACE, insens, false); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + + // NON-WHITESPACE OPERATOR + // \S + + else if (unit.bk && (unit.ch == 'S') + && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES)) + { + addToken (currentToken); + currentToken = + new RETokenPOSIX (subIndex, RETokenPOSIX.SPACE, insens, true); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + + // TAB ESCAPE + // \t + + else if (unit.bk && (unit.ch == 't')) + { + addToken (currentToken); + currentToken = new RETokenChar (subIndex, '\t', false); + } + + // ALPHANUMERIC OPERATOR + // \w + + else if (unit.bk && (unit.ch == 'w') + && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES)) + { + addToken (currentToken); + currentToken = + new RETokenPOSIX (subIndex, RETokenPOSIX.ALNUM, insens, false); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + + // NON-ALPHANUMERIC OPERATOR + // \W + + else if (unit.bk && (unit.ch == 'W') + && syntax.get (RESyntax.RE_CHAR_CLASS_ESCAPES)) + { + addToken (currentToken); + currentToken = + new RETokenPOSIX (subIndex, RETokenPOSIX.ALNUM, insens, true); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + + // END OF STRING OPERATOR + // \Z, \z + + // FIXME: \Z and \z are different in that if the input string + // ends with a line terminator, \Z matches the position before + // the final terminator. This special behavior of \Z is yet + // to be implemented. + + else if (unit.bk && (unit.ch == 'Z' || unit.ch == 'z') && + syntax.get (RESyntax.RE_STRING_ANCHORS)) + { + addToken (currentToken); + currentToken = new RETokenEnd (subIndex, null); + } + + // HEX CHARACTER, UNICODE CHARACTER + // \x1B, \u1234 + + else + if ((unit.bk && (unit.ch == 'x') + && syntax.get (RESyntax.RE_HEX_CHAR)) || (unit.bk + && (unit.ch == 'u') + && syntax. + get (RESyntax. + RE_UNICODE_CHAR))) + { + CharExpression ce = + getCharExpression (pattern, index - 2, pLength, syntax); + if (ce == null) + throw new REException ("invalid hex character", + REException.REG_ESCAPE, index); + index = index - 2 + ce.len; + addToken (currentToken); + currentToken = new RETokenChar (subIndex, ce.ch, insens); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + + // NAMED PROPERTY + // \p{prop}, \P{prop} + + else + if ((unit.bk && (unit.ch == 'p') + && syntax.get (RESyntax.RE_NAMED_PROPERTY)) || (unit.bk + && (unit.ch == + 'P') + && syntax. + get (RESyntax. + RE_NAMED_PROPERTY))) + { + NamedProperty np = getNamedProperty (pattern, index - 2, pLength); + if (np == null) + throw new REException ("invalid escape sequence", + REException.REG_ESCAPE, index); + index = index - 2 + np.len; + addToken (currentToken); + currentToken = + getRETokenNamedProperty (subIndex, np, insens, index); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + + // END OF PREVIOUS MATCH + // \G + + else if (unit.bk && (unit.ch == 'G') && + syntax.get (RESyntax.RE_STRING_ANCHORS)) + { + addToken (currentToken); + currentToken = new RETokenEndOfPreviousMatch (subIndex); + } + + // NON-SPECIAL CHARACTER (or escape to make literal) + // c | \* for example + + else + { // not a special character + addToken (currentToken); + currentToken = new RETokenChar (subIndex, unit.ch, insens); + if (insensUSASCII) + currentToken.unicodeAware = false; + } + } // end while + + // Add final buffered token and an EndSub marker + addToken (currentToken); + + if (branches != null) + { + branches. + add (new + RE (firstToken, lastToken, numSubs, subIndex, minimumLength, + maximumLength)); + branches.trimToSize (); // compact the Vector + minimumLength = 0; + maximumLength = 0; + firstToken = lastToken = null; + addToken (new RETokenOneOf (subIndex, branches, false)); + } + else + addToken (new RETokenEndSub (subIndex)); + + } + + private static class ParseCharClassResult + { + RETokenOneOf token; + int index; + boolean returnAtAndOperator = false; + } + + /** + * Parse [...] or [^...] and make an RETokenOneOf instance. + * @param subIndex subIndex to be given to the created RETokenOneOf instance. + * @param pattern Input array of characters to be parsed. + * @param index Index pointing to the character next to the beginning '['. + * @param pLength Limit of the input array. + * @param cflags Compilation flags used to parse the pattern. + * @param pflags Flags that affect the behavior of this method. + * @param syntax Syntax used to parse the pattern. + */ + private static ParseCharClassResult parseCharClass (int subIndex, + char[]pattern, + int index, int pLength, + int cflags, + RESyntax syntax, + int pflags) throws + REException + { + + boolean insens = ((cflags & REG_ICASE) > 0); + boolean insensUSASCII = ((cflags & REG_ICASE_USASCII) > 0); + final ArrayList < REToken > options = new ArrayList < REToken > (); + ArrayList < Object > addition = new ArrayList < Object > (); + boolean additionAndAppeared = false; + final int RETURN_AT_AND = 0x01; + boolean returnAtAndOperator = ((pflags & RETURN_AT_AND) != 0); + boolean negative = false; + char ch; + + char lastChar = 0; + boolean lastCharIsSet = false; + if (index == pLength) + throw new REException (getLocalizedMessage ("unmatched.bracket"), + REException.REG_EBRACK, index); + + // Check for initial caret, negation + if ((ch = pattern[index]) == '^') + { + negative = true; + if (++index == pLength) + throw new REException (getLocalizedMessage ("class.no.end"), + REException.REG_EBRACK, index); + ch = pattern[index]; + } + + // Check for leading right bracket literal + if (ch == ']') + { + lastChar = ch; + lastCharIsSet = true; + if (++index == pLength) + throw new REException (getLocalizedMessage ("class.no.end"), + REException.REG_EBRACK, index); + } + + while ((ch = pattern[index++]) != ']') + { + if ((ch == '-') && (lastCharIsSet)) + { + if (index == pLength) + throw new REException (getLocalizedMessage ("class.no.end"), + REException.REG_EBRACK, index); + if ((ch = pattern[index]) == ']') + { + RETokenChar t = new RETokenChar (subIndex, lastChar, insens); + if (insensUSASCII) + t.unicodeAware = false; + options.add (t); + lastChar = '-'; + } + else + { + if ((ch == '\\') + && syntax.get (RESyntax.RE_BACKSLASH_ESCAPE_IN_LISTS)) + { + CharExpression ce = + getCharExpression (pattern, index, pLength, syntax); + if (ce == null) + throw new REException ("invalid escape sequence", + REException.REG_ESCAPE, index); + ch = ce.ch; + index = index + ce.len - 1; + } + RETokenRange t = + new RETokenRange (subIndex, lastChar, ch, insens); + if (insensUSASCII) + t.unicodeAware = false; + options.add (t); + lastChar = 0; + lastCharIsSet = false; + index++; + } + } + else if ((ch == '\\') + && syntax.get (RESyntax.RE_BACKSLASH_ESCAPE_IN_LISTS)) + { + if (index == pLength) + throw new REException (getLocalizedMessage ("class.no.end"), + REException.REG_EBRACK, index); + int posixID = -1; + boolean negate = false; + char asciiEsc = 0; + boolean asciiEscIsSet = false; + NamedProperty np = null; + if (("dswDSW".indexOf (pattern[index]) != -1) + && syntax.get (RESyntax.RE_CHAR_CLASS_ESC_IN_LISTS)) + { + switch (pattern[index]) + { + case 'D': + negate = true; + case 'd': + posixID = RETokenPOSIX.DIGIT; + break; + case 'S': + negate = true; + case 's': + posixID = RETokenPOSIX.SPACE; + break; + case 'W': + negate = true; + case 'w': + posixID = RETokenPOSIX.ALNUM; + break; + } + } + if (("pP".indexOf (pattern[index]) != -1) + && syntax.get (RESyntax.RE_NAMED_PROPERTY)) + { + np = getNamedProperty (pattern, index - 1, pLength); + if (np == null) + throw new REException ("invalid escape sequence", + REException.REG_ESCAPE, index); + index = index - 1 + np.len - 1; + } + else + { + CharExpression ce = + getCharExpression (pattern, index - 1, pLength, syntax); + if (ce == null) + throw new REException ("invalid escape sequence", + REException.REG_ESCAPE, index); + asciiEsc = ce.ch; + asciiEscIsSet = true; + index = index - 1 + ce.len - 1; + } + if (lastCharIsSet) + { + RETokenChar t = new RETokenChar (subIndex, lastChar, insens); + if (insensUSASCII) + t.unicodeAware = false; + options.add (t); + } + + if (posixID != -1) + { + RETokenPOSIX t = + new RETokenPOSIX (subIndex, posixID, insens, negate); + if (insensUSASCII) + t.unicodeAware = false; + options.add (t); + } + else if (np != null) + { + RETokenNamedProperty t = + getRETokenNamedProperty (subIndex, np, insens, index); + if (insensUSASCII) + t.unicodeAware = false; + options.add (t); + } + else if (asciiEscIsSet) + { + lastChar = asciiEsc; + lastCharIsSet = true; + } + else + { + lastChar = pattern[index]; + lastCharIsSet = true; + } + ++index; + } + else if ((ch == '[') && (syntax.get (RESyntax.RE_CHAR_CLASSES)) + && (index < pLength) && (pattern[index] == ':')) + { + CPStringBuilder posixSet = new CPStringBuilder (); + index = getPosixSet (pattern, index + 1, posixSet); + int posixId = RETokenPOSIX.intValue (posixSet.toString ()); + if (posixId != -1) + { + RETokenPOSIX t = + new RETokenPOSIX (subIndex, posixId, insens, false); + if (insensUSASCII) + t.unicodeAware = false; + options.add (t); + } + } + else if ((ch == '[') && (syntax.get (RESyntax.RE_NESTED_CHARCLASS))) + { + ParseCharClassResult result = + parseCharClass (subIndex, pattern, index, pLength, cflags, + syntax, 0); + addition.add (result.token); + addition.add ("|"); + index = result.index; + } + else if ((ch == '&') && + (syntax.get (RESyntax.RE_NESTED_CHARCLASS)) && + (index < pLength) && (pattern[index] == '&')) + { + if (returnAtAndOperator) + { + ParseCharClassResult result = new ParseCharClassResult (); + options.trimToSize (); + if (additionAndAppeared) + addition.add ("&"); + if (addition.size () == 0) + addition = null; + result.token = new RETokenOneOf (subIndex, + options, addition, negative); + result.index = index - 1; + result.returnAtAndOperator = true; + return result; + } + // The precedence of the operator "&&" is the lowest. + // So we postpone adding "&" until other elements + // are added. And we insert Boolean.FALSE at the + // beginning of the list of tokens following "&&". + // So, "&&[a-b][k-m]" will be stored in the Vecter + // addition in this order: + // Boolean.FALSE, [a-b], "|", [k-m], "|", "&" + if (additionAndAppeared) + addition.add ("&"); + addition.add (Boolean.FALSE); + additionAndAppeared = true; + + // The part on which "&&" operates may be either + // (1) explicitly enclosed by [] + // or + // (2) not enclosed by [] and terminated by the + // next "&&" or the end of the character list. + // Let the preceding else if block do the case (1). + // We must do something in case of (2). + if ((index + 1 < pLength) && (pattern[index + 1] != '[')) + { + ParseCharClassResult result = + parseCharClass (subIndex, pattern, index + 1, pLength, + cflags, syntax, + RETURN_AT_AND); + addition.add (result.token); + addition.add ("|"); + // If the method returned at the next "&&", it is OK. + // Otherwise we have eaten the mark of the end of this + // character list "]". In this case we must give back + // the end mark. + index = (result.returnAtAndOperator ? + result.index : result.index - 1); + } + } + else + { + if (lastCharIsSet) + { + RETokenChar t = new RETokenChar (subIndex, lastChar, insens); + if (insensUSASCII) + t.unicodeAware = false; + options.add (t); + } + lastChar = ch; + lastCharIsSet = true; + } + if (index == pLength) + throw new REException (getLocalizedMessage ("class.no.end"), + REException.REG_EBRACK, index); + } // while in list + // Out of list, index is one past ']' + + if (lastCharIsSet) + { + RETokenChar t = new RETokenChar (subIndex, lastChar, insens); + if (insensUSASCII) + t.unicodeAware = false; + options.add (t); + } + + ParseCharClassResult result = new ParseCharClassResult (); + // Create a new RETokenOneOf + options.trimToSize (); + if (additionAndAppeared) + addition.add ("&"); + if (addition.size () == 0) + addition = null; + result.token = new RETokenOneOf (subIndex, options, addition, negative); + result.index = index; + return result; + } + + private static int getCharUnit (char[]input, int index, CharUnit unit, + boolean quot) throws REException + { + unit.ch = input[index++]; + unit.bk = (unit.ch == '\\' + && (!quot || index >= input.length || input[index] == 'E')); + if (unit.bk) + if (index < input.length) + unit.ch = input[index++]; + else + throw new REException (getLocalizedMessage ("ends.with.backslash"), + REException.REG_ESCAPE, index); + return index; + } + + private static int parseInt (char[]input, int pos, int len, int radix) + { + int ret = 0; + for (int i = pos; i < pos + len; i++) + { + ret = ret * radix + Character.digit (input[i], radix); + } + return ret; + } + + /** + * This class represents various expressions for a character. + * "a" : 'a' itself. + * "\0123" : Octal char 0123 + * "\x1b" : Hex char 0x1b + * "\u1234" : Unicode char \u1234 + */ + private static class CharExpression + { + /** character represented by this expression */ + char ch; + /** String expression */ + String expr; + /** length of this expression */ + int len; + public String toString () + { + return expr; + } + } + + private static CharExpression getCharExpression (char[]input, int pos, + int lim, RESyntax syntax) + { + CharExpression ce = new CharExpression (); + char c = input[pos]; + if (c == '\\') + { + if (pos + 1 >= lim) + return null; + c = input[pos + 1]; + switch (c) + { + case 't': + ce.ch = '\t'; + ce.len = 2; + break; + case 'n': + ce.ch = '\n'; + ce.len = 2; + break; + case 'r': + ce.ch = '\r'; + ce.len = 2; + break; + case 'x': + case 'u': + if ((c == 'x' && syntax.get (RESyntax.RE_HEX_CHAR)) || + (c == 'u' && syntax.get (RESyntax.RE_UNICODE_CHAR))) + { + int l = 0; + int expectedLength = (c == 'x' ? 2 : 4); + for (int i = pos + 2; i < pos + 2 + expectedLength; i++) + { + if (i >= lim) + break; + if (!((input[i] >= '0' && input[i] <= '9') || + (input[i] >= 'A' && input[i] <= 'F') || + (input[i] >= 'a' && input[i] <= 'f'))) + break; + l++; + } + if (l != expectedLength) + return null; + ce.ch = (char) (parseInt (input, pos + 2, l, 16)); + ce.len = l + 2; + } + else + { + ce.ch = c; + ce.len = 2; + } + break; + case '0': + if (syntax.get (RESyntax.RE_OCTAL_CHAR)) + { + int l = 0; + for (int i = pos + 2; i < pos + 2 + 3; i++) + { + if (i >= lim) + break; + if (input[i] < '0' || input[i] > '7') + break; + l++; + } + if (l == 3 && input[pos + 2] > '3') + l--; + if (l <= 0) + return null; + ce.ch = (char) (parseInt (input, pos + 2, l, 8)); + ce.len = l + 2; + } + else + { + ce.ch = c; + ce.len = 2; + } + break; + default: + ce.ch = c; + ce.len = 2; + break; + } + } + else + { + ce.ch = input[pos]; + ce.len = 1; + } + ce.expr = new String (input, pos, ce.len); + return ce; + } + + /** + * This class represents a substring in a pattern string expressing + * a named property. + * "\pA" : Property named "A" + * "\p{prop}" : Property named "prop" + * "\PA" : Property named "A" (Negated) + * "\P{prop}" : Property named "prop" (Negated) + */ + private static class NamedProperty + { + /** Property name */ + String name; + /** Negated or not */ + boolean negate; + /** length of this expression */ + int len; + } + + private static NamedProperty getNamedProperty (char[]input, int pos, + int lim) + { + NamedProperty np = new NamedProperty (); + char c = input[pos]; + if (c == '\\') + { + if (++pos >= lim) + return null; + c = input[pos++]; + switch (c) + { + case 'p': + np.negate = false; + break; + case 'P': + np.negate = true; + break; + default: + return null; + } + c = input[pos++]; + if (c == '{') + { + int p = -1; + for (int i = pos; i < lim; i++) + { + if (input[i] == '}') + { + p = i; + break; + } + } + if (p < 0) + return null; + int len = p - pos; + np.name = new String (input, pos, len); + np.len = len + 4; + } + else + { + np.name = new String (input, pos - 1, 1); + np.len = 3; + } + return np; + } + else + return null; + } + + private static RETokenNamedProperty getRETokenNamedProperty (int subIndex, + NamedProperty + np, + boolean insens, + int index) + throws REException + { + try + { + return new RETokenNamedProperty (subIndex, np.name, insens, np.negate); + } + catch (REException e) + { + REException ree; + ree = new REException (e.getMessage (), REException.REG_ESCAPE, index); + ree.initCause (e); + throw ree; + } + } + + /** + * Checks if the regular expression matches the input in its entirety. + * + * @param input The input text. + */ + public boolean isMatch (Object input) + { + return isMatch (input, 0, 0); + } + + /** + * Checks if the input string, starting from index, is an exact match of + * this regular expression. + * + * @param input The input text. + * @param index The offset index at which the search should be begin. + */ + public boolean isMatch (Object input, int index) + { + return isMatch (input, index, 0); + } + + + /** + * Checks if the input, starting from index and using the specified + * execution flags, is an exact match of this regular expression. + * + * @param input The input text. + * @param index The offset index at which the search should be begin. + * @param eflags The logical OR of any execution flags above. + */ + public boolean isMatch (Object input, int index, int eflags) + { + return isMatchImpl (makeCharIndexed (input, index), index, eflags); + } + + private boolean isMatchImpl (CharIndexed input, int index, int eflags) + { + if (firstToken == null) // Trivial case + return (input.charAt (0) == CharIndexed.OUT_OF_BOUNDS); + REMatch m = new REMatch (numSubs, index, eflags); + if (firstToken.match (input, m)) + { + if (m != null) + { + if (input.charAt (m.index) == CharIndexed.OUT_OF_BOUNDS) + { + return true; + } + } + } + return false; + } + + /** + * Returns the maximum number of subexpressions in this regular expression. + * If the expression contains branches, the value returned will be the + * maximum subexpressions in any of the branches. + */ + public int getNumSubs () + { + return numSubs; + } + + // Overrides REToken.setUncle + void setUncle (REToken uncle) + { + if (lastToken != null) + { + lastToken.setUncle (uncle); + } + else + super.setUncle (uncle); // to deal with empty subexpressions + } + + // Overrides REToken.chain + + boolean chain (REToken next) + { + super.chain (next); + setUncle (next); + return true; + } + + /** + * Returns the minimum number of characters that could possibly + * constitute a match of this regular expression. + */ + public int getMinimumLength () + { + return minimumLength; + } + + public int getMaximumLength () + { + return maximumLength; + } + + /** + * Returns an array of all matches found in the input. + * + * If the regular expression allows the empty string to match, it will + * substitute matches at all positions except the end of the input. + * + * @param input The input text. + * @return a non-null (but possibly zero-length) array of matches + */ + public REMatch[] getAllMatches (Object input) + { + return getAllMatches (input, 0, 0); + } + + /** + * Returns an array of all matches found in the input, + * beginning at the specified index position. + * + * If the regular expression allows the empty string to match, it will + * substitute matches at all positions except the end of the input. + * + * @param input The input text. + * @param index The offset index at which the search should be begin. + * @return a non-null (but possibly zero-length) array of matches + */ + public REMatch[] getAllMatches (Object input, int index) + { + return getAllMatches (input, index, 0); + } + + /** + * Returns an array of all matches found in the input string, + * beginning at the specified index position and using the specified + * execution flags. + * + * If the regular expression allows the empty string to match, it will + * substitute matches at all positions except the end of the input. + * + * @param input The input text. + * @param index The offset index at which the search should be begin. + * @param eflags The logical OR of any execution flags above. + * @return a non-null (but possibly zero-length) array of matches + */ + public REMatch[] getAllMatches (Object input, int index, int eflags) + { + return getAllMatchesImpl (makeCharIndexed (input, index), index, eflags); + } + + // this has been changed since 1.03 to be non-overlapping matches + private REMatch[] getAllMatchesImpl (CharIndexed input, int index, + int eflags) + { + List < REMatch > all = new ArrayList < REMatch > (); + REMatch m = null; + while ((m = getMatchImpl (input, index, eflags, null)) != null) + { + all.add (m); + index = m.getEndIndex (); + if (m.end[0] == 0) + { // handle pathological case of zero-length match + index++; + input.move (1); + } + else + { + input.move (m.end[0]); + } + if (!input.isValid ()) + break; + } + return all.toArray (new REMatch[all.size ()]); + } + + /* Implements abstract method REToken.match() */ + boolean match (CharIndexed input, REMatch mymatch) + { + input.setHitEnd (mymatch); + if (firstToken == null) + { + return next (input, mymatch); + } + + // Note the start of this subexpression + mymatch.start1[subIndex] = mymatch.index; + + return firstToken.match (input, mymatch); + } + + REMatch findMatch (CharIndexed input, REMatch mymatch) + { + if (mymatch.backtrackStack == null) + mymatch.backtrackStack = new BacktrackStack (); + boolean b = match (input, mymatch); + if (b) + { + return mymatch; + } + return null; + } + + /** + * Returns the first match found in the input. If no match is found, + * null is returned. + * + * @param input The input text. + * @return An REMatch instance referencing the match, or null if none. + */ + public REMatch getMatch (Object input) + { + return getMatch (input, 0, 0); + } + + /** + * Returns the first match found in the input, beginning + * the search at the specified index. If no match is found, + * returns null. + * + * @param input The input text. + * @param index The offset within the text to begin looking for a match. + * @return An REMatch instance referencing the match, or null if none. + */ + public REMatch getMatch (Object input, int index) + { + return getMatch (input, index, 0); + } + + /** + * Returns the first match found in the input, beginning + * the search at the specified index, and using the specified + * execution flags. If no match is found, returns null. + * + * @param input The input text. + * @param index The offset index at which the search should be begin. + * @param eflags The logical OR of any execution flags above. + * @return An REMatch instance referencing the match, or null if none. + */ + public REMatch getMatch (Object input, int index, int eflags) + { + return getMatch (input, index, eflags, null); + } + + /** + * Returns the first match found in the input, beginning the search + * at the specified index, and using the specified execution flags. + * If no match is found, returns null. If a StringBuffer is + * provided and is non-null, the contents of the input text from the + * index to the beginning of the match (or to the end of the input, + * if there is no match) are appended to the StringBuffer. + * + * @param input The input text. + * @param index The offset index at which the search should be begin. + * @param eflags The logical OR of any execution flags above. + * @param buffer The StringBuffer to save pre-match text in. + * @return An REMatch instance referencing the match, or null if none. */ + public REMatch getMatch (Object input, int index, int eflags, + CPStringBuilder buffer) + { + return getMatchImpl (makeCharIndexed (input, index), index, eflags, + buffer); + } + + REMatch getMatchImpl (CharIndexed input, int anchor, int eflags, + CPStringBuilder buffer) + { + boolean tryEntireMatch = ((eflags & REG_TRY_ENTIRE_MATCH) != 0); + boolean doMove = ((eflags & REG_FIX_STARTING_POSITION) == 0); + RE re = (tryEntireMatch ? (RE) this.clone () : this); + if (tryEntireMatch) + { + RETokenEnd reEnd = new RETokenEnd (0, null); + reEnd.setFake (true); + re.chain (reEnd); + } + // Create a new REMatch to hold results + REMatch mymatch = new REMatch (numSubs, anchor, eflags); + do + { + /* The following potimization is commented out because + the matching should be tried even if the length of + input is obviously too short in order that + java.util.regex.Matcher#hitEnd() may work correctly. + // Optimization: check if anchor + minimumLength > length + if (minimumLength == 0 || input.charAt(minimumLength-1) != CharIndexed.OUT_OF_BOUNDS) { + */ + if (re.match (input, mymatch)) + { + REMatch best = mymatch; + // We assume that the match that coms first is the best. + // And the following "The longer, the better" rule has + // been commented out. The longest is not neccesarily + // the best. For example, "a" out of "aaa" is the best + // match for /a+?/. + /* + // Find best match of them all to observe leftmost longest + while ((mymatch = mymatch.next) != null) { + if (mymatch.index > best.index) { + best = mymatch; + } + } + */ + best.end[0] = best.index; + best.finish (input); + input.setLastMatch (best); + return best; + } + /* End of the optimization commented out + } + */ + mymatch.clear (++anchor); + // Append character to buffer if needed + if (buffer != null && input.charAt (0) != CharIndexed.OUT_OF_BOUNDS) + { + buffer.append (input.charAt (0)); + } + // java.util.regex.Matcher#hitEnd() requires that the search should + // be tried at the end of input, so we use move1(1) instead of move(1) + } + while (doMove && input.move1 (1)); + + // Special handling at end of input for e.g. "$" + if (minimumLength == 0) + { + if (match (input, mymatch)) + { + mymatch.finish (input); + return mymatch; + } + } + + return null; + } + + /** + * Returns an REMatchEnumeration that can be used to iterate over the + * matches found in the input text. + * + * @param input The input text. + * @return A non-null REMatchEnumeration instance. + */ + public REMatchEnumeration getMatchEnumeration (Object input) + { + return getMatchEnumeration (input, 0, 0); + } + + + /** + * Returns an REMatchEnumeration that can be used to iterate over the + * matches found in the input text. + * + * @param input The input text. + * @param index The offset index at which the search should be begin. + * @return A non-null REMatchEnumeration instance, with its input cursor + * set to the index position specified. + */ + public REMatchEnumeration getMatchEnumeration (Object input, int index) + { + return getMatchEnumeration (input, index, 0); + } + + /** + * Returns an REMatchEnumeration that can be used to iterate over the + * matches found in the input text. + * + * @param input The input text. + * @param index The offset index at which the search should be begin. + * @param eflags The logical OR of any execution flags above. + * @return A non-null REMatchEnumeration instance, with its input cursor + * set to the index position specified. + */ + public REMatchEnumeration getMatchEnumeration (Object input, int index, + int eflags) + { + return new REMatchEnumeration (this, makeCharIndexed (input, index), + index, eflags); + } + + + /** + * Substitutes the replacement text for the first match found in the input. + * + * @param input The input text. + * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). + * @return A String interpolating the substituted text. + * @see REMatch#substituteInto + */ + public String substitute (Object input, String replace) + { + return substitute (input, replace, 0, 0); + } + + /** + * Substitutes the replacement text for the first match found in the input + * beginning at the specified index position. Specifying an index + * effectively causes the regular expression engine to throw away the + * specified number of characters. + * + * @param input The input text. + * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). + * @param index The offset index at which the search should be begin. + * @return A String containing the substring of the input, starting + * at the index position, and interpolating the substituted text. + * @see REMatch#substituteInto + */ + public String substitute (Object input, String replace, int index) + { + return substitute (input, replace, index, 0); + } + + /** + * Substitutes the replacement text for the first match found in the input + * string, beginning at the specified index position and using the + * specified execution flags. + * + * @param input The input text. + * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). + * @param index The offset index at which the search should be begin. + * @param eflags The logical OR of any execution flags above. + * @return A String containing the substring of the input, starting + * at the index position, and interpolating the substituted text. + * @see REMatch#substituteInto + */ + public String substitute (Object input, String replace, int index, + int eflags) + { + return substituteImpl (makeCharIndexed (input, index), replace, index, + eflags); + } + + private String substituteImpl (CharIndexed input, String replace, int index, + int eflags) + { + CPStringBuilder buffer = new CPStringBuilder (); + REMatch m = getMatchImpl (input, index, eflags, buffer); + if (m == null) + return buffer.toString (); + buffer.append (getReplacement (replace, m, eflags)); + if (input.move (m.end[0])) + { + do + { + buffer.append (input.charAt (0)); + } + while (input.move (1)); + } + return buffer.toString (); + } + + /** + * Substitutes the replacement text for each non-overlapping match found + * in the input text. + * + * @param input The input text. + * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). + * @return A String interpolating the substituted text. + * @see REMatch#substituteInto + */ + public String substituteAll (Object input, String replace) + { + return substituteAll (input, replace, 0, 0); + } + + /** + * Substitutes the replacement text for each non-overlapping match found + * in the input text, starting at the specified index. + * + * If the regular expression allows the empty string to match, it will + * substitute matches at all positions except the end of the input. + * + * @param input The input text. + * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). + * @param index The offset index at which the search should be begin. + * @return A String containing the substring of the input, starting + * at the index position, and interpolating the substituted text. + * @see REMatch#substituteInto + */ + public String substituteAll (Object input, String replace, int index) + { + return substituteAll (input, replace, index, 0); + } + + /** + * Substitutes the replacement text for each non-overlapping match found + * in the input text, starting at the specified index and using the + * specified execution flags. + * + * @param input The input text. + * @param replace The replacement text, which may contain $x metacharacters (see REMatch.substituteInto). + * @param index The offset index at which the search should be begin. + * @param eflags The logical OR of any execution flags above. + * @return A String containing the substring of the input, starting + * at the index position, and interpolating the substituted text. + * @see REMatch#substituteInto + */ + public String substituteAll (Object input, String replace, int index, + int eflags) + { + return substituteAllImpl (makeCharIndexed (input, index), replace, index, + eflags); + } + + private String substituteAllImpl (CharIndexed input, String replace, + int index, int eflags) + { + CPStringBuilder buffer = new CPStringBuilder (); + REMatch m; + while ((m = getMatchImpl (input, index, eflags, buffer)) != null) + { + buffer.append (getReplacement (replace, m, eflags)); + index = m.getEndIndex (); + if (m.end[0] == 0) + { + char ch = input.charAt (0); + if (ch != CharIndexed.OUT_OF_BOUNDS) + buffer.append (ch); + input.move (1); + } + else + { + input.move (m.end[0]); + } + + if (!input.isValid ()) + break; + } + return buffer.toString (); + } + + public static String getReplacement (String replace, REMatch m, int eflags) + { + if ((eflags & REG_NO_INTERPOLATE) > 0) + return replace; + else + { + if ((eflags & REG_REPLACE_USE_BACKSLASHESCAPE) > 0) + { + CPStringBuilder sb = new CPStringBuilder (); + int l = replace.length (); + for (int i = 0; i < l; i++) + { + char c = replace.charAt (i); + switch (c) + { + case '\\': + i++; + // Let StringIndexOutOfBoundsException be thrown. + sb.append (replace.charAt (i)); + break; + case '$': + int i1 = i + 1; + while (i1 < replace.length () && + Character.isDigit (replace.charAt (i1))) + i1++; + sb.append (m.substituteInto (replace.substring (i, i1))); + i = i1 - 1; + break; + default: + sb.append (c); + } + } + return sb.toString (); + } + else + return m.substituteInto (replace); + } + } + + /* Helper function for constructor */ + private void addToken (REToken next) + { + if (next == null) + return; + minimumLength += next.getMinimumLength (); + int nmax = next.getMaximumLength (); + if (nmax < Integer.MAX_VALUE && maximumLength < Integer.MAX_VALUE) + maximumLength += nmax; + else + maximumLength = Integer.MAX_VALUE; + + if (firstToken == null) + { + lastToken = firstToken = next; + } + else + { + // if chain returns false, it "rejected" the token due to + // an optimization, and next was combined with lastToken + if (lastToken.chain (next)) + { + lastToken = next; + } + } + } + + private static REToken setRepeated (REToken current, int min, int max, + int index) throws REException + { + if (current == null) + throw new REException (getLocalizedMessage ("repeat.no.token"), + REException.REG_BADRPT, index); + return new RETokenRepeated (current.subIndex, current, min, max); + } + + private static int getPosixSet (char[]pattern, int index, + CPStringBuilder buf) + { + // Precondition: pattern[index-1] == ':' + // we will return pos of closing ']'. + int i; + for (i = index; i < (pattern.length - 1); i++) + { + if ((pattern[i] == ':') && (pattern[i + 1] == ']')) + return i + 2; + buf.append (pattern[i]); + } + return index; // didn't match up + } + + private int getMinMax (char[]input, int index, IntPair minMax, + RESyntax syntax) throws REException + { + // Precondition: input[index-1] == '{', minMax != null + + boolean mustMatch = !syntax.get (RESyntax.RE_NO_BK_BRACES); + int startIndex = index; + if (index == input.length) + { + if (mustMatch) + throw new REException (getLocalizedMessage ("unmatched.brace"), + REException.REG_EBRACE, index); + else + return startIndex; + } + + int min, max = 0; + CharUnit unit = new CharUnit (); + CPStringBuilder buf = new CPStringBuilder (); + + // Read string of digits + do + { + index = getCharUnit (input, index, unit, false); + if (Character.isDigit (unit.ch)) + buf.append (unit.ch); + } + while ((index != input.length) && Character.isDigit (unit.ch)); + + // Check for {} tomfoolery + if (buf.length () == 0) + { + if (mustMatch) + throw new REException (getLocalizedMessage ("interval.error"), + REException.REG_EBRACE, index); + else + return startIndex; + } + + min = Integer.parseInt (buf.toString ()); + + if ((unit.ch == '}') && (syntax.get (RESyntax.RE_NO_BK_BRACES) ^ unit.bk)) + max = min; + else if (index == input.length) + if (mustMatch) + throw new REException (getLocalizedMessage ("interval.no.end"), + REException.REG_EBRACE, index); + else + return startIndex; + else + if ((unit.ch == ',') && !unit.bk) + { + buf = new CPStringBuilder (); + // Read string of digits + while (((index = + getCharUnit (input, index, unit, false)) != input.length) + && Character.isDigit (unit.ch)) + buf.append (unit.ch); + + if (! + ((unit.ch == '}') + && (syntax.get (RESyntax.RE_NO_BK_BRACES) ^ unit.bk))) + if (mustMatch) + throw new REException (getLocalizedMessage ("interval.error"), + REException.REG_EBRACE, index); + else + return startIndex; + + // This is the case of {x,} + if (buf.length () == 0) + max = Integer.MAX_VALUE; + else + max = Integer.parseInt (buf.toString ()); + } + else if (mustMatch) + throw new REException (getLocalizedMessage ("interval.error"), + REException.REG_EBRACE, index); + else + return startIndex; + + // We know min and max now, and they are valid. + + minMax.first = min; + minMax.second = max; + + // return the index following the '}' + return index; + } + + /** + * Return a human readable form of the compiled regular expression, + * useful for debugging. + */ + public String toString () + { + CPStringBuilder sb = new CPStringBuilder (); + dump (sb); + return sb.toString (); + } + + void dump (CPStringBuilder os) + { + os.append ("(?#startRE subIndex=" + subIndex + ")"); + if (subIndex == 0) + os.append ("?:"); + if (firstToken != null) + firstToken.dumpAll (os); + if (subIndex == 0) + os.append (")"); + os.append ("(?#endRE subIndex=" + subIndex + ")"); + } + + // Cast input appropriately or throw exception + // This method was originally a private method, but has been made + // public because java.util.regex.Matcher uses this. + public static CharIndexed makeCharIndexed (Object input, int index) + { + // The case where input is already a CharIndexed is supposed + // be the most likely because this is the case with + // java.util.regex.Matcher. + // We could let a String or a CharSequence fall through + // to final input, but since it'a very likely input type, + // we check it first. + if (input instanceof CharIndexed) + { + CharIndexed ci = (CharIndexed) input; + ci.setAnchor (index); + return ci; + } + else if (input instanceof CharSequence) + return new CharIndexedCharSequence ((CharSequence) input, index); + else if (input instanceof String) + return new CharIndexedString ((String) input, index); + else if (input instanceof char[]) + return new CharIndexedCharArray ((char[]) input, index); + else if (input instanceof StringBuffer) + return new CharIndexedStringBuffer ((StringBuffer) input, index); + else if (input instanceof InputStream) + return new CharIndexedInputStream ((InputStream) input, index); + else + return new CharIndexedString (input.toString (), index); + } +} diff --git a/libjava/classpath/gnu/java/util/regex/REException.java b/libjava/classpath/gnu/java/util/regex/REException.java index 7a277ca3ae3..5681ceeea6a 100644 --- a/libjava/classpath/gnu/java/util/regex/REException.java +++ b/libjava/classpath/gnu/java/util/regex/REException.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.java.util.regex; +import gnu.java.lang.CPStringBuilder; + import java.text.MessageFormat; /** @@ -53,7 +55,8 @@ import java.text.MessageFormat; * @author Wes Biggs */ -public class REException extends Exception { +public class REException extends Exception +{ private int type; private int pos; @@ -64,25 +67,25 @@ public class REException extends Exception { * Invalid use of repetition operators such as using * `*' as the first character. */ - public static final int REG_BADRPT = 1; + public static final int REG_BADRPT = 1; /** * Error flag. * Invalid use of back reference operator. */ - public static final int REG_BADBR = 2; + public static final int REG_BADBR = 2; /** * Error flag. * Un-matched brace interval operators. */ - public static final int REG_EBRACE = 3; + public static final int REG_EBRACE = 3; /** * Error flag. * Un-matched bracket list operators. */ - public static final int REG_EBRACK = 4; + public static final int REG_EBRACK = 4; /** * Error flag. @@ -90,65 +93,67 @@ public class REException extends Exception { * point of the range occurs prior to the starting * point. */ - public static final int REG_ERANGE = 5; + public static final int REG_ERANGE = 5; /** * Error flag. * Unknown character class name. Not implemented. */ - public static final int REG_ECTYPE = 6; + public static final int REG_ECTYPE = 6; /** * Error flag. * Un-matched parenthesis group operators. */ - public static final int REG_EPAREN = 7; + public static final int REG_EPAREN = 7; /** * Error flag. * Invalid back reference to a subexpression. */ - public static final int REG_ESUBREG = 8; + public static final int REG_ESUBREG = 8; /** * Error flag. * Non specific error. Not implemented. */ - public static final int REG_EEND = 9; + public static final int REG_EEND = 9; /** * Error flag. * Invalid escape sequence. Not implemented. */ - public static final int REG_ESCAPE = 10; + public static final int REG_ESCAPE = 10; /** * Error flag. * Invalid use of pattern operators such as group or list. */ - public static final int REG_BADPAT = 11; + public static final int REG_BADPAT = 11; /** * Error flag. * Compiled regular expression requires a pattern * buffer larger than 64Kb. Not implemented. */ - public static final int REG_ESIZE = 12; + public static final int REG_ESIZE = 12; /** * Error flag. * The regex routines ran out of memory. Not implemented. */ - public static final int REG_ESPACE = 13; + public static final int REG_ESPACE = 13; - REException(String msg, int type, int position) { - super(msg); + REException (String msg, int type, int position) + { + super (msg); this.type = type; this.pos = position; } - REException(String msg, Throwable cause, int type, int position) { - super(msg, cause); + REException (String msg, Throwable cause, int type, int position) + { + super (msg, cause); this.type = type; this.pos = position; } @@ -157,7 +162,8 @@ public class REException extends Exception { * Returns the type of the exception, one of the constants listed above. */ - public int getType() { + public int getType () + { return type; } @@ -167,7 +173,8 @@ public class REException extends Exception { * where the error was detected, not necessarily the starting index of * a bad subexpression. */ - public int getPosition() { + public int getPosition () + { return pos; } @@ -176,13 +183,16 @@ public class REException extends Exception { * as well as its index position in the string or character array * being compiled. */ - public String getMessage() { - Object[] args = {new Integer(pos)}; - StringBuffer sb = new StringBuffer(); - String prefix = RE.getLocalizedMessage("error.prefix"); - sb.append(MessageFormat.format(prefix, args)); - sb.append('\n'); - sb.append(super.getMessage()); - return sb.toString(); + public String getMessage () + { + Object[]args = + { + new Integer (pos)}; + CPStringBuilder sb = new CPStringBuilder (); + String prefix = RE.getLocalizedMessage ("error.prefix"); + sb.append (MessageFormat.format (prefix, args)); + sb.append ('\n'); + sb.append (super.getMessage ()); + return sb.toString (); } } diff --git a/libjava/classpath/gnu/java/util/regex/REFilterInputStream.java b/libjava/classpath/gnu/java/util/regex/REFilterInputStream.java index abe86308bbc..c7acb714a27 100644 --- a/libjava/classpath/gnu/java/util/regex/REFilterInputStream.java +++ b/libjava/classpath/gnu/java/util/regex/REFilterInputStream.java @@ -51,14 +51,15 @@ import java.io.InputStream; * class instead. */ -public class REFilterInputStream extends FilterInputStream { +public class REFilterInputStream extends FilterInputStream +{ - private RE expr; - private String replace; - private String buffer; - private int bufpos; - private int offset; - private CharIndexedInputStream stream; + private RE expr; + private String replace; + private String buffer; + private int bufpos; + private int offset; + private CharIndexedInputStream stream; /** * Creates an REFilterInputStream. When reading from this stream, @@ -71,9 +72,10 @@ public class REFilterInputStream extends FilterInputStream { * @param expr The regular expression to search for. * @param replace The text pattern to replace matches with. */ - public REFilterInputStream(InputStream stream, RE expr, String replace) { - super(stream); - this.stream = new CharIndexedInputStream(stream,0); + public REFilterInputStream (InputStream stream, RE expr, String replace) + { + super (stream); + this.stream = new CharIndexedInputStream (stream, 0); this.expr = expr; this.replace = replace; } @@ -82,32 +84,38 @@ public class REFilterInputStream extends FilterInputStream { * Reads the next byte from the stream per the general contract of * InputStream.read(). Returns -1 on error or end of stream. */ - public int read() { + public int read () + { // If we have buffered replace data, use it. - if ((buffer != null) && (bufpos < buffer.length())) { - return (int) buffer.charAt(bufpos++); - } + if ((buffer != null) && (bufpos < buffer.length ())) + { + return (int) buffer.charAt (bufpos++); + } // check if input is at a valid position - if (!stream.isValid()) return -1; - - REMatch mymatch = new REMatch(expr.getNumSubs(),offset,0); - if (expr.match(stream, mymatch)) { - mymatch.end[0] = mymatch.index; - mymatch.finish(stream); - stream.move(mymatch.toString().length()); - offset += mymatch.toString().length(); - buffer = mymatch.substituteInto(replace); - bufpos = 1; - - // This is prone to infinite loops if replace string turns out empty. - if (buffer.length() > 0) { - return buffer.charAt(0); + if (!stream.isValid ()) + return -1; + + REMatch mymatch = new REMatch (expr.getNumSubs (), offset, 0); + if (expr.match (stream, mymatch)) + { + mymatch.end[0] = mymatch.index; + mymatch.finish (stream); + stream.move (mymatch.toString ().length ()); + offset += mymatch.toString ().length (); + buffer = mymatch.substituteInto (replace); + bufpos = 1; + + // This is prone to infinite loops if replace string turns out empty. + if (buffer.length () > 0) + { + return buffer.charAt (0); + } } - } - char ch = stream.charAt(0); - if (ch == CharIndexed.OUT_OF_BOUNDS) return -1; - stream.move(1); + char ch = stream.charAt (0); + if (ch == CharIndexed.OUT_OF_BOUNDS) + return -1; + stream.move (1); offset++; return ch; } @@ -116,25 +124,30 @@ public class REFilterInputStream extends FilterInputStream { * Returns false. REFilterInputStream does not support mark() and * reset() methods. */ - public boolean markSupported() { + public boolean markSupported () + { return false; } /** Reads from the stream into the provided array. */ - public int read(byte[] b, int off, int len) { + public int read (byte[]b, int off, int len) + { int i; int ok = 0; - while (len-- > 0) { - i = read(); - if (i == -1) return (ok == 0) ? -1 : ok; - b[off++] = (byte) i; - ok++; - } + while (len-- > 0) + { + i = read (); + if (i == -1) + return (ok == 0) ? -1 : ok; + b[off++] = (byte) i; + ok++; + } return ok; } /** Reads from the stream into the provided array. */ - public int read(byte[] b) { - return read(b,0,b.length); + public int read (byte[]b) + { + return read (b, 0, b.length); } } diff --git a/libjava/classpath/gnu/java/util/regex/REMatch.java b/libjava/classpath/gnu/java/util/regex/REMatch.java index d8994829323..d29972e1dd8 100644 --- a/libjava/classpath/gnu/java/util/regex/REMatch.java +++ b/libjava/classpath/gnu/java/util/regex/REMatch.java @@ -37,6 +37,9 @@ exception statement from your version. */ package gnu.java.util.regex; + +import gnu.java.lang.CPStringBuilder; + import java.io.Serializable; /** @@ -47,100 +50,112 @@ import java.io.Serializable; * * @author Wes Biggs */ -public final class REMatch implements Serializable, Cloneable { - private String matchedText; - private CharIndexed matchedCharIndexed; - - // These variables are package scope for fast access within the engine - int eflags; // execution flags this match was made using - - // Offset in source text where match was tried. This is zero-based; - // the actual position in the source text is given by (offset + anchor). - int offset; - - // Anchor position refers to the index into the source input - // at which the matching operation began. - // This is also useful for the ANCHORINDEX option. - int anchor; - - // Package scope; used by RE. - int index; // used while matching to mark current match position in input - // start1[i] is set when the i-th subexp starts. And start1[i] is copied - // to start[i] when the i-th subexp ends. So start[i] keeps the previously - // assigned value while the i-th subexp is being processed. This makes - // backreference to the i-th subexp within the i-th subexp possible. - int[] start; // start positions (relative to offset) for each (sub)exp. - int[] start1; // start positions (relative to offset) for each (sub)exp. - int[] end; // end positions for the same - // start[i] == -1 or end[i] == -1 means that the start/end position is void. - // start[i] == p or end[i] == p where p < 0 and p != -1 means that - // the actual start/end position is (p+1). Start/end positions may - // become negative when the subexpression is in a RETokenLookBehind. - boolean empty; // empty string matched. This flag is used only within - // RETokenRepeated. - - BacktrackStack backtrackStack; - - public Object clone() { - try { - REMatch copy = (REMatch) super.clone(); - - copy.start = (int[]) start.clone(); - copy.start1 = (int[]) start1.clone(); - copy.end = (int[]) end.clone(); - - return copy; - } catch (CloneNotSupportedException e) { - throw new Error(); // doesn't happen - } - } +public final class REMatch implements Serializable, Cloneable +{ + private String matchedText; + private CharIndexed matchedCharIndexed; - void assignFrom(REMatch other) { - start = other.start; - start1 = other.start1; - end = other.end; - index = other.index; - backtrackStack = other.backtrackStack; - } + // These variables are package scope for fast access within the engine + int eflags; // execution flags this match was made using - REMatch(int subs, int anchor, int eflags) { - start = new int[subs+1]; - start1 = new int[subs+1]; - end = new int[subs+1]; - this.anchor = anchor; - this.eflags = eflags; - clear(anchor); - } + // Offset in source text where match was tried. This is zero-based; + // the actual position in the source text is given by (offset + anchor). + int offset; - void finish(CharIndexed text) { - start[0] = 0; - StringBuffer sb = new StringBuffer(); - int i; - for (i = 0; i < end[0]; i++) - sb.append(text.charAt(i)); - matchedText = sb.toString(); - matchedCharIndexed = text; - for (i = 0; i < start.length; i++) { - // If any subexpressions didn't terminate, they don't count - // TODO check if this code ever gets hit - if ((start[i] == -1) ^ (end[i] == -1)) { - start[i] = -1; - end[i] = -1; - } - } - backtrackStack = null; + // Anchor position refers to the index into the source input + // at which the matching operation began. + // This is also useful for the ANCHORINDEX option. + int anchor; + + // Package scope; used by RE. + int index; // used while matching to mark current match position in input + // start1[i] is set when the i-th subexp starts. And start1[i] is copied + // to start[i] when the i-th subexp ends. So start[i] keeps the previously + // assigned value while the i-th subexp is being processed. This makes + // backreference to the i-th subexp within the i-th subexp possible. + int[] start; // start positions (relative to offset) for each (sub)exp. + int[] start1; // start positions (relative to offset) for each (sub)exp. + int[] end; // end positions for the same + // start[i] == -1 or end[i] == -1 means that the start/end position is void. + // start[i] == p or end[i] == p where p < 0 and p != -1 means that + // the actual start/end position is (p+1). Start/end positions may + // become negative when the subexpression is in a RETokenLookBehind. + boolean empty; // empty string matched. This flag is used only within + // RETokenRepeated. + + BacktrackStack backtrackStack; + + public Object clone () + { + try + { + REMatch copy = (REMatch) super.clone (); + + copy.start = (int[]) start.clone (); + copy.start1 = (int[]) start1.clone (); + copy.end = (int[]) end.clone (); + + return copy; } - - /** Clears the current match and moves the offset to the new index. */ - void clear(int index) { - offset = index; - this.index = 0; - for (int i = 0; i < start.length; i++) { - start[i] = start1[i] = end[i] = -1; - } - backtrackStack = null; + catch (CloneNotSupportedException e) + { + throw new Error (); // doesn't happen } - + } + + void assignFrom (REMatch other) + { + start = other.start; + start1 = other.start1; + end = other.end; + index = other.index; + backtrackStack = other.backtrackStack; + } + + REMatch (int subs, int anchor, int eflags) + { + start = new int[subs + 1]; + start1 = new int[subs + 1]; + end = new int[subs + 1]; + this.anchor = anchor; + this.eflags = eflags; + clear (anchor); + } + + void finish (CharIndexed text) + { + start[0] = 0; + CPStringBuilder sb = new CPStringBuilder (); + int i; + for (i = 0; i < end[0]; i++) + sb.append (text.charAt (i)); + matchedText = sb.toString (); + matchedCharIndexed = text; + for (i = 0; i < start.length; i++) + { + // If any subexpressions didn't terminate, they don't count + // TODO check if this code ever gets hit + if ((start[i] == -1) ^ (end[i] == -1)) + { + start[i] = -1; + end[i] = -1; + } + } + backtrackStack = null; + } + + /** Clears the current match and moves the offset to the new index. */ + void clear (int index) + { + offset = index; + this.index = 0; + for (int i = 0; i < start.length; i++) + { + start[i] = start1[i] = end[i] = -1; + } + backtrackStack = null; + } + /** * Returns the string matching the pattern. This makes it convenient * to write code like the following: @@ -150,18 +165,20 @@ public final class REMatch implements Serializable, Cloneable { * if (myMatch != null) System.out.println("Regexp found: "+myMatch); * */ - public String toString() { - return matchedText; - } - + public String toString () + { + return matchedText; + } + /** * Returns the index within the input text where the match in its entirety * began. */ - public int getStartIndex() { - return offset + start[0]; - } - + public int getStartIndex () + { + return offset + start[0]; + } + /** * Returns the index within the input string where the match in * its entirety ends. The return value is the next position after @@ -179,10 +196,11 @@ public final class REMatch implements Serializable, Cloneable { * But you can save yourself that work, since the toString() * method (above) does exactly that for you. */ - public int getEndIndex() { - return offset + end[0]; - } - + public int getEndIndex () + { + return offset + end[0]; + } + /** * Returns the string matching the given subexpression. The subexpressions * are indexed starting with one, not zero. That is, the subexpression @@ -191,25 +209,30 @@ public final class REMatch implements Serializable, Cloneable { * * @param sub Index of the subexpression. */ - public String toString(int sub) { - if ((sub >= start.length) || sub < 0) - throw new IndexOutOfBoundsException("No group " + sub); - if (start[sub] == -1) return null; - if (start[sub] >= 0 && end[sub] <= matchedText.length()) - return (matchedText.substring(start[sub],end[sub])); - else { + public String toString (int sub) + { + if ((sub >= start.length) || sub < 0) + throw new IndexOutOfBoundsException ("No group " + sub); + if (start[sub] == -1) + return null; + if (start[sub] >= 0 && end[sub] <= matchedText.length ()) + return (matchedText.substring (start[sub], end[sub])); + else + { // This case occurs with RETokenLookAhead or RETokenLookBehind. - StringBuffer sb = new StringBuffer(); - int s = start[sub]; - int e = end[sub]; - if (s < 0) s += 1; - if (e < 0) e += 1; - for (int i = start[0] + s; i < start[0] + e; i++) - sb.append(matchedCharIndexed.charAt(i)); - return sb.toString(); - } - } - + CPStringBuilder sb = new CPStringBuilder (); + int s = start[sub]; + int e = end[sub]; + if (s < 0) + s += 1; + if (e < 0) + e += 1; + for (int i = start[0] + s; i < start[0] + e; i++) + sb.append (matchedCharIndexed.charAt (i)); + return sb.toString (); + } + } + /** * Returns the index within the input string used to generate this match * where subexpression number sub begins, or -1 if @@ -218,13 +241,14 @@ public final class REMatch implements Serializable, Cloneable { * @param sub Subexpression index * @deprecated Use getStartIndex(int) instead. */ - public int getSubStartIndex(int sub) { - if (sub >= start.length) return -1; - int x = start[sub]; - return (x == -1) ? x : - (x >= 0) ? offset + x : offset + x + 1; - } - + public int getSubStartIndex (int sub) + { + if (sub >= start.length) + return -1; + int x = start[sub]; + return (x == -1) ? x : (x >= 0) ? offset + x : offset + x + 1; + } + /** * Returns the index within the input string used to generate this match * where subexpression number sub begins, or -1 if @@ -233,13 +257,14 @@ public final class REMatch implements Serializable, Cloneable { * @param sub Subexpression index * @since gnu.regexp 1.1.0 */ - public int getStartIndex(int sub) { - if (sub >= start.length) return -1; - int x = start[sub]; - return (x == -1) ? x : - (x >= 0) ? offset + x : offset + x + 1; - } - + public int getStartIndex (int sub) + { + if (sub >= start.length) + return -1; + int x = start[sub]; + return (x == -1) ? x : (x >= 0) ? offset + x : offset + x + 1; + } + /** * Returns the index within the input string used to generate this match * where subexpression number sub ends, or -1 if @@ -248,13 +273,14 @@ public final class REMatch implements Serializable, Cloneable { * @param sub Subexpression index * @deprecated Use getEndIndex(int) instead */ - public int getSubEndIndex(int sub) { - if (sub >= start.length) return -1; - int x = end[sub]; - return (x == -1) ? x : - (x >= 0) ? offset + x : offset + x + 1; - } - + public int getSubEndIndex (int sub) + { + if (sub >= start.length) + return -1; + int x = end[sub]; + return (x == -1) ? x : (x >= 0) ? offset + x : offset + x + 1; + } + /** * Returns the index within the input string used to generate this match * where subexpression number sub ends, or -1 if @@ -262,13 +288,14 @@ public final class REMatch implements Serializable, Cloneable { * * @param sub Subexpression index */ - public int getEndIndex(int sub) { - if (sub >= start.length) return -1; - int x = end[sub]; - return (x == -1) ? x : - (x >= 0) ? offset + x : offset + x + 1; - } - + public int getEndIndex (int sub) + { + if (sub >= start.length) + return -1; + int x = end[sub]; + return (x == -1) ? x : (x >= 0) ? offset + x : offset + x + 1; + } + /** * Substitute the results of this match to create a new string. * This is patterned after PERL, so the tokens to watch out for are @@ -280,31 +307,42 @@ public final class REMatch implements Serializable, Cloneable { * * @param input A string consisting of literals and $n tokens. */ - public String substituteInto(String input) { - // a la Perl, $0 is whole thing, $1 - $9 are subexpressions - StringBuffer output = new StringBuffer(); - int pos; - for (pos = 0; pos < input.length()-1; pos++) { - if ((input.charAt(pos) == '$') && (Character.isDigit(input.charAt(pos+1)))) { - int val = Character.digit(input.charAt(++pos),10); - int pos1 = pos + 1; - while (pos1 < input.length() && - Character.isDigit(input.charAt(pos1))) { - int val1 = val*10 + Character.digit(input.charAt(pos1),10); - if (val1 >= start.length) break; - pos1++; - val = val1; - } - pos = pos1 - 1; - - if (val < start.length) { - output.append(toString(val)); - } - } else output.append(input.charAt(pos)); - } - if (pos < input.length()) output.append(input.charAt(pos)); - return output.toString(); - } + public String substituteInto (String input) + { + // a la Perl, $0 is whole thing, $1 - $9 are subexpressions + CPStringBuilder output = new CPStringBuilder (); + int pos; + for (pos = 0; pos < input.length () - 1; pos++) + { + if ((input.charAt (pos) == '$') + && (Character.isDigit (input.charAt (pos + 1)))) + { + int val = Character.digit (input.charAt (++pos), 10); + int pos1 = pos + 1; + while (pos1 < input.length () && + Character.isDigit (input.charAt (pos1))) + { + int val1 = + val * 10 + Character.digit (input.charAt (pos1), 10); + if (val1 >= start.length) + break; + pos1++; + val = val1; + } + pos = pos1 - 1; + + if (val < start.length) + { + output.append (toString (val)); + } + } + else + output.append (input.charAt (pos)); + } + if (pos < input.length ()) + output.append (input.charAt (pos)); + return output.toString (); + } /* The following are used for debugging purpose public static String d(REMatch m) { diff --git a/libjava/classpath/gnu/java/util/regex/REMatchEnumeration.java b/libjava/classpath/gnu/java/util/regex/REMatchEnumeration.java index bc700beac5a..f0c78be925c 100644 --- a/libjava/classpath/gnu/java/util/regex/REMatchEnumeration.java +++ b/libjava/classpath/gnu/java/util/regex/REMatchEnumeration.java @@ -36,6 +36,9 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package gnu.java.util.regex; + +import gnu.java.lang.CPStringBuilder; + import java.io.Serializable; import java.util.Enumeration; import java.util.NoSuchElementException; @@ -66,20 +69,23 @@ import java.util.NoSuchElementException; * * @author Wes Biggs */ -public class REMatchEnumeration implements Enumeration, Serializable { +public class REMatchEnumeration + implements Enumeration < REMatch >, Serializable +{ private static final int YES = 1; private static final int MAYBE = 0; private static final int NO = -1; - + private int more; private REMatch match; - private RE expr; - private CharIndexed input; - private int eflags; - private int index; + private final RE expr; + private final CharIndexed input; + private final int eflags; + private int index; // Package scope constructor is used by RE.getMatchEnumeration() - REMatchEnumeration(RE expr, CharIndexed input, int index, int eflags) { + REMatchEnumeration (RE expr, CharIndexed input, int index, int eflags) + { more = MAYBE; this.expr = expr; this.input = input; @@ -88,48 +94,48 @@ public class REMatchEnumeration implements Enumeration, Serializable { } /** Returns true if there are more matches in the input text. */ - public boolean hasMoreElements() { - return hasMoreMatches(null); + public boolean hasMoreElements () + { + return hasMoreMatches (null); } /** Returns true if there are more matches in the input text. */ - public boolean hasMoreMatches() { - return hasMoreMatches(null); + public boolean hasMoreMatches () + { + return hasMoreMatches (null); } /** Returns true if there are more matches in the input text. * Saves the text leading up to the match (or to the end of the input) * in the specified buffer. */ - public boolean hasMoreMatches(StringBuffer buffer) { - if (more == MAYBE) { - match = expr.getMatchImpl(input,index,eflags,buffer); - if (match != null) { - input.move((match.end[0] > 0) ? match.end[0] : 1); - - index = (match.end[0] > 0) ? match.end[0] + match.offset : index + 1; + public boolean hasMoreMatches (CPStringBuilder buffer) + { + if (more == MAYBE) + { + match = expr.getMatchImpl (input, index, eflags, buffer); + if (match != null) + { + input.move ((match.end[0] > 0) ? match.end[0] : 1); + + index = + (match.end[0] > 0) ? match.end[0] + match.offset : index + 1; more = YES; - } else more = NO; - } + } + else + more = NO; + } return (more == YES); } /** Returns the next match in the input text. */ - public Object nextElement() throws NoSuchElementException { - return nextMatch(); - } - - /** - * Returns the next match in the input text. This method is provided - * for convenience to avoid having to explicitly cast the return value - * to class REMatch. - */ - public REMatch nextMatch() throws NoSuchElementException { - if (hasMoreElements()) { - more = (input.isValid()) ? MAYBE : NO; + public REMatch nextElement () throws NoSuchElementException + { + if (hasMoreElements ()) + { + more = (input.isValid ())? MAYBE : NO; return match; - } - throw new NoSuchElementException(); + } + throw new NoSuchElementException (); } } - diff --git a/libjava/classpath/gnu/java/util/regex/RESyntax.java b/libjava/classpath/gnu/java/util/regex/RESyntax.java index db11e2db450..38d70564d4a 100644 --- a/libjava/classpath/gnu/java/util/regex/RESyntax.java +++ b/libjava/classpath/gnu/java/util/regex/RESyntax.java @@ -51,102 +51,104 @@ import java.util.BitSet; * @author Wes Biggs */ -public final class RESyntax implements Serializable { - static final String DEFAULT_LINE_SEPARATOR = System.getProperty("line.separator"); +public final class RESyntax implements Serializable +{ + static final String DEFAULT_LINE_SEPARATOR = + System.getProperty ("line.separator"); - private BitSet bits; + private BitSet bits; - // true for the constant defined syntaxes - private boolean isFinal = false; + // true for the constant defined syntaxes + private boolean isFinal = false; - private String lineSeparator = DEFAULT_LINE_SEPARATOR; + private String lineSeparator = DEFAULT_LINE_SEPARATOR; // Values for constants are bit indexes /** * Syntax bit. Backslash is an escape character in lists. */ - public static final int RE_BACKSLASH_ESCAPE_IN_LISTS = 0; + public static final int RE_BACKSLASH_ESCAPE_IN_LISTS = 0; /** * Syntax bit. Use \? instead of ? and \+ instead of +. */ - public static final int RE_BK_PLUS_QM = 1; + public static final int RE_BK_PLUS_QM = 1; /** * Syntax bit. POSIX character classes ([:...:]) in lists are allowed. */ - public static final int RE_CHAR_CLASSES = 2; + public static final int RE_CHAR_CLASSES = 2; /** * Syntax bit. ^ and $ are special everywhere. * Not implemented. */ - public static final int RE_CONTEXT_INDEP_ANCHORS = 3; + public static final int RE_CONTEXT_INDEP_ANCHORS = 3; /** * Syntax bit. Repetition operators are only special in valid positions. * Not implemented. */ - public static final int RE_CONTEXT_INDEP_OPS = 4; + public static final int RE_CONTEXT_INDEP_OPS = 4; /** * Syntax bit. Repetition and alternation operators are invalid * at start and end of pattern and other places. * Not implemented. */ - public static final int RE_CONTEXT_INVALID_OPS = 5; + public static final int RE_CONTEXT_INVALID_OPS = 5; /** * Syntax bit. Match-any-character operator (.) matches a newline. */ - public static final int RE_DOT_NEWLINE = 6; + public static final int RE_DOT_NEWLINE = 6; /** * Syntax bit. Match-any-character operator (.) does not match a null. */ - public static final int RE_DOT_NOT_NULL = 7; + public static final int RE_DOT_NOT_NULL = 7; /** * Syntax bit. Intervals ({x}, {x,}, {x,y}) are allowed. */ - public static final int RE_INTERVALS = 8; + public static final int RE_INTERVALS = 8; /** * Syntax bit. No alternation (|), match one-or-more (+), or * match zero-or-one (?) operators. */ - public static final int RE_LIMITED_OPS = 9; + public static final int RE_LIMITED_OPS = 9; /** * Syntax bit. Newline is an alternation operator. */ - public static final int RE_NEWLINE_ALT = 10; // impl. + public static final int RE_NEWLINE_ALT = 10; // impl. /** * Syntax bit. Intervals use { } instead of \{ \} */ - public static final int RE_NO_BK_BRACES = 11; + public static final int RE_NO_BK_BRACES = 11; /** * Syntax bit. Grouping uses ( ) instead of \( \). */ - public static final int RE_NO_BK_PARENS = 12; + public static final int RE_NO_BK_PARENS = 12; /** * Syntax bit. Backreferences not allowed. */ - public static final int RE_NO_BK_REFS = 13; + public static final int RE_NO_BK_REFS = 13; /** * Syntax bit. Alternation uses | instead of \| */ - public static final int RE_NO_BK_VBAR = 14; + public static final int RE_NO_BK_VBAR = 14; /** * Syntax bit. Not implemented. */ - public static final int RE_NO_EMPTY_RANGES = 15; + public static final int RE_NO_EMPTY_RANGES = 15; /** * Syntax bit. An unmatched right parenthesis (')' or '\)', depending @@ -157,80 +159,80 @@ public final class RESyntax implements Serializable { /** * Syntax bit. Not implemented. */ - public static final int RE_HAT_LISTS_NOT_NEWLINE = 17; + public static final int RE_HAT_LISTS_NOT_NEWLINE = 17; /** * Syntax bit. Stingy matching is allowed (+?, *?, ??, {x,y}?). */ - public static final int RE_STINGY_OPS = 18; + public static final int RE_STINGY_OPS = 18; /** * Syntax bit. Allow character class escapes (\d, \D, \s, \S, \w, \W). */ - public static final int RE_CHAR_CLASS_ESCAPES = 19; + public static final int RE_CHAR_CLASS_ESCAPES = 19; /** * Syntax bit. Allow use of (?:xxx) grouping (subexpression is not saved). */ - public static final int RE_PURE_GROUPING = 20; + public static final int RE_PURE_GROUPING = 20; /** * Syntax bit. Allow use of (?=xxx) and (?!xxx) apply the subexpression * to the text following the current position without consuming that text. */ - public static final int RE_LOOKAHEAD = 21; + public static final int RE_LOOKAHEAD = 21; /** * Syntax bit. Allow beginning- and end-of-string anchors (\A, \Z). */ - public static final int RE_STRING_ANCHORS = 22; + public static final int RE_STRING_ANCHORS = 22; /** * Syntax bit. Allow embedded comments, (?#comment), as in Perl5. */ - public static final int RE_COMMENTS = 23; + public static final int RE_COMMENTS = 23; /** * Syntax bit. Allow character class escapes within lists, as in Perl5. */ - public static final int RE_CHAR_CLASS_ESC_IN_LISTS = 24; + public static final int RE_CHAR_CLASS_ESC_IN_LISTS = 24; /** * Syntax bit. Possessive matching is allowed (++, *+, ?+, {x,y}+). */ - public static final int RE_POSSESSIVE_OPS = 25; + public static final int RE_POSSESSIVE_OPS = 25; /** * Syntax bit. Allow embedded flags, (?is-x), as in Perl5. */ - public static final int RE_EMBEDDED_FLAGS = 26; + public static final int RE_EMBEDDED_FLAGS = 26; /** * Syntax bit. Allow octal char (\0377), as in Perl5. */ - public static final int RE_OCTAL_CHAR = 27; + public static final int RE_OCTAL_CHAR = 27; /** * Syntax bit. Allow hex char (\x1b), as in Perl5. */ - public static final int RE_HEX_CHAR = 28; + public static final int RE_HEX_CHAR = 28; /** * Syntax bit. Allow Unicode char (\u1234), as in Java 1.4. */ - public static final int RE_UNICODE_CHAR = 29; + public static final int RE_UNICODE_CHAR = 29; /** * Syntax bit. Allow named property (\p{P}, \P{p}), as in Perl5. */ - public static final int RE_NAMED_PROPERTY = 30; + public static final int RE_NAMED_PROPERTY = 30; /** * Syntax bit. Allow nested characterclass ([a-z&&[^p-r]]), as in Java 1.4. */ - public static final int RE_NESTED_CHARCLASS = 31; + public static final int RE_NESTED_CHARCLASS = 31; - private static final int BIT_TOTAL = 32; + private static final int BIT_TOTAL = 32; /** * Predefined syntax. @@ -315,13 +317,13 @@ public final class RESyntax implements Serializable { * Emulates regular expression support in Larry Wall's perl, version 4, * using single line mode (/s modifier). */ - public static final RESyntax RE_SYNTAX_PERL4_S; // single line mode (/s) + public static final RESyntax RE_SYNTAX_PERL4_S; // single line mode (/s) /** * Predefined syntax. * Emulates regular expression support in Larry Wall's perl, version 5. */ - public static final RESyntax RE_SYNTAX_PERL5; + public static final RESyntax RE_SYNTAX_PERL5; /** * Predefined syntax. @@ -335,145 +337,109 @@ public final class RESyntax implements Serializable { * Emulates regular expression support in Java 1.4's java.util.regex * package. */ - public static final RESyntax RE_SYNTAX_JAVA_1_4; - - static { - // Define syntaxes - - RE_SYNTAX_EMACS = new RESyntax().makeFinal(); - - RESyntax RE_SYNTAX_POSIX_COMMON = new RESyntax() - .set(RE_CHAR_CLASSES) - .set(RE_DOT_NEWLINE) - .set(RE_DOT_NOT_NULL) - .set(RE_INTERVALS) - .set(RE_NO_EMPTY_RANGES) - .makeFinal(); - - RE_SYNTAX_POSIX_BASIC = new RESyntax(RE_SYNTAX_POSIX_COMMON) - .set(RE_BK_PLUS_QM) - .makeFinal(); - - RE_SYNTAX_POSIX_EXTENDED = new RESyntax(RE_SYNTAX_POSIX_COMMON) - .set(RE_CONTEXT_INDEP_ANCHORS) - .set(RE_CONTEXT_INDEP_OPS) - .set(RE_NO_BK_BRACES) - .set(RE_NO_BK_PARENS) - .set(RE_NO_BK_VBAR) - .set(RE_UNMATCHED_RIGHT_PAREN_ORD) - .makeFinal(); - - RE_SYNTAX_AWK = new RESyntax() - .set(RE_BACKSLASH_ESCAPE_IN_LISTS) - .set(RE_DOT_NOT_NULL) - .set(RE_NO_BK_PARENS) - .set(RE_NO_BK_REFS) - .set(RE_NO_BK_VBAR) - .set(RE_NO_EMPTY_RANGES) - .set(RE_UNMATCHED_RIGHT_PAREN_ORD) - .makeFinal(); - - RE_SYNTAX_POSIX_AWK = new RESyntax(RE_SYNTAX_POSIX_EXTENDED) - .set(RE_BACKSLASH_ESCAPE_IN_LISTS) - .makeFinal(); - - RE_SYNTAX_GREP = new RESyntax() - .set(RE_BK_PLUS_QM) - .set(RE_CHAR_CLASSES) - .set(RE_HAT_LISTS_NOT_NEWLINE) - .set(RE_INTERVALS) - .set(RE_NEWLINE_ALT) - .makeFinal(); - - RE_SYNTAX_EGREP = new RESyntax() - .set(RE_CHAR_CLASSES) - .set(RE_CONTEXT_INDEP_ANCHORS) - .set(RE_CONTEXT_INDEP_OPS) - .set(RE_HAT_LISTS_NOT_NEWLINE) - .set(RE_NEWLINE_ALT) - .set(RE_NO_BK_PARENS) - .set(RE_NO_BK_VBAR) - .makeFinal(); - - RE_SYNTAX_POSIX_EGREP = new RESyntax(RE_SYNTAX_EGREP) - .set(RE_INTERVALS) - .set(RE_NO_BK_BRACES) - .makeFinal(); - - /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ - - RE_SYNTAX_ED = new RESyntax(RE_SYNTAX_POSIX_BASIC) - .makeFinal(); - - RE_SYNTAX_SED = new RESyntax(RE_SYNTAX_POSIX_BASIC) - .makeFinal(); - - RE_SYNTAX_POSIX_MINIMAL_BASIC = new RESyntax(RE_SYNTAX_POSIX_COMMON) - .set(RE_LIMITED_OPS) - .makeFinal(); - - /* Differs from RE_SYNTAX_POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS - replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ - - RE_SYNTAX_POSIX_MINIMAL_EXTENDED = new RESyntax(RE_SYNTAX_POSIX_COMMON) - .set(RE_CONTEXT_INDEP_ANCHORS) - .set(RE_CONTEXT_INVALID_OPS) - .set(RE_NO_BK_BRACES) - .set(RE_NO_BK_PARENS) - .set(RE_NO_BK_REFS) - .set(RE_NO_BK_VBAR) - .set(RE_UNMATCHED_RIGHT_PAREN_ORD) - .makeFinal(); - - /* There is no official Perl spec, but here's a "best guess" */ - - RE_SYNTAX_PERL4 = new RESyntax() - .set(RE_BACKSLASH_ESCAPE_IN_LISTS) - .set(RE_CONTEXT_INDEP_ANCHORS) - .set(RE_CONTEXT_INDEP_OPS) // except for '{', apparently - .set(RE_INTERVALS) - .set(RE_NO_BK_BRACES) - .set(RE_NO_BK_PARENS) - .set(RE_NO_BK_VBAR) - .set(RE_NO_EMPTY_RANGES) - .set(RE_CHAR_CLASS_ESCAPES) // \d,\D,\w,\W,\s,\S - .makeFinal(); - - RE_SYNTAX_PERL4_S = new RESyntax(RE_SYNTAX_PERL4) - .set(RE_DOT_NEWLINE) - .makeFinal(); - - RE_SYNTAX_PERL5 = new RESyntax(RE_SYNTAX_PERL4) - .set(RE_PURE_GROUPING) // (?:) - .set(RE_STINGY_OPS) // *?,??,+?,{}? - .set(RE_LOOKAHEAD) // (?=)(?!) - .set(RE_STRING_ANCHORS) // \A,\Z - .set(RE_CHAR_CLASS_ESC_IN_LISTS)// \d,\D,\w,\W,\s,\S within [] - .set(RE_COMMENTS) // (?#) - .set(RE_EMBEDDED_FLAGS) // (?imsx-imsx) - .set(RE_OCTAL_CHAR) // \0377 - .set(RE_HEX_CHAR) // \x1b - .set(RE_NAMED_PROPERTY) // \p{prop}, \P{prop} - .makeFinal(); - - RE_SYNTAX_PERL5_S = new RESyntax(RE_SYNTAX_PERL5) - .set(RE_DOT_NEWLINE) - .makeFinal(); - - RE_SYNTAX_JAVA_1_4 = new RESyntax(RE_SYNTAX_PERL5) - // XXX - .set(RE_POSSESSIVE_OPS) // *+,?+,++,{}+ - .set(RE_UNICODE_CHAR) // \u1234 - .set(RE_NESTED_CHARCLASS) // [a-z&&[^p-r]] - .makeFinal(); + public static final RESyntax RE_SYNTAX_JAVA_1_4; + + static + { + // Define syntaxes + + RE_SYNTAX_EMACS = new RESyntax ().makeFinal (); + + RESyntax RE_SYNTAX_POSIX_COMMON = + new RESyntax ().set (RE_CHAR_CLASSES).set (RE_DOT_NEWLINE). + set (RE_DOT_NOT_NULL).set (RE_INTERVALS).set (RE_NO_EMPTY_RANGES). + makeFinal (); + + RE_SYNTAX_POSIX_BASIC = + new RESyntax (RE_SYNTAX_POSIX_COMMON).set (RE_BK_PLUS_QM).makeFinal (); + + RE_SYNTAX_POSIX_EXTENDED = + new RESyntax (RE_SYNTAX_POSIX_COMMON).set (RE_CONTEXT_INDEP_ANCHORS). + set (RE_CONTEXT_INDEP_OPS).set (RE_NO_BK_BRACES).set (RE_NO_BK_PARENS). + set (RE_NO_BK_VBAR).set (RE_UNMATCHED_RIGHT_PAREN_ORD).makeFinal (); + + RE_SYNTAX_AWK = + new RESyntax ().set (RE_BACKSLASH_ESCAPE_IN_LISTS). + set (RE_DOT_NOT_NULL).set (RE_NO_BK_PARENS).set (RE_NO_BK_REFS). + set (RE_NO_BK_VBAR).set (RE_NO_EMPTY_RANGES). + set (RE_UNMATCHED_RIGHT_PAREN_ORD).makeFinal (); + + RE_SYNTAX_POSIX_AWK = + new RESyntax (RE_SYNTAX_POSIX_EXTENDED). + set (RE_BACKSLASH_ESCAPE_IN_LISTS).makeFinal (); + + RE_SYNTAX_GREP = + new RESyntax ().set (RE_BK_PLUS_QM).set (RE_CHAR_CLASSES). + set (RE_HAT_LISTS_NOT_NEWLINE).set (RE_INTERVALS).set (RE_NEWLINE_ALT). + makeFinal (); + + RE_SYNTAX_EGREP = + new RESyntax ().set (RE_CHAR_CLASSES).set (RE_CONTEXT_INDEP_ANCHORS). + set (RE_CONTEXT_INDEP_OPS).set (RE_HAT_LISTS_NOT_NEWLINE). + set (RE_NEWLINE_ALT).set (RE_NO_BK_PARENS).set (RE_NO_BK_VBAR). + makeFinal (); + + RE_SYNTAX_POSIX_EGREP = + new RESyntax (RE_SYNTAX_EGREP).set (RE_INTERVALS).set (RE_NO_BK_BRACES). + makeFinal (); + + /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ + + RE_SYNTAX_ED = new RESyntax (RE_SYNTAX_POSIX_BASIC).makeFinal (); + + RE_SYNTAX_SED = new RESyntax (RE_SYNTAX_POSIX_BASIC).makeFinal (); + + RE_SYNTAX_POSIX_MINIMAL_BASIC = + new RESyntax (RE_SYNTAX_POSIX_COMMON).set (RE_LIMITED_OPS).makeFinal (); + + /* Differs from RE_SYNTAX_POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS + replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added. */ + + RE_SYNTAX_POSIX_MINIMAL_EXTENDED = + new RESyntax (RE_SYNTAX_POSIX_COMMON).set (RE_CONTEXT_INDEP_ANCHORS). + set (RE_CONTEXT_INVALID_OPS).set (RE_NO_BK_BRACES). + set (RE_NO_BK_PARENS).set (RE_NO_BK_REFS).set (RE_NO_BK_VBAR). + set (RE_UNMATCHED_RIGHT_PAREN_ORD).makeFinal (); + + /* There is no official Perl spec, but here's a "best guess" */ + + RE_SYNTAX_PERL4 = new RESyntax ().set (RE_BACKSLASH_ESCAPE_IN_LISTS).set (RE_CONTEXT_INDEP_ANCHORS).set (RE_CONTEXT_INDEP_OPS) // except for '{', apparently + .set (RE_INTERVALS).set (RE_NO_BK_BRACES).set (RE_NO_BK_PARENS).set (RE_NO_BK_VBAR).set (RE_NO_EMPTY_RANGES).set (RE_CHAR_CLASS_ESCAPES) // \d,\D,\w,\W,\s,\S + .makeFinal (); + + RE_SYNTAX_PERL4_S = + new RESyntax (RE_SYNTAX_PERL4).set (RE_DOT_NEWLINE).makeFinal (); + + RE_SYNTAX_PERL5 = new RESyntax (RE_SYNTAX_PERL4).set (RE_PURE_GROUPING) // (?:) + .set (RE_STINGY_OPS) // *?,??,+?,{}? + .set (RE_LOOKAHEAD) // (?=)(?!) + .set (RE_STRING_ANCHORS) // \A,\Z + .set (RE_CHAR_CLASS_ESC_IN_LISTS) // \d,\D,\w,\W,\s,\S within [] + .set (RE_COMMENTS) // (?#) + .set (RE_EMBEDDED_FLAGS) // (?imsx-imsx) + .set (RE_OCTAL_CHAR) // \0377 + .set (RE_HEX_CHAR) // \x1b + .set (RE_NAMED_PROPERTY) // \p{prop}, \P{prop} + .makeFinal (); + + RE_SYNTAX_PERL5_S = + new RESyntax (RE_SYNTAX_PERL5).set (RE_DOT_NEWLINE).makeFinal (); + + RE_SYNTAX_JAVA_1_4 = new RESyntax (RE_SYNTAX_PERL5) + // XXX + .set (RE_POSSESSIVE_OPS) // *+,?+,++,{}+ + .set (RE_UNICODE_CHAR) // \u1234 + .set (RE_NESTED_CHARCLASS) // [a-z&&[^p-r]] + .makeFinal (); } /** * Construct a new syntax object with all bits turned off. * This is equivalent to RE_SYNTAX_EMACS. */ - public RESyntax() { - bits = new BitSet(BIT_TOTAL); + public RESyntax () + { + bits = new BitSet (BIT_TOTAL); } /** @@ -484,24 +450,27 @@ public final class RESyntax implements Serializable { * * @return this object for convenient chaining */ - public RESyntax makeFinal() { - isFinal = true; - return this; - } + public RESyntax makeFinal () + { + isFinal = true; + return this; + } /** * Construct a new syntax object with all bits set the same * as the other syntax. */ - public RESyntax(RESyntax other) { - bits = (BitSet) other.bits.clone(); + public RESyntax (RESyntax other) + { + bits = (BitSet) other.bits.clone (); } /** * Check if a given bit is set in this syntax. */ - public boolean get(int index) { - return bits.get(index); + public boolean get (int index) + { + return bits.get (index); } /** @@ -510,10 +479,11 @@ public final class RESyntax implements Serializable { * @param index the constant (RESyntax.RE_xxx) bit to set. * @return a reference to this object for easy chaining. */ - public RESyntax set(int index) { + public RESyntax set (int index) + { if (isFinal) - throw new IllegalAccessError(RE.getLocalizedMessage("syntax.final")); - bits.set(index); + throw new IllegalAccessError (RE.getLocalizedMessage ("syntax.final")); + bits.set (index); return this; } @@ -523,11 +493,12 @@ public final class RESyntax implements Serializable { * @param index the constant (RESyntax.RE_xxx) bit to clear. * @return a reference to this object for easy chaining. */ - public RESyntax clear(int index) { - if (isFinal) - throw new IllegalAccessError(RE.getLocalizedMessage("syntax.final")); - bits.clear(index); - return this; + public RESyntax clear (int index) + { + if (isFinal) + throw new IllegalAccessError (RE.getLocalizedMessage ("syntax.final")); + bits.clear (index); + return this; } /** @@ -547,18 +518,20 @@ public final class RESyntax implements Serializable { * * @return this object for convenient chaining */ - public RESyntax setLineSeparator(String aSeparator) { - if (isFinal) - throw new IllegalAccessError(RE.getLocalizedMessage("syntax.final")); - lineSeparator = aSeparator; - return this; - } + public RESyntax setLineSeparator (String aSeparator) + { + if (isFinal) + throw new IllegalAccessError (RE.getLocalizedMessage ("syntax.final")); + lineSeparator = aSeparator; + return this; + } /** * Returns the currently active line separator string. The default * is the platform-dependent system property "line.separator". */ - public String getLineSeparator() { - return lineSeparator; - } + public String getLineSeparator () + { + return lineSeparator; + } } diff --git a/libjava/classpath/gnu/java/util/regex/REToken.java b/libjava/classpath/gnu/java/util/regex/REToken.java index addc62225eb..681ac517f04 100644 --- a/libjava/classpath/gnu/java/util/regex/REToken.java +++ b/libjava/classpath/gnu/java/util/regex/REToken.java @@ -36,65 +36,84 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package gnu.java.util.regex; + +import gnu.java.lang.CPStringBuilder; + import java.io.Serializable; -abstract class REToken implements Serializable, Cloneable { +abstract class REToken implements Serializable, Cloneable +{ protected REToken next = null; protected REToken uncle = null; protected int subIndex; protected boolean unicodeAware = true; - public Object clone() { - try { - REToken copy = (REToken) super.clone(); - return copy; - } catch (CloneNotSupportedException e) { - throw new Error(); // doesn't happen + public Object clone () + { + try + { + REToken copy = (REToken) super.clone (); + return copy; + } + catch (CloneNotSupportedException e) + { + throw new Error (); // doesn't happen } } - protected REToken(int subIndex) { - this.subIndex = subIndex; + protected REToken (int subIndex) + { + this.subIndex = subIndex; } - int getMinimumLength() { + int getMinimumLength () + { return 0; } - int getMaximumLength() { + int getMaximumLength () + { return Integer.MAX_VALUE; } - void setUncle(REToken anUncle) { + void setUncle (REToken anUncle) + { uncle = anUncle; } /** Returns true if the match succeeded, false if it failed. */ - boolean match(CharIndexed input, REMatch mymatch) { - return match(input, mymatch, false); - } - boolean matchFake(CharIndexed input, REMatch mymatch) { - return match(input, mymatch, true); - } + boolean match (CharIndexed input, REMatch mymatch) + { + return match (input, mymatch, false); + } + boolean matchFake (CharIndexed input, REMatch mymatch) + { + return match (input, mymatch, true); + } - private boolean match(CharIndexed input, REMatch mymatch, boolean fake) { - if (!fake) { - setHitEnd(input, mymatch); - } - REMatch m = matchThis(input, mymatch); - if (m == null) return false; - if (next(input, m)) { - mymatch.assignFrom(m); - return true; - } - return false; - } + private boolean match (CharIndexed input, REMatch mymatch, boolean fake) + { + if (!fake) + { + setHitEnd (input, mymatch); + } + REMatch m = matchThis (input, mymatch); + if (m == null) + return false; + if (next (input, m)) + { + mymatch.assignFrom (m); + return true; + } + return false; + } /** Sets whether the matching occurs at the end of input */ - void setHitEnd(CharIndexed input, REMatch mymatch) { - input.setHitEnd(mymatch); - } + void setHitEnd (CharIndexed input, REMatch mymatch) + { + input.setHitEnd (mymatch); + } /** Returns true if the match succeeded, false if it failed. * The matching is done against this REToken only. Chained @@ -106,22 +125,27 @@ abstract class REToken implements Serializable, Cloneable { * subclasses of REToken, which needs a special match method, * do not have to implement this method. */ - REMatch matchThis(CharIndexed input, REMatch mymatch) { - throw new UnsupportedOperationException( - "This REToken does not have a matchThis method"); - } - + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + throw new + UnsupportedOperationException + ("This REToken does not have a matchThis method"); + } + /** Returns true if the rest of the tokens match, false if they fail. */ - protected boolean next(CharIndexed input, REMatch mymatch) { - REToken nextToken = getNext(); - if (nextToken == null) return true; - return nextToken.match(input, mymatch); - } + protected boolean next (CharIndexed input, REMatch mymatch) + { + REToken nextToken = getNext (); + if (nextToken == null) + return true; + return nextToken.match (input, mymatch); + } /** Returns the next REToken chained to this REToken. */ - REToken getNext() { - return (next != null ? next : uncle); - } + REToken getNext () + { + return (next != null ? next : uncle); + } /** Finds a match at the position specified by the given REMatch. * If necessary, adds a BacktrackStack.Backtrack object to backtrackStack @@ -132,45 +156,55 @@ abstract class REToken implements Serializable, Cloneable { * @param mymatch Position at which a match should be found * @return REMatch object if a match was found, null otherwise. */ - REMatch findMatch(CharIndexed input, REMatch mymatch) { - boolean b = match(input, mymatch); - if (b) return mymatch; - return null; - } + REMatch findMatch (CharIndexed input, REMatch mymatch) + { + boolean b = match (input, mymatch); + if (b) + return mymatch; + return null; + } - boolean returnsFixedLengthMatches() { - return false; - } + boolean returnsFixedLengthMatches () + { + return false; + } - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { - throw new UnsupportedOperationException( - "This token does not support findFixedLengthMatches"); - } + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + throw new + UnsupportedOperationException + ("This token does not support findFixedLengthMatches"); + } /** * Backtrack to another possibility. * Ordinary REToken cannot do anything if this method is called. */ - REMatch backtrack(CharIndexed input, REMatch mymatch, Object param) { - throw new IllegalStateException("This token cannot be backtracked to"); - } + REMatch backtrack (CharIndexed input, REMatch mymatch, Object param) + { + throw new IllegalStateException ("This token cannot be backtracked to"); + } - boolean chain(REToken token) { - next = token; - return true; // Token was accepted + boolean chain (REToken token) + { + next = token; + return true; // Token was accepted } - abstract void dump(StringBuffer os); + abstract void dump (CPStringBuilder os); - void dumpAll(StringBuffer os) { - dump(os); - if (next != null) next.dumpAll(os); + void dumpAll (CPStringBuilder os) + { + dump (os); + if (next != null) + next.dumpAll (os); } - public String toString() { - StringBuffer os = new StringBuffer(); - dump(os); - return os.toString(); + public String toString () + { + CPStringBuilder os = new CPStringBuilder (); + dump (os); + return os.toString (); } /** @@ -181,9 +215,12 @@ abstract class REToken implements Serializable, Cloneable { * @return the lowercase equivalent of the character, if any; * otherwise, the character itself. */ - public static char toLowerCase(char ch, boolean unicodeAware) { - if (unicodeAware) return Character.toLowerCase(ch); - if (ch >= 'A' && ch <= 'Z') return (char)(ch + 'a' - 'A'); + public static char toLowerCase (char ch, boolean unicodeAware) + { + if (unicodeAware) + return Character.toLowerCase (ch); + if (ch >= 'A' && ch <= 'Z') + return (char) (ch + 'a' - 'A'); return ch; } @@ -195,9 +232,12 @@ abstract class REToken implements Serializable, Cloneable { * @return the uppercase equivalent of the character, if any; * otherwise, the character itself. */ - public static char toUpperCase(char ch, boolean unicodeAware) { - if (unicodeAware) return Character.toUpperCase(ch); - if (ch >= 'a' && ch <= 'z') return (char)(ch + 'A' - 'a'); + public static char toUpperCase (char ch, boolean unicodeAware) + { + if (unicodeAware) + return Character.toUpperCase (ch); + if (ch >= 'a' && ch <= 'z') + return (char) (ch + 'A' - 'a'); return ch; } diff --git a/libjava/classpath/gnu/java/util/regex/RETokenAny.java b/libjava/classpath/gnu/java/util/regex/RETokenAny.java index b99a54717c9..c002d050423 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenAny.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenAny.java @@ -38,62 +38,78 @@ exception statement from your version. */ package gnu.java.util.regex; -final class RETokenAny extends REToken { +import gnu.java.lang.CPStringBuilder; + +final class RETokenAny extends REToken +{ /** True if '.' can match a newline (RE_DOT_NEWLINE) */ - private boolean newline; + private boolean newline; /** True if '.' can't match a null (RE_DOT_NOT_NULL) */ - private boolean matchNull; - - RETokenAny(int subIndex, boolean newline, boolean matchNull) { - super(subIndex); + private boolean matchNull; + + RETokenAny (int subIndex, boolean newline, boolean matchNull) + { + super (subIndex); this.newline = newline; this.matchNull = matchNull; } - int getMinimumLength() { + int getMinimumLength () + { return 1; } - int getMaximumLength() { + int getMaximumLength () + { return 1; } - REMatch matchThis(CharIndexed input, REMatch mymatch) { - char ch = input.charAt(mymatch.index); - boolean retval = matchOneChar(ch); - if (retval) { - ++mymatch.index; - return mymatch; + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + char ch = input.charAt (mymatch.index); + boolean retval = matchOneChar (ch); + if (retval) + { + ++mymatch.index; + return mymatch; } - return null; - } - - boolean matchOneChar(char ch) { - if ((ch == CharIndexed.OUT_OF_BOUNDS) - || (!newline && (ch == '\n')) - || (matchNull && (ch == 0))) { - return false; + return null; + } + + boolean matchOneChar (char ch) + { + if ((ch == CharIndexed.OUT_OF_BOUNDS) + || (!newline && (ch == '\n')) || (matchNull && (ch == 0))) + { + return false; } - return true; + return true; } - boolean returnsFixedLengthMatches() { return true; } + boolean returnsFixedLengthMatches () + { + return true; + } - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { int index = mymatch.index; int numRepeats = 0; - while (true) { - if (numRepeats >= max) break; - char ch = input.charAt(index++); - if (! matchOneChar(ch)) break; - numRepeats++; - } + while (true) + { + if (numRepeats >= max) + break; + char ch = input.charAt (index++); + if (!matchOneChar (ch)) + break; + numRepeats++; + } return numRepeats; } - void dump(StringBuffer os) { - os.append('.'); + void dump (CPStringBuilder os) + { + os.append ('.'); } } - diff --git a/libjava/classpath/gnu/java/util/regex/RETokenBackRef.java b/libjava/classpath/gnu/java/util/regex/RETokenBackRef.java index 3a912f9bba7..8f146222d95 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenBackRef.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenBackRef.java @@ -38,49 +38,63 @@ exception statement from your version. */ package gnu.java.util.regex; -final class RETokenBackRef extends REToken { +import gnu.java.lang.CPStringBuilder; + +final class RETokenBackRef extends REToken +{ private int num; private boolean insens; - - RETokenBackRef(int subIndex, int num, boolean insens) { - super(subIndex); + + RETokenBackRef (int subIndex, int num, boolean insens) + { + super (subIndex); this.num = num; this.insens = insens; } // should implement getMinimumLength() -- any ideas? - REMatch matchThis(CharIndexed input, REMatch mymatch) { - if (num >= mymatch.start.length) return null; - if (num >= mymatch.end.length) return null; - int b,e; - b = mymatch.start[num]; - e = mymatch.end[num]; - if ((b==-1)||(e==-1)) return null; // this shouldn't happen, but... - if (b < 0) b += 1; - if (e < 0) e += 1; - for (int i=b; i= mymatch.start.length) + return null; + if (num >= mymatch.end.length) + return null; + int b, e; + b = mymatch.start[num]; + e = mymatch.end[num]; + if ((b == -1) || (e == -1)) + return null; // this shouldn't happen, but... + if (b < 0) + b += 1; + if (e < 0) + e += 1; + for (int i = b; i < e; i++) + { + char c1 = input.charAt (mymatch.index + i - b); + char c2 = input.charAt (i); + if (c1 != c2) + { + if (insens) + { + if (c1 != toLowerCase (c2, unicodeAware) && + c1 != toUpperCase (c2, unicodeAware)) + { return null; - } - } - } - mymatch.index += e-b; - return mymatch; - } - - void dump(StringBuffer os) { - os.append('\\').append(num); - } -} - + } + } + else + { + return null; + } + } + } + mymatch.index += e - b; + return mymatch; + } + void dump (CPStringBuilder os) + { + os.append ('\\').append (num); + } +} diff --git a/libjava/classpath/gnu/java/util/regex/RETokenChar.java b/libjava/classpath/gnu/java/util/regex/RETokenChar.java index 42dcd93268a..babcf3e4e93 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenChar.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenChar.java @@ -38,98 +38,125 @@ exception statement from your version. */ package gnu.java.util.regex; -final class RETokenChar extends REToken { +import gnu.java.lang.CPStringBuilder; + +final class RETokenChar extends REToken +{ private char[] ch; private boolean insens; - RETokenChar(int subIndex, char c, boolean ins) { - super(subIndex); + RETokenChar (int subIndex, char c, boolean ins) + { + super (subIndex); insens = ins; - ch = new char [1]; - ch[0] = c; + ch = new char[1]; + ch[0] = c; } - int getMinimumLength() { + int getMinimumLength () + { return ch.length; } - - int getMaximumLength() { + + int getMaximumLength () + { return ch.length; } - - REMatch matchThis(CharIndexed input, REMatch mymatch) { - if (matchOneString(input, mymatch.index)) { - mymatch.index += matchedLength; - return mymatch; - } - // java.util.regex.Matcher#hitEnd() requires that the length of - // partial match be counted. + + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + if (matchOneString (input, mymatch.index)) + { mymatch.index += matchedLength; - input.setHitEnd(mymatch); - return null; - } - - private int matchedLength; - private boolean matchOneString(CharIndexed input, int index) { - matchedLength = 0; - int z = ch.length; - char c; - for (int i=0; i= max) break; - if (matchOneString(input, index)) { - index += z; - numRepeats++; - } - else break; - } - return numRepeats; - } + return mymatch; + } + // java.util.regex.Matcher#hitEnd() requires that the length of + // partial match be counted. + mymatch.index += matchedLength; + input.setHitEnd (mymatch); + return null; + } - // Overrides REToken.chain() to optimize for strings - boolean chain(REToken next) { - if (next instanceof RETokenChar && ((RETokenChar)next).insens == insens) { - RETokenChar cnext = (RETokenChar) next; - int newsize = ch.length + cnext.ch.length; - - char[] chTemp = new char [newsize]; - - System.arraycopy(ch,0,chTemp,0,ch.length); - System.arraycopy(cnext.ch,0,chTemp,ch.length,cnext.ch.length); - - ch = chTemp; - if (cnext.next == null) - return false; - return chain(cnext.next); - } else return super.chain(next); + private int matchedLength; + private boolean matchOneString (CharIndexed input, int index) + { + matchedLength = 0; + int z = ch.length; + char c; + for (int i = 0; i < z; i++) + { + c = input.charAt (index + i); + if (!charEquals (c, ch[i])) + { + return false; + } + ++matchedLength; + } + return true; } - void dump(StringBuffer os) { - os.append(ch); + private boolean charEquals (char c1, char c2) + { + if (c1 == c2) + return true; + if (!insens) + return false; + if (toLowerCase (c1, unicodeAware) == c2) + return true; + if (toUpperCase (c1, unicodeAware) == c2) + return true; + return false; + } + + boolean returnsFixedLengthMatches () + { + return true; } -} + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + int index = mymatch.index; + int numRepeats = 0; + int z = ch.length; + while (true) + { + if (numRepeats >= max) + break; + if (matchOneString (input, index)) + { + index += z; + numRepeats++; + } + else + break; + } + return numRepeats; + } + // Overrides REToken.chain() to optimize for strings + boolean chain (REToken next) + { + if (next instanceof RETokenChar && ((RETokenChar) next).insens == insens) + { + RETokenChar cnext = (RETokenChar) next; + int newsize = ch.length + cnext.ch.length; + + char[] chTemp = new char[newsize]; + + System.arraycopy (ch, 0, chTemp, 0, ch.length); + System.arraycopy (cnext.ch, 0, chTemp, ch.length, cnext.ch.length); + + ch = chTemp; + if (cnext.next == null) + return false; + return chain (cnext.next); + } + else + return super.chain (next); + } + + void dump (CPStringBuilder os) + { + os.append (ch); + } +} diff --git a/libjava/classpath/gnu/java/util/regex/RETokenEnd.java b/libjava/classpath/gnu/java/util/regex/RETokenEnd.java index 294e32085b5..33e0febb7b2 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenEnd.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenEnd.java @@ -38,7 +38,10 @@ exception statement from your version. */ package gnu.java.util.regex; -final class RETokenEnd extends REToken { +import gnu.java.lang.CPStringBuilder; + +final class RETokenEnd extends REToken +{ /** * Indicates whether this token should match on a line break. */ @@ -51,74 +54,98 @@ final class RETokenEnd extends REToken { */ private boolean fake = false; - RETokenEnd(int subIndex,String newline) { - super(subIndex); + RETokenEnd (int subIndex, String newline) + { + super (subIndex); this.newline = newline; this.check_java_line_terminators = false; } - RETokenEnd(int subIndex, String newline, boolean b) { - super(subIndex); + RETokenEnd (int subIndex, String newline, boolean b) + { + super (subIndex); this.newline = newline; this.check_java_line_terminators = b; } - void setFake(boolean fake) { + void setFake (boolean fake) + { this.fake = fake; } - int getMaximumLength() { + int getMaximumLength () + { return 0; } - boolean match(CharIndexed input, REMatch mymatch) { - if (!fake) return super.match(input, mymatch); - return super.matchFake(input, mymatch); + boolean match (CharIndexed input, REMatch mymatch) + { + if (!fake) + return super.match (input, mymatch); + return super.matchFake (input, mymatch); } - REMatch matchThis(CharIndexed input, REMatch mymatch) { - char ch = input.charAt(mymatch.index); - if (ch == CharIndexed.OUT_OF_BOUNDS) - return ((mymatch.eflags & RE.REG_NOTEOL)>0) ? - null : mymatch; - if (check_java_line_terminators) { - if (ch == '\n') { - char ch1 = input.charAt(mymatch.index - 1); - if (ch1 == '\r') return null; - return mymatch; - } - if (ch == '\r') return mymatch; - if (ch == '\u0085') return mymatch; // A next-line character - if (ch == '\u2028') return mymatch; // A line-separator character - if (ch == '\u2029') return mymatch; // A paragraph-separator character - return null; - } - if (newline != null) { - char z; - int i = 0; // position in newline - do { - z = newline.charAt(i); - if (ch != z) return null; - ++i; - ch = input.charAt(mymatch.index + i); - } while (i < newline.length()); - + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + char ch = input.charAt (mymatch.index); + if (ch == CharIndexed.OUT_OF_BOUNDS) + return ((mymatch.eflags & RE.REG_NOTEOL) > 0) ? null : mymatch; + if (check_java_line_terminators) + { + if (ch == '\n') + { + char ch1 = input.charAt (mymatch.index - 1); + if (ch1 == '\r') + return null; return mymatch; - } + } + if (ch == '\r') + return mymatch; + if (ch == '\u0085') + return mymatch; // A next-line character + if (ch == '\u2028') + return mymatch; // A line-separator character + if (ch == '\u2029') + return mymatch; // A paragraph-separator character return null; - } + } + if (newline != null) + { + char z; + int i = 0; // position in newline + do + { + z = newline.charAt (i); + if (ch != z) + return null; + ++i; + ch = input.charAt (mymatch.index + i); + } + while (i < newline.length ()); + + return mymatch; + } + return null; + } - boolean returnsFixedLengthMatches() { return true; } + boolean returnsFixedLengthMatches () + { + return true; + } - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { - REMatch m = (REMatch) mymatch.clone(); - REToken tk = (REToken) this.clone(); - tk.chain(null); - if (tk.match(input, m)) return max; - else return 0; - } + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + REMatch m = (REMatch) mymatch.clone (); + REToken tk = (REToken) this.clone (); + tk.chain (null); + if (tk.match (input, m)) + return max; + else + return 0; + } - void dump(StringBuffer os) { - os.append('$'); + void dump (CPStringBuilder os) + { + os.append ('$'); } } diff --git a/libjava/classpath/gnu/java/util/regex/RETokenEndOfPreviousMatch.java b/libjava/classpath/gnu/java/util/regex/RETokenEndOfPreviousMatch.java index ea5580e1666..e4ad6194168 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenEndOfPreviousMatch.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenEndOfPreviousMatch.java @@ -37,36 +37,52 @@ exception statement from your version. */ package gnu.java.util.regex; -class RETokenEndOfPreviousMatch extends RETokenStart { +import gnu.java.lang.CPStringBuilder; - RETokenEndOfPreviousMatch(int subIndex) { - super(subIndex, null); - } +class RETokenEndOfPreviousMatch extends RETokenStart +{ - int getMaximumLength() { - return 0; - } - - REMatch matchThis(CharIndexed input, REMatch mymatch) { - REMatch lastMatch = input.getLastMatch(); - if (lastMatch == null) return super.matchThis(input, mymatch); - if (input.getAnchor()+mymatch.index == - lastMatch.anchor+lastMatch.index) { - return mymatch; - } - else { - return null; - } - } + RETokenEndOfPreviousMatch (int subIndex) + { + super (subIndex, null); + } - boolean returnsFixedLengthmatches() { return true; } + int getMaximumLength () + { + return 0; + } - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { - if (matchThis(input, mymatch) != null) return max; - else return 0; - } - - void dump(StringBuffer os) { - os.append("\\G"); - } + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + REMatch lastMatch = input.getLastMatch (); + if (lastMatch == null) + return super.matchThis (input, mymatch); + if (input.getAnchor () + mymatch.index == + lastMatch.anchor + lastMatch.index) + { + return mymatch; + } + else + { + return null; + } + } + + boolean returnsFixedLengthmatches () + { + return true; + } + + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + if (matchThis (input, mymatch) != null) + return max; + else + return 0; + } + + void dump (CPStringBuilder os) + { + os.append ("\\G"); + } } diff --git a/libjava/classpath/gnu/java/util/regex/RETokenEndSub.java b/libjava/classpath/gnu/java/util/regex/RETokenEndSub.java index b3a28a3e82e..0848207f491 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenEndSub.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenEndSub.java @@ -37,34 +37,43 @@ exception statement from your version. */ package gnu.java.util.regex; -final class RETokenEndSub extends REToken { - RETokenEndSub(int subIndex) { - super(subIndex); - } +import gnu.java.lang.CPStringBuilder; - int getMaximumLength() { - return 0; - } - - REMatch matchThis(CharIndexed input, REMatch mymatch) { - mymatch.start[subIndex] = mymatch.start1[subIndex]; - mymatch.end[subIndex] = mymatch.index; - return mymatch; - } +final class RETokenEndSub extends REToken +{ + RETokenEndSub (int subIndex) + { + super (subIndex); + } - REMatch findMatch(CharIndexed input, REMatch mymatch) { - mymatch.start[subIndex] = mymatch.start1[subIndex]; - mymatch.end[subIndex] = mymatch.index; - return super.findMatch(input, mymatch); - } + int getMaximumLength () + { + return 0; + } - void setHitEnd(CharIndexed input, REMatch mymatch) { - // Do nothing - } + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + mymatch.start[subIndex] = mymatch.start1[subIndex]; + mymatch.end[subIndex] = mymatch.index; + return mymatch; + } - void dump(StringBuffer os) { - // handled by RE - // But add something for debugging. - os.append("(?#RETokenEndSub subIndex=" + subIndex + ")"); - } + REMatch findMatch (CharIndexed input, REMatch mymatch) + { + mymatch.start[subIndex] = mymatch.start1[subIndex]; + mymatch.end[subIndex] = mymatch.index; + return super.findMatch (input, mymatch); + } + + void setHitEnd (CharIndexed input, REMatch mymatch) + { + // Do nothing + } + + void dump (CPStringBuilder os) + { + // handled by RE + // But add something for debugging. + os.append ("(?#RETokenEndSub subIndex=" + subIndex + ")"); + } } diff --git a/libjava/classpath/gnu/java/util/regex/RETokenIndependent.java b/libjava/classpath/gnu/java/util/regex/RETokenIndependent.java index 48f8656123d..8ad728df837 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenIndependent.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenIndependent.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.java.util.regex; +import gnu.java.lang.CPStringBuilder; + /** * @author Ito Kazumitsu */ @@ -44,35 +46,40 @@ final class RETokenIndependent extends REToken { REToken re; - RETokenIndependent(REToken re) throws REException { - super(0); + RETokenIndependent (REToken re) throws REException + { + super (0); this.re = re; } - int getMinimumLength() { - return re.getMinimumLength(); + int getMinimumLength () + { + return re.getMinimumLength (); } - int getMaximumLength() { - return re.getMaximumLength(); + int getMaximumLength () + { + return re.getMaximumLength (); } - REMatch matchThis(CharIndexed input, REMatch mymatch) + REMatch matchThis (CharIndexed input, REMatch mymatch) { - boolean b = re.match(input, mymatch); - if (b) { - // Once we have found a match, we do not see other possible matches. - if (mymatch.backtrackStack != null) mymatch.backtrackStack.clear(); - return mymatch; + boolean b = re.match (input, mymatch); + if (b) + { + // Once we have found a match, we do not see other possible matches. + if (mymatch.backtrackStack != null) + mymatch.backtrackStack.clear (); + return mymatch; - } + } return null; } - void dump(StringBuffer os) { - os.append("(?>"); - re.dumpAll(os); - os.append(')'); - } + void dump (CPStringBuilder os) + { + os.append ("(?>"); + re.dumpAll (os); + os.append (')'); + } } - diff --git a/libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java b/libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java index 134f17c609c..1dc6019380f 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenLookAhead.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.java.util.regex; +import gnu.java.lang.CPStringBuilder; + /** * @since gnu.regexp 1.1.3 * @author Shashank Bapat @@ -46,35 +48,41 @@ final class RETokenLookAhead extends REToken REToken re; boolean negative; - RETokenLookAhead(REToken re, boolean negative) throws REException { - super(0); + RETokenLookAhead (REToken re, boolean negative) throws REException + { + super (0); this.re = re; this.negative = negative; } - int getMaximumLength() { + int getMaximumLength () + { return 0; } - REMatch matchThis(CharIndexed input, REMatch mymatch) + REMatch matchThis (CharIndexed input, REMatch mymatch) { - REMatch trymatch = (REMatch)mymatch.clone(); - if (re.match(input, trymatch)) { - if (negative) return null; - trymatch.index = mymatch.index; - return trymatch; - } - else { - if (negative) return mymatch; - return null; - } + REMatch trymatch = (REMatch) mymatch.clone (); + if (re.match (input, trymatch)) + { + if (negative) + return null; + trymatch.index = mymatch.index; + return trymatch; + } + else + { + if (negative) + return mymatch; + return null; + } } - void dump(StringBuffer os) { - os.append("(?"); - os.append(negative ? '!' : '='); - re.dumpAll(os); - os.append(')'); - } + void dump (CPStringBuilder os) + { + os.append ("(?"); + os.append (negative ? '!' : '='); + re.dumpAll (os); + os.append (')'); + } } - diff --git a/libjava/classpath/gnu/java/util/regex/RETokenLookBehind.java b/libjava/classpath/gnu/java/util/regex/RETokenLookBehind.java index a01a15bc90f..f61c93c0abb 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenLookBehind.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenLookBehind.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.java.util.regex; +import gnu.java.lang.CPStringBuilder; + /** * @author Ito Kazumitsu */ @@ -45,74 +47,90 @@ final class RETokenLookBehind extends REToken REToken re; boolean negative; - RETokenLookBehind(REToken re, boolean negative) throws REException { - super(0); + RETokenLookBehind (REToken re, boolean negative) throws REException + { + super (0); this.re = re; this.negative = negative; } - int getMaximumLength() { + int getMaximumLength () + { return 0; } - REMatch matchThis(CharIndexed input, REMatch mymatch) + REMatch matchThis (CharIndexed input, REMatch mymatch) { - int max = re.getMaximumLength(); - CharIndexed behind = input.lookBehind(mymatch.index, max); - REMatch trymatch = (REMatch)mymatch.clone(); - REMatch trymatch1 = (REMatch)mymatch.clone(); - REMatch newMatch = null; - int diff = behind.length() - input.length(); + int max = re.getMaximumLength (); + CharIndexed behind = input.lookBehind (mymatch.index, max); + REMatch trymatch = (REMatch) mymatch.clone (); + int diff = behind.length () - input.length (); int curIndex = trymatch.index + diff; trymatch.index = 0; trymatch.offset = 0; - RETokenMatchHereOnly stopper = new RETokenMatchHereOnly(curIndex); - REToken re1 = (REToken) re.clone(); - re1.chain(stopper); - if (re1.match(behind, trymatch)) { - if (negative) return null; - for (int i = 0; i < trymatch.start.length; i++) { - if (trymatch.start[i] != -1 && trymatch.end[i] != -1) { - trymatch.start[i] -= diff; - if (trymatch.start[i] < 0) trymatch.start[i] -= 1; - trymatch.end[i] -= diff; - if (trymatch.end[i] < 0) trymatch.end[i] -= 1; + RETokenMatchHereOnly stopper = new RETokenMatchHereOnly (curIndex); + REToken re1 = (REToken) re.clone (); + re1.chain (stopper); + if (re1.match (behind, trymatch)) + { + if (negative) + return null; + for (int i = 0; i < trymatch.start.length; i++) + { + if (trymatch.start[i] != -1 && trymatch.end[i] != -1) + { + trymatch.start[i] -= diff; + if (trymatch.start[i] < 0) + trymatch.start[i] -= 1; + trymatch.end[i] -= diff; + if (trymatch.end[i] < 0) + trymatch.end[i] -= 1; + } } + trymatch.index = mymatch.index; + trymatch.offset = mymatch.offset; + return trymatch; + } + else + { + if (negative) + return mymatch; + return null; } - trymatch.index = mymatch.index; - trymatch.offset = mymatch.offset; - return trymatch; - } - else { - if (negative) return mymatch; - return null; - } } - void dump(StringBuffer os) { - os.append("(?<"); - os.append(negative ? '!' : '='); - re.dumpAll(os); - os.append(')'); - } - - private static class RETokenMatchHereOnly extends REToken { + void dump (CPStringBuilder os) + { + os.append ("(?<"); + os.append (negative ? '!' : '='); + re.dumpAll (os); + os.append (')'); + } - int getMaximumLength() { return 0; } + private static class RETokenMatchHereOnly extends REToken + { - private int index; + int getMaximumLength () + { + return 0; + } - RETokenMatchHereOnly(int index) { - super(0); - this.index = index; - } + private int index; - REMatch matchThis(CharIndexed input, REMatch mymatch) { - return (index == mymatch.index ? mymatch : null); - } + RETokenMatchHereOnly (int index) + { + super (0); + this.index = index; + } - void dump(StringBuffer os) {} + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + return (index == mymatch.index ? mymatch : null); + } + void dump (CPStringBuilder os) + { } -} + } +} diff --git a/libjava/classpath/gnu/java/util/regex/RETokenNamedProperty.java b/libjava/classpath/gnu/java/util/regex/RETokenNamedProperty.java dissimilarity index 72% index 0051f164364..1683cb1bf67 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenNamedProperty.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenNamedProperty.java @@ -1,373 +1,410 @@ -/* gnu/regexp/RETokenNamedProperty.java - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.java.util.regex; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -final class RETokenNamedProperty extends REToken { - String name; - boolean insens; - boolean negate; - Handler handler; - - // Grouped properties - static final byte[] LETTER = new byte[] - { Character.LOWERCASE_LETTER, - Character.UPPERCASE_LETTER, - Character.TITLECASE_LETTER, - Character.MODIFIER_LETTER, - Character.OTHER_LETTER }; - - static final byte[] MARK = new byte[] - { Character.NON_SPACING_MARK, - Character.COMBINING_SPACING_MARK, - Character.ENCLOSING_MARK }; - - static final byte[] SEPARATOR = new byte[] - { Character.SPACE_SEPARATOR, - Character.LINE_SEPARATOR, - Character.PARAGRAPH_SEPARATOR }; - - static final byte[] SYMBOL = new byte[] - { Character.MATH_SYMBOL, - Character.CURRENCY_SYMBOL, - Character.MODIFIER_SYMBOL, - Character.OTHER_SYMBOL }; - - static final byte[] NUMBER = new byte[] - { Character.DECIMAL_DIGIT_NUMBER, - Character.LETTER_NUMBER, - Character.OTHER_NUMBER }; - - static final byte[] PUNCTUATION = new byte[] - { Character.DASH_PUNCTUATION, - Character.START_PUNCTUATION, - Character.END_PUNCTUATION, - Character.CONNECTOR_PUNCTUATION, - Character.OTHER_PUNCTUATION, - Character.INITIAL_QUOTE_PUNCTUATION, - Character.FINAL_QUOTE_PUNCTUATION}; - - static final byte[] OTHER = new byte[] - { Character.CONTROL, - Character.FORMAT, - Character.PRIVATE_USE, - Character.SURROGATE, - Character.UNASSIGNED }; - - RETokenNamedProperty(int subIndex, String name, boolean insens, boolean negate) throws REException { - super(subIndex); - this.name = name; - this.insens = insens; - this.negate = negate; - handler = getHandler(name); - } - - int getMinimumLength() { - return 1; - } - - int getMaximumLength() { - return 1; - } - - REMatch matchThis(CharIndexed input, REMatch mymatch) { - char ch = input.charAt(mymatch.index); - boolean retval = matchOneChar(ch); - if (retval) { - ++mymatch.index; - return mymatch; - } - return null; - } - - private boolean matchOneChar(char ch) { - if (ch == CharIndexed.OUT_OF_BOUNDS) - return false; - - boolean retval = handler.includes(ch); - if (insens) { - retval = retval || - handler.includes(toUpperCase(ch, unicodeAware)) || - handler.includes(toLowerCase(ch, unicodeAware)); - } - - if (negate) retval = !retval; - return retval; - } - - boolean returnsFixedLengthMatches() { return true; } - - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { - int index = mymatch.index; - int numRepeats = 0; - while (true) { - if (numRepeats >= max) break; - char ch = input.charAt(index++); - if (! matchOneChar(ch)) break; - numRepeats++; - } - return numRepeats; - } - - void dump(StringBuffer os) { - os.append("\\") - .append(negate ? "P" : "p") - .append("{" + name + "}"); - } - - private abstract static class Handler { - public abstract boolean includes(char c); - } - - private Handler getHandler(String name) throws REException { - if (name.equals("Lower") || - name.equals("Upper") || - // name.equals("ASCII") || - name.equals("Alpha") || - name.equals("Digit") || - name.equals("Alnum") || - name.equals("Punct") || - name.equals("Graph") || - name.equals("Print") || - name.equals("Blank") || - name.equals("Cntrl") || - name.equals("XDigit") || - name.equals("Space") ) { - return new POSIXHandler(name); - } - if (name.startsWith("In")) { - try { - name = name.substring(2); - Character.UnicodeBlock block = Character.UnicodeBlock.forName(name); - return new UnicodeBlockHandler(block); - } - catch (IllegalArgumentException e) { - throw new REException("Invalid Unicode block name: " + name, REException.REG_ESCAPE, 0); - } - } - if (name.startsWith("Is")) { - name = name.substring(2); - } - - // "grouped properties" - if (name.equals("L")) - return new UnicodeCategoriesHandler(LETTER); - if (name.equals("M")) - return new UnicodeCategoriesHandler(MARK); - if (name.equals("Z")) - return new UnicodeCategoriesHandler(SEPARATOR); - if (name.equals("S")) - return new UnicodeCategoriesHandler(SYMBOL); - if (name.equals("N")) - return new UnicodeCategoriesHandler(NUMBER); - if (name.equals("P")) - return new UnicodeCategoriesHandler(PUNCTUATION); - if (name.equals("C")) - return new UnicodeCategoriesHandler(OTHER); - - if (name.equals("Mc")) - return new UnicodeCategoryHandler(Character.COMBINING_SPACING_MARK); - if (name.equals("Pc")) - return new UnicodeCategoryHandler(Character.CONNECTOR_PUNCTUATION); - if (name.equals("Cc")) - return new UnicodeCategoryHandler(Character.CONTROL); - if (name.equals("Sc")) - return new UnicodeCategoryHandler(Character.CURRENCY_SYMBOL); - if (name.equals("Pd")) - return new UnicodeCategoryHandler(Character.DASH_PUNCTUATION); - if (name.equals("Nd")) - return new UnicodeCategoryHandler(Character.DECIMAL_DIGIT_NUMBER); - if (name.equals("Me")) - return new UnicodeCategoryHandler(Character.ENCLOSING_MARK); - if (name.equals("Pe")) - return new UnicodeCategoryHandler(Character.END_PUNCTUATION); - if (name.equals("Pf")) - return new UnicodeCategoryHandler(Character.FINAL_QUOTE_PUNCTUATION); - if (name.equals("Cf")) - return new UnicodeCategoryHandler(Character.FORMAT); - if (name.equals("Pi")) - return new UnicodeCategoryHandler(Character.INITIAL_QUOTE_PUNCTUATION); - if (name.equals("Nl")) - return new UnicodeCategoryHandler(Character.LETTER_NUMBER); - if (name.equals("Zl")) - return new UnicodeCategoryHandler(Character.LINE_SEPARATOR); - if (name.equals("Ll")) - return new UnicodeCategoryHandler(Character.LOWERCASE_LETTER); - if (name.equals("Sm")) - return new UnicodeCategoryHandler(Character.MATH_SYMBOL); - if (name.equals("Lm")) - return new UnicodeCategoryHandler(Character.MODIFIER_LETTER); - if (name.equals("Sk")) - return new UnicodeCategoryHandler(Character.MODIFIER_SYMBOL); - if (name.equals("Mn")) - return new UnicodeCategoryHandler(Character.NON_SPACING_MARK); - if (name.equals("Lo")) - return new UnicodeCategoryHandler(Character.OTHER_LETTER); - if (name.equals("No")) - return new UnicodeCategoryHandler(Character.OTHER_NUMBER); - if (name.equals("Po")) - return new UnicodeCategoryHandler(Character.OTHER_PUNCTUATION); - if (name.equals("So")) - return new UnicodeCategoryHandler(Character.OTHER_SYMBOL); - if (name.equals("Zp")) - return new UnicodeCategoryHandler(Character.PARAGRAPH_SEPARATOR); - if (name.equals("Co")) - return new UnicodeCategoryHandler(Character.PRIVATE_USE); - if (name.equals("Zs")) - return new UnicodeCategoryHandler(Character.SPACE_SEPARATOR); - if (name.equals("Ps")) - return new UnicodeCategoryHandler(Character.START_PUNCTUATION); - if (name.equals("Cs")) - return new UnicodeCategoryHandler(Character.SURROGATE); - if (name.equals("Lt")) - return new UnicodeCategoryHandler(Character.TITLECASE_LETTER); - if (name.equals("Cn")) - return new UnicodeCategoryHandler(Character.UNASSIGNED); - if (name.equals("Lu")) - return new UnicodeCategoryHandler(Character.UPPERCASE_LETTER); - if (name.equals("all")) - return new Handler() - { - public boolean includes(char c) - { - return true; - } - }; - if (name.startsWith("java")) - { - try - { - Method m = Character.class.getMethod("is" + name.substring(4), - Character.TYPE); - return new JavaCategoryHandler(m); - } - catch (NoSuchMethodException e) - { - throw new REException("Unsupported Java handler: " + name, e, - REException.REG_ESCAPE, 0); - } - } - throw new REException("unsupported name " + name, REException.REG_ESCAPE, 0); - } - - private static class POSIXHandler extends Handler { - private RETokenPOSIX retoken; - public POSIXHandler(String name) { - int posixId = RETokenPOSIX.intValue(name.toLowerCase()); - if (posixId != -1) - retoken = new RETokenPOSIX(0,posixId,false,false); - else - throw new RuntimeException("Unknown posix ID: " + name); - } - public boolean includes(char c) { - return retoken.matchOneChar(c); - } - } - - private static class UnicodeCategoryHandler extends Handler { - public UnicodeCategoryHandler(byte category) { - this.category = (int)category; - } - private int category; - public boolean includes(char c) { - return Character.getType(c) == category; - } - } - - private static class UnicodeCategoriesHandler extends Handler { - public UnicodeCategoriesHandler(byte[] categories) { - this.categories = categories; - } - private byte[] categories; - public boolean includes(char c) { - int category = Character.getType(c); - for (int i = 0; i < categories.length; i++) - if (category == categories[i]) - return true; - return false; - } - } - - private static class UnicodeBlockHandler extends Handler { - public UnicodeBlockHandler(Character.UnicodeBlock block) { - this.block = block; - } - private Character.UnicodeBlock block; - public boolean includes(char c) { - Character.UnicodeBlock cblock = Character.UnicodeBlock.of(c); - return (cblock != null && cblock.equals(block)); - } - } - - /** - * Handle the Java-specific extensions \p{javaX} where X - * is a method from Character of the form isX - * - * @author Andrew John Hughes (gnu_andrew@member.fsf.org) - */ - private static class JavaCategoryHandler - extends Handler - { - private Method method; - - public JavaCategoryHandler(Method m) - { - this.method = m; - } - - public boolean includes(char c) - { - try - { - return (Boolean) method.invoke(null, c); - } - catch (IllegalAccessException e) - { - throw new InternalError("Unable to access method " + method); - } - catch (InvocationTargetException e) - { - throw new InternalError("Error invoking " + method); - } - } - } - -} +/* gnu/regexp/RETokenNamedProperty.java + Copyright (C) 2006 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.util.regex; + +import gnu.java.lang.CPStringBuilder; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +final class RETokenNamedProperty extends REToken +{ + String name; + boolean insens; + boolean negate; + Handler handler; + + // Grouped properties + static final byte[] LETTER = new byte[]{ Character.LOWERCASE_LETTER, + Character.UPPERCASE_LETTER, + Character.TITLECASE_LETTER, + Character.MODIFIER_LETTER, + Character.OTHER_LETTER + }; + + static final byte[] MARK = new byte[]{ Character.NON_SPACING_MARK, + Character.COMBINING_SPACING_MARK, + Character.ENCLOSING_MARK + }; + + static final byte[] SEPARATOR = new byte[]{ Character.SPACE_SEPARATOR, + Character.LINE_SEPARATOR, + Character.PARAGRAPH_SEPARATOR + }; + + static final byte[] SYMBOL = new byte[]{ Character.MATH_SYMBOL, + Character.CURRENCY_SYMBOL, + Character.MODIFIER_SYMBOL, + Character.OTHER_SYMBOL + }; + + static final byte[] NUMBER = new byte[]{ Character.DECIMAL_DIGIT_NUMBER, + Character.LETTER_NUMBER, + Character.OTHER_NUMBER + }; + + static final byte[] PUNCTUATION = new byte[]{ Character.DASH_PUNCTUATION, + Character.START_PUNCTUATION, + Character.END_PUNCTUATION, + Character.CONNECTOR_PUNCTUATION, + Character.OTHER_PUNCTUATION, + Character.INITIAL_QUOTE_PUNCTUATION, + Character.FINAL_QUOTE_PUNCTUATION + }; + + static final byte[] OTHER = new byte[]{ Character.CONTROL, + Character.FORMAT, + Character.PRIVATE_USE, + Character.SURROGATE, + Character.UNASSIGNED + }; + + RETokenNamedProperty (int subIndex, String name, boolean insens, + boolean negate) throws REException + { + super (subIndex); + this.name = name; + this.insens = insens; + this.negate = negate; + handler = getHandler (name); + } + + int getMinimumLength () + { + return 1; + } + + int getMaximumLength () + { + return 1; + } + + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + char ch = input.charAt (mymatch.index); + boolean retval = matchOneChar (ch); + if (retval) + { + ++mymatch.index; + return mymatch; + } + return null; + } + + private boolean matchOneChar (char ch) + { + if (ch == CharIndexed.OUT_OF_BOUNDS) + return false; + + boolean retval = handler.includes (ch); + if (insens) + { + retval = retval || + handler.includes (toUpperCase (ch, unicodeAware)) || + handler.includes (toLowerCase (ch, unicodeAware)); + } + + if (negate) + retval = !retval; + return retval; + } + + boolean returnsFixedLengthMatches () + { + return true; + } + + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + int index = mymatch.index; + int numRepeats = 0; + while (true) + { + if (numRepeats >= max) + break; + char ch = input.charAt (index++); + if (!matchOneChar (ch)) + break; + numRepeats++; + } + return numRepeats; + } + + void dump (CPStringBuilder os) + { + os.append ("\\").append (negate ? "P" : "p").append ("{" + name + "}"); + } + + private abstract static class Handler + { + public abstract boolean includes (char c); + } + + private Handler getHandler (String name) throws REException + { + if (name.equals ("Lower") || name.equals ("Upper") || + // name.equals("ASCII") || + name.equals ("Alpha") || + name.equals ("Digit") || + name.equals ("Alnum") || + name.equals ("Punct") || + name.equals ("Graph") || + name.equals ("Print") || + name.equals ("Blank") || + name.equals ("Cntrl") || + name.equals ("XDigit") || name.equals ("Space")) + { + return new POSIXHandler (name); + } + if (name.startsWith ("In")) + { + try + { + name = name.substring (2); + Character.UnicodeBlock block = + Character.UnicodeBlock.forName (name); + return new UnicodeBlockHandler (block); + } + catch (IllegalArgumentException e) + { + throw new REException ("Invalid Unicode block name: " + name, + REException.REG_ESCAPE, 0); + } + } + if (name.startsWith ("Is")) + { + name = name.substring (2); + } + + // "grouped properties" + if (name.equals ("L")) + return new UnicodeCategoriesHandler (LETTER); + if (name.equals ("M")) + return new UnicodeCategoriesHandler (MARK); + if (name.equals ("Z")) + return new UnicodeCategoriesHandler (SEPARATOR); + if (name.equals ("S")) + return new UnicodeCategoriesHandler (SYMBOL); + if (name.equals ("N")) + return new UnicodeCategoriesHandler (NUMBER); + if (name.equals ("P")) + return new UnicodeCategoriesHandler (PUNCTUATION); + if (name.equals ("C")) + return new UnicodeCategoriesHandler (OTHER); + + if (name.equals ("Mc")) + return new UnicodeCategoryHandler (Character.COMBINING_SPACING_MARK); + if (name.equals ("Pc")) + return new UnicodeCategoryHandler (Character.CONNECTOR_PUNCTUATION); + if (name.equals ("Cc")) + return new UnicodeCategoryHandler (Character.CONTROL); + if (name.equals ("Sc")) + return new UnicodeCategoryHandler (Character.CURRENCY_SYMBOL); + if (name.equals ("Pd")) + return new UnicodeCategoryHandler (Character.DASH_PUNCTUATION); + if (name.equals ("Nd")) + return new UnicodeCategoryHandler (Character.DECIMAL_DIGIT_NUMBER); + if (name.equals ("Me")) + return new UnicodeCategoryHandler (Character.ENCLOSING_MARK); + if (name.equals ("Pe")) + return new UnicodeCategoryHandler (Character.END_PUNCTUATION); + if (name.equals ("Pf")) + return new UnicodeCategoryHandler (Character.FINAL_QUOTE_PUNCTUATION); + if (name.equals ("Cf")) + return new UnicodeCategoryHandler (Character.FORMAT); + if (name.equals ("Pi")) + return new UnicodeCategoryHandler (Character.INITIAL_QUOTE_PUNCTUATION); + if (name.equals ("Nl")) + return new UnicodeCategoryHandler (Character.LETTER_NUMBER); + if (name.equals ("Zl")) + return new UnicodeCategoryHandler (Character.LINE_SEPARATOR); + if (name.equals ("Ll")) + return new UnicodeCategoryHandler (Character.LOWERCASE_LETTER); + if (name.equals ("Sm")) + return new UnicodeCategoryHandler (Character.MATH_SYMBOL); + if (name.equals ("Lm")) + return new UnicodeCategoryHandler (Character.MODIFIER_LETTER); + if (name.equals ("Sk")) + return new UnicodeCategoryHandler (Character.MODIFIER_SYMBOL); + if (name.equals ("Mn")) + return new UnicodeCategoryHandler (Character.NON_SPACING_MARK); + if (name.equals ("Lo")) + return new UnicodeCategoryHandler (Character.OTHER_LETTER); + if (name.equals ("No")) + return new UnicodeCategoryHandler (Character.OTHER_NUMBER); + if (name.equals ("Po")) + return new UnicodeCategoryHandler (Character.OTHER_PUNCTUATION); + if (name.equals ("So")) + return new UnicodeCategoryHandler (Character.OTHER_SYMBOL); + if (name.equals ("Zp")) + return new UnicodeCategoryHandler (Character.PARAGRAPH_SEPARATOR); + if (name.equals ("Co")) + return new UnicodeCategoryHandler (Character.PRIVATE_USE); + if (name.equals ("Zs")) + return new UnicodeCategoryHandler (Character.SPACE_SEPARATOR); + if (name.equals ("Ps")) + return new UnicodeCategoryHandler (Character.START_PUNCTUATION); + if (name.equals ("Cs")) + return new UnicodeCategoryHandler (Character.SURROGATE); + if (name.equals ("Lt")) + return new UnicodeCategoryHandler (Character.TITLECASE_LETTER); + if (name.equals ("Cn")) + return new UnicodeCategoryHandler (Character.UNASSIGNED); + if (name.equals ("Lu")) + return new UnicodeCategoryHandler (Character.UPPERCASE_LETTER); + if (name.equals ("all")) + return new Handler () + { + public boolean includes (char c) + { + return true; + } + }; + if (name.startsWith ("java")) + { + try + { + Method m = Character.class.getMethod ("is" + name.substring (4), + Character.TYPE); + return new JavaCategoryHandler (m); + } + catch (NoSuchMethodException e) + { + throw new REException ("Unsupported Java handler: " + name, e, + REException.REG_ESCAPE, 0); + } + } + throw new REException ("unsupported name " + name, REException.REG_ESCAPE, + 0); + } + + private static class POSIXHandler extends Handler + { + private RETokenPOSIX retoken; + public POSIXHandler (String name) + { + int posixId = RETokenPOSIX.intValue (name.toLowerCase ()); + if (posixId != -1) + retoken = new RETokenPOSIX (0, posixId, false, false); + else + throw new RuntimeException ("Unknown posix ID: " + name); + } + public boolean includes (char c) + { + return retoken.matchOneChar (c); + } + } + + private static class UnicodeCategoryHandler extends Handler + { + public UnicodeCategoryHandler (byte category) + { + this.category = (int) category; + } + private int category; + public boolean includes (char c) + { + return Character.getType (c) == category; + } + } + + private static class UnicodeCategoriesHandler extends Handler + { + public UnicodeCategoriesHandler (byte[]categories) + { + this.categories = categories; + } + private byte[] categories; + public boolean includes (char c) + { + int category = Character.getType (c); + for (int i = 0; i < categories.length; i++) + if (category == categories[i]) + return true; + return false; + } + } + + private static class UnicodeBlockHandler extends Handler + { + public UnicodeBlockHandler (Character.UnicodeBlock block) + { + this.block = block; + } + private Character.UnicodeBlock block; + public boolean includes (char c) + { + Character.UnicodeBlock cblock = Character.UnicodeBlock.of (c); + return (cblock != null && cblock.equals (block)); + } + } + + /** + * Handle the Java-specific extensions \p{javaX} where X + * is a method from Character of the form isX + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + */ + private static class JavaCategoryHandler extends Handler + { + private Method method; + + public JavaCategoryHandler (Method m) + { + this.method = m; + } + + public boolean includes (char c) + { + try + { + return (Boolean) method.invoke (null, c); + } + catch (IllegalAccessException e) + { + throw new InternalError ("Unable to access method " + method); + } + catch (InvocationTargetException e) + { + throw new InternalError ("Error invoking " + method); + } + } + } + +} diff --git a/libjava/classpath/gnu/java/util/regex/RETokenOneOf.java b/libjava/classpath/gnu/java/util/regex/RETokenOneOf.java dissimilarity index 64% index 239c2201ca7..fcae3c2d1d9 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenOneOf.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenOneOf.java @@ -1,281 +1,332 @@ -/* gnu/regexp/RETokenOneOf.java - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.java.util.regex; -import java.util.Vector; -import java.util.Stack; - -final class RETokenOneOf extends REToken { - private Vector options; - private boolean negative; - // True if this RETokenOneOf is supposed to match only one character, - // which is typically the case of a character class expression. - private boolean matchesOneChar; - - private Vector addition; - // This Vector addition is used to store nested character classes. - // For example, if the original expression is - // [2-7a-c[f-k][m-z]&&[^p-v][st]] - // the basic part /2-7a-c/ is stored in the Vector options, and - // the additional part /[f-k][m-z]&&[^p-v][st]/ is stored in the - // Vector addition in the following order (Reverse Polish Notation): - // -- The matching result of the basic part is assumed here. - // [f-k] -- REToken - // "|" -- or - // [m-z] -- REToken - // "|" -- or - // false - // [^p-v] -- REToken - // "|" -- or - // [st] -- REToken - // "|" -- or - // "&" -- and - // - // As it is clear from the explanation above, the Vector addition is - // effective only when this REToken originates from a character class - // expression. - - // This constructor is used for convenience when we know the set beforehand, - // e.g. \d --> new RETokenOneOf("0123456789",false, ..) - // \D --> new RETokenOneOf("0123456789",true, ..) - - RETokenOneOf(int subIndex, String optionsStr, boolean negative, boolean insens) { - super(subIndex); - options = new Vector(); - this.negative = negative; - for (int i = 0; i < optionsStr.length(); i++) - options.addElement(new RETokenChar(subIndex,optionsStr.charAt(i),insens)); - matchesOneChar = true; - } - - RETokenOneOf(int subIndex, Vector options, boolean negative) { - super(subIndex); - this.options = options; - this.negative = negative; - matchesOneChar = negative; - } - - RETokenOneOf(int subIndex, Vector options, Vector addition, boolean negative) { - super(subIndex); - this.options = options; - this.addition = addition; - this.negative = negative; - matchesOneChar = (negative || addition != null); - } - - int getMinimumLength() { - if (matchesOneChar) return 1; - int min = Integer.MAX_VALUE; - int x; - for (int i=0; i < options.size(); i++) { - if ((x = ((REToken) options.elementAt(i)).getMinimumLength()) < min) - min = x; - } - return min; - } - - int getMaximumLength() { - if (matchesOneChar) return 1; - int max = 0; - int x; - for (int i=0; i < options.size(); i++) { - if ((x = ((REToken) options.elementAt(i)).getMaximumLength()) > max) - max = x; - } - return max; - } - - boolean match(CharIndexed input, REMatch mymatch) { - setHitEnd(input, mymatch); - if (matchesOneChar) return matchOneChar(input, mymatch); - else return matchOneRE(input, mymatch); - } - - boolean matchOneChar(CharIndexed input, REMatch mymatch) { - REMatch tryMatch; - boolean tryOnly; - if (addition == null) { - tryMatch = mymatch; - tryOnly = false; - } - else { - tryMatch = (REMatch) mymatch.clone(); - tryOnly = true; - } - boolean b = negative ? - matchN(input, tryMatch, tryOnly) : - matchP(input, tryMatch, tryOnly); - if (addition == null) return b; - - Stack stack = new Stack(); - stack.push(new Boolean(b)); - for (int i=0; i < addition.size(); i++) { - Object obj = addition.elementAt(i); - if (obj instanceof REToken) { - b = ((REToken)obj).match(input, (REMatch)mymatch.clone()); - stack.push(new Boolean(b)); - } - else if (obj instanceof Boolean) { - stack.push(obj); - } - else if (obj.equals("|")) { - b = ((Boolean)stack.pop()).booleanValue(); - b = ((Boolean)stack.pop()).booleanValue() || b; - stack.push(new Boolean(b)); - } - else if (obj.equals("&")) { - b = ((Boolean)stack.pop()).booleanValue(); - b = ((Boolean)stack.pop()).booleanValue() && b; - stack.push(new Boolean(b)); - } - else { - throw new RuntimeException("Invalid object found"); - } - } - b = ((Boolean)stack.pop()).booleanValue(); - if (b) { - ++mymatch.index; - return next(input, mymatch); - } - return false; - } - - private boolean matchN(CharIndexed input, REMatch mymatch, boolean tryOnly) { - if (input.charAt(mymatch.index) == CharIndexed.OUT_OF_BOUNDS) - return false; - - REMatch newMatch = null; - REMatch last = null; - REToken tk; - for (int i=0; i < options.size(); i++) { - tk = (REToken) options.elementAt(i); - REMatch tryMatch = (REMatch) mymatch.clone(); - if (tk.match(input, tryMatch)) { // match was successful - return false; - } // is a match - } // try next option - - if (tryOnly) return true; - ++mymatch.index; - return next(input, mymatch); - } - - private boolean matchP(CharIndexed input, REMatch mymatch, boolean tryOnly) { - REToken tk; - for (int i=0; i < options.size(); i++) { - tk = (REToken) options.elementAt(i); - REMatch tryMatch = (REMatch) mymatch.clone(); - if (tk.match(input, tryMatch)) { // match was successful - if (tryOnly) return true; - if (next(input, tryMatch)) { - mymatch.assignFrom(tryMatch); - return true; - } - } - } - return false; - } - - private boolean matchOneRE(CharIndexed input, REMatch mymatch) { - REMatch newMatch = findMatch(input, mymatch); - if (newMatch != null) { - mymatch.assignFrom(newMatch); - return true; - } - return false; - } - - REMatch findMatch(CharIndexed input, REMatch mymatch) { - if (matchesOneChar) return super.findMatch(input, mymatch); - return findMatch(input, mymatch, 0); - } - - REMatch backtrack(CharIndexed input, REMatch mymatch, Object param) { - return findMatch(input, mymatch, ((Integer)param).intValue()); - } - - private REMatch findMatch(CharIndexed input, REMatch mymatch, int optionIndex) { - for (int i = optionIndex; i < options.size(); i++) { - REToken tk = (REToken) options.elementAt(i); - tk = (REToken) tk.clone(); - tk.chain(getNext()); - REMatch tryMatch = (REMatch) mymatch.clone(); - if (tryMatch.backtrackStack == null) { - tryMatch.backtrackStack = new BacktrackStack(); - } - boolean stackPushed = false; - if (i + 1 < options.size()) { - tryMatch.backtrackStack.push(new BacktrackStack.Backtrack( - this, input, mymatch, new Integer(i + 1))); - stackPushed = true; - } - boolean b = tk.match(input, tryMatch); - if (b) { - return tryMatch; - } - if (stackPushed) tryMatch.backtrackStack.pop(); - } - return null; - } - - boolean returnsFixedLengthMatches() { return matchesOneChar; } - - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { - if (!matchesOneChar) - return super.findFixedLengthMatches(input, mymatch, max); - int numRepeats = 0; - REMatch m = (REMatch) mymatch.clone(); - REToken tk = (REToken) this.clone(); - tk.chain(null); - while (true) { - if (numRepeats >= max) break; - m = tk.findMatch(input, m); - if (m == null) break; - numRepeats++; - } - return numRepeats; - } - - void dump(StringBuffer os) { - os.append(negative ? "[^" : "(?:"); - for (int i = 0; i < options.size(); i++) { - if (!negative && (i > 0)) os.append('|'); - ((REToken) options.elementAt(i)).dumpAll(os); - } - os.append(negative ? ']' : ')'); - } -} +/* gnu/regexp/RETokenOneOf.java + Copyright (C) 2006 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.util.regex; + +import gnu.java.lang.CPStringBuilder; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Deque; +import java.util.List; + +final class RETokenOneOf extends REToken +{ + private final List < REToken > options; + private boolean negative; + // True if this RETokenOneOf is supposed to match only one character, + // which is typically the case of a character class expression. + private boolean matchesOneChar; + + private final List < Object > addition; + // This ArrayList addition is used to store nested character classes. + // For example, if the original expression is + // [2-7a-c[f-k][m-z]&&[^p-v][st]] + // the basic part /2-7a-c/ is stored in the ArrayList options, and + // the additional part /[f-k][m-z]&&[^p-v][st]/ is stored in the + // ArrayList addition in the following order (Reverse Polish Notation): + // -- The matching result of the basic part is assumed here. + // [f-k] -- REToken + // "|" -- or + // [m-z] -- REToken + // "|" -- or + // false + // [^p-v] -- REToken + // "|" -- or + // [st] -- REToken + // "|" -- or + // "&" -- and + // + // As it is clear from the explanation above, the ArrayList addition is + // effective only when this REToken originates from a character class + // expression. + + // This constructor is used for convenience when we know the set beforehand, + // e.g. \d --> new RETokenOneOf("0123456789",false, ..) + // \D --> new RETokenOneOf("0123456789",true, ..) + + RETokenOneOf (int subIndex, String optionsStr, boolean negative, + boolean insens) + { + super (subIndex); + options = new ArrayList < REToken > (); + this.negative = negative; + for (int i = 0; i < optionsStr.length (); i++) + options.add (new RETokenChar (subIndex, optionsStr.charAt (i), insens)); + matchesOneChar = true; + addition = null; + } + + RETokenOneOf (int subIndex, List < REToken > options, boolean negative) + { + this (subIndex, options, null, negative); + } + + RETokenOneOf (int subIndex, List < REToken > options, + List < Object > addition, boolean negative) + { + super (subIndex); + this.options = options; + this.addition = addition; + this.negative = negative; + matchesOneChar = (negative || addition != null); + } + + int getMinimumLength () + { + if (matchesOneChar) + return 1; + int min = Integer.MAX_VALUE; + int x; + for (REToken t:options) + { + if ((x = t.getMinimumLength ()) < min) + min = x; + } + return min; + } + + int getMaximumLength () + { + if (matchesOneChar) + return 1; + int max = 0; + int x; + for (REToken t:options) + { + if ((x = t.getMaximumLength ()) > max) + max = x; + } + return max; + } + + boolean match (CharIndexed input, REMatch mymatch) + { + setHitEnd (input, mymatch); + if (matchesOneChar) + return matchOneChar (input, mymatch); + else + return matchOneRE (input, mymatch); + } + + boolean matchOneChar (CharIndexed input, REMatch mymatch) + { + REMatch tryMatch; + boolean tryOnly; + if (addition == null) + { + tryMatch = mymatch; + tryOnly = false; + } + else + { + tryMatch = (REMatch) mymatch.clone (); + tryOnly = true; + } + boolean b = negative ? + matchN (input, tryMatch, tryOnly) : matchP (input, tryMatch, tryOnly); + if (addition == null) + return b; + + final Deque < Boolean > stack = new ArrayDeque < Boolean > (); + stack.push (new Boolean (b)); + for (Object obj:addition) + { + if (obj instanceof REToken) + { + b = ((REToken) obj).match (input, (REMatch) mymatch.clone ()); + stack.push (new Boolean (b)); + } + else if (obj instanceof Boolean) + { + stack.push ((Boolean) obj); + } + else if (obj.equals ("|")) + { + b = stack.pop (); + b = stack.pop () || b; + stack.push (new Boolean (b)); + } + else if (obj.equals ("&")) + { + b = stack.pop (); + b = stack.pop () && b; + stack.push (new Boolean (b)); + } + else + { + throw new RuntimeException ("Invalid object found"); + } + } + if (stack.pop ()) + { + ++mymatch.index; + return next (input, mymatch); + } + return false; + } + + private boolean matchN (CharIndexed input, REMatch mymatch, boolean tryOnly) + { + if (input.charAt (mymatch.index) == CharIndexed.OUT_OF_BOUNDS) + return false; + + for (REToken tk:options) + { + REMatch tryMatch = (REMatch) mymatch.clone (); + if (tk.match (input, tryMatch)) + { // match was successful + return false; + } // is a match + } // try next option + + if (tryOnly) + return true; + ++mymatch.index; + return next (input, mymatch); + } + + private boolean matchP (CharIndexed input, REMatch mymatch, boolean tryOnly) + { + for (REToken tk:options) + { + REMatch tryMatch = (REMatch) mymatch.clone (); + if (tk.match (input, tryMatch)) + { // match was successful + if (tryOnly) + return true; + if (next (input, tryMatch)) + { + mymatch.assignFrom (tryMatch); + return true; + } + } + } + return false; + } + + private boolean matchOneRE (CharIndexed input, REMatch mymatch) + { + REMatch newMatch = findMatch (input, mymatch); + if (newMatch != null) + { + mymatch.assignFrom (newMatch); + return true; + } + return false; + } + + REMatch findMatch (CharIndexed input, REMatch mymatch) + { + if (matchesOneChar) + return super.findMatch (input, mymatch); + return findMatch (input, mymatch, 0); + } + + REMatch backtrack (CharIndexed input, REMatch mymatch, Object param) + { + return findMatch (input, mymatch, ((Integer) param).intValue ()); + } + + private REMatch findMatch (CharIndexed input, REMatch mymatch, + int optionIndex) + { + for (int i = optionIndex; i < options.size (); i++) + { + REToken tk = options.get (i); + tk = (REToken) tk.clone (); + tk.chain (getNext ()); + REMatch tryMatch = (REMatch) mymatch.clone (); + if (tryMatch.backtrackStack == null) + { + tryMatch.backtrackStack = new BacktrackStack (); + } + boolean stackPushed = false; + if (i + 1 < options.size ()) + { + tryMatch.backtrackStack.push (new BacktrackStack. + Backtrack (this, input, mymatch, + i + 1)); + stackPushed = true; + } + if (tk.match (input, tryMatch)) + { + return tryMatch; + } + if (stackPushed) + tryMatch.backtrackStack.pop (); + } + return null; + } + + boolean returnsFixedLengthMatches () + { + return matchesOneChar; + } + + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + if (!matchesOneChar) + return super.findFixedLengthMatches (input, mymatch, max); + int numRepeats = 0; + REMatch m = (REMatch) mymatch.clone (); + REToken tk = (REToken) this.clone (); + tk.chain (null); + while (true) + { + if (numRepeats >= max) + break; + m = tk.findMatch (input, m); + if (m == null) + break; + numRepeats++; + } + return numRepeats; + } + + void dump (CPStringBuilder os) + { + os.append (negative ? "[^" : "(?:"); + for (int i = 0; i < options.size (); i++) + { + if (!negative && (i > 0)) + os.append ('|'); + options.get (i).dumpAll (os); + } + os.append (negative ? ']' : ')'); + } +} diff --git a/libjava/classpath/gnu/java/util/regex/RETokenPOSIX.java b/libjava/classpath/gnu/java/util/regex/RETokenPOSIX.java index 07298958365..2c809570bbf 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenPOSIX.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenPOSIX.java @@ -38,130 +38,158 @@ exception statement from your version. */ package gnu.java.util.regex; -final class RETokenPOSIX extends REToken { +import gnu.java.lang.CPStringBuilder; + +final class RETokenPOSIX extends REToken +{ int type; boolean insens; boolean negated; - static final int ALNUM = 0; - static final int ALPHA = 1; - static final int BLANK = 2; - static final int CNTRL = 3; - static final int DIGIT = 4; - static final int GRAPH = 5; - static final int LOWER = 6; - static final int PRINT = 7; - static final int PUNCT = 8; - static final int SPACE = 9; - static final int UPPER = 10; + static final int ALNUM = 0; + static final int ALPHA = 1; + static final int BLANK = 2; + static final int CNTRL = 3; + static final int DIGIT = 4; + static final int GRAPH = 5; + static final int LOWER = 6; + static final int PRINT = 7; + static final int PUNCT = 8; + static final int SPACE = 9; + static final int UPPER = 10; static final int XDIGIT = 11; // Array indices correspond to constants defined above. - static final String[] s_nameTable = { + static final String[] s_nameTable = { "alnum", "alpha", "blank", "cntrl", "digit", "graph", "lower", - "print", "punct", "space", "upper", "xdigit" + "print", "punct", "space", "upper", "xdigit" }; // The RE constructor uses this to look up the constant for a string - static int intValue(String key) { - for (int i = 0; i < s_nameTable.length; i++) { - if (s_nameTable[i].equals(key)) return i; - } + static int intValue (String key) + { + for (int i = 0; i < s_nameTable.length; i++) + { + if (s_nameTable[i].equals (key)) + return i; + } return -1; } - RETokenPOSIX(int subIndex, int type, boolean insens, boolean negated) { - super(subIndex); + RETokenPOSIX (int subIndex, int type, boolean insens, boolean negated) + { + super (subIndex); this.type = type; this.insens = insens; this.negated = negated; } - int getMinimumLength() { - return 1; - } + int getMinimumLength () + { + return 1; + } - int getMaximumLength() { - return 1; - } + int getMaximumLength () + { + return 1; + } - REMatch matchThis(CharIndexed input, REMatch mymatch) { - char ch = input.charAt(mymatch.index); - boolean retval = matchOneChar(ch); - if (retval) { + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + char ch = input.charAt (mymatch.index); + boolean retval = matchOneChar (ch); + if (retval) + { ++mymatch.index; return mymatch; } - return null; - } + return null; + } - boolean matchOneChar(char ch) { + boolean matchOneChar (char ch) + { if (ch == CharIndexed.OUT_OF_BOUNDS) return false; - + boolean retval = false; - switch (type) { - case ALNUM: + switch (type) + { + case ALNUM: // Note that there is some debate over whether '_' should be included - retval = Character.isLetterOrDigit(ch) || (ch == '_'); + retval = Character.isLetterOrDigit (ch) || (ch == '_'); break; - case ALPHA: - retval = Character.isLetter(ch); + case ALPHA: + retval = Character.isLetter (ch); break; - case BLANK: + case BLANK: retval = ((ch == ' ') || (ch == '\t')); break; - case CNTRL: - retval = Character.isISOControl(ch); + case CNTRL: + retval = Character.isISOControl (ch); break; - case DIGIT: - retval = Character.isDigit(ch); + case DIGIT: + retval = Character.isDigit (ch); break; - case GRAPH: - retval = (!(Character.isWhitespace(ch) || Character.isISOControl(ch))); + case GRAPH: + retval = + (!(Character.isWhitespace (ch) || Character.isISOControl (ch))); break; - case LOWER: - retval = ((insens && Character.isLetter(ch)) || Character.isLowerCase(ch)); + case LOWER: + retval = ((insens && Character.isLetter (ch)) + || Character.isLowerCase (ch)); break; - case PRINT: - retval = (!(Character.isWhitespace(ch) || Character.isISOControl(ch))) - || (ch == ' '); + case PRINT: + retval = + (!(Character.isWhitespace (ch) || Character.isISOControl (ch))) + || (ch == ' '); break; - case PUNCT: + case PUNCT: // This feels sloppy, especially for non-U.S. locales. - retval = ("`~!@#$%^&*()-_=+[]{}\\|;:'\"/?,.<>".indexOf(ch)!=-1); + retval = ("`~!@#$%^&*()-_=+[]{}\\|;:'\"/?,.<>".indexOf (ch) != -1); break; - case SPACE: - retval = Character.isWhitespace(ch); + case SPACE: + retval = Character.isWhitespace (ch); break; - case UPPER: - retval = ((insens && Character.isLetter(ch)) || Character.isUpperCase(ch)); + case UPPER: + retval = ((insens && Character.isLetter (ch)) + || Character.isUpperCase (ch)); break; - case XDIGIT: - retval = (Character.isDigit(ch) || ("abcdefABCDEF".indexOf(ch)!=-1)); + case XDIGIT: + retval = (Character.isDigit (ch) + || ("abcdefABCDEF".indexOf (ch) != -1)); break; - } + } - if (negated) retval = !retval; + if (negated) + retval = !retval; return retval; } - boolean returnsFixedLengthMatches() { return true; } + boolean returnsFixedLengthMatches () + { + return true; + } - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { - int index = mymatch.index; - int numRepeats = 0; - while (true) { - if (numRepeats >= max) break; - char ch = input.charAt(index++); - if (! matchOneChar(ch)) break; + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + int index = mymatch.index; + int numRepeats = 0; + while (true) + { + if (numRepeats >= max) + break; + char ch = input.charAt (index++); + if (!matchOneChar (ch)) + break; numRepeats++; } - return numRepeats; + return numRepeats; } - void dump(StringBuffer os) { - if (negated) os.append('^'); - os.append("[:" + s_nameTable[type] + ":]"); + void dump (CPStringBuilder os) + { + if (negated) + os.append ('^'); + os.append ("[:" + s_nameTable[type] + ":]"); } } diff --git a/libjava/classpath/gnu/java/util/regex/RETokenRange.java b/libjava/classpath/gnu/java/util/regex/RETokenRange.java index 8a65f77f13f..2597d4d07cb 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenRange.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenRange.java @@ -37,64 +37,83 @@ exception statement from your version. */ package gnu.java.util.regex; -final class RETokenRange extends REToken { +import gnu.java.lang.CPStringBuilder; + +final class RETokenRange extends REToken +{ private char lo, hi; private boolean insens; - RETokenRange(int subIndex, char lo, char hi, boolean ins) { - super(subIndex); + RETokenRange (int subIndex, char lo, char hi, boolean ins) + { + super (subIndex); insens = ins; this.lo = lo; this.hi = hi; } - int getMinimumLength() { + int getMinimumLength () + { return 1; } - int getMaximumLength() { + int getMaximumLength () + { return 1; } - REMatch matchThis(CharIndexed input, REMatch mymatch) { - char c = input.charAt(mymatch.index); - if (matchOneChar(c)) { - ++mymatch.index; - return mymatch; - } - return null; - } - - boolean matchOneChar(char c) { - if (c == CharIndexed.OUT_OF_BOUNDS) return false; - boolean matches = (c >= lo) && (c <= hi); - if (! matches && insens) { - char c1 = toLowerCase(c, unicodeAware); - matches = (c1 >= lo) && (c1 <= hi); - if (!matches) { - c1 = toUpperCase(c, unicodeAware); + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + char c = input.charAt (mymatch.index); + if (matchOneChar (c)) + { + ++mymatch.index; + return mymatch; + } + return null; + } + + boolean matchOneChar (char c) + { + if (c == CharIndexed.OUT_OF_BOUNDS) + return false; + boolean matches = (c >= lo) && (c <= hi); + if (!matches && insens) + { + char c1 = toLowerCase (c, unicodeAware); + matches = (c1 >= lo) && (c1 <= hi); + if (!matches) + { + c1 = toUpperCase (c, unicodeAware); matches = (c1 >= lo) && (c1 <= hi); } - } - return matches; - } - - boolean returnsFixedLengthMatches() { return true; } - - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { - int index = mymatch.index; - int numRepeats = 0; - while (true) { - if (numRepeats >= max) break; - char ch = input.charAt(index++); - if (! matchOneChar(ch)) break; - numRepeats++; - } - return numRepeats; - } - - void dump(StringBuffer os) { - os.append(lo).append('-').append(hi); + } + return matches; + } + + boolean returnsFixedLengthMatches () + { + return true; + } + + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + int index = mymatch.index; + int numRepeats = 0; + while (true) + { + if (numRepeats >= max) + break; + char ch = input.charAt (index++); + if (!matchOneChar (ch)) + break; + numRepeats++; + } + return numRepeats; } -} + void dump (CPStringBuilder os) + { + os.append (lo).append ('-').append (hi); + } +} diff --git a/libjava/classpath/gnu/java/util/regex/RETokenRepeated.java b/libjava/classpath/gnu/java/util/regex/RETokenRepeated.java dissimilarity index 81% index 7f5e5626f1e..0ba880d3987 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenRepeated.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenRepeated.java @@ -1,530 +1,639 @@ -/* gnu/regexp/RETokenRepeated.java - Copyright (C) 2006 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.java.util.regex; - -import java.util.ArrayList; - -final class RETokenRepeated extends REToken { - private REToken token; - private int min,max; - private boolean stingy; - private boolean possessive; - private int tokenFixedLength; - - RETokenRepeated(int subIndex, REToken token, int min, int max) { - super(subIndex); - this.token = token; - this.min = min; - this.max = max; - if (token.returnsFixedLengthMatches()) { - tokenFixedLength = token.getMaximumLength(); - } - else { - tokenFixedLength = -1; - } - } - - /** Sets the minimal matching mode to true. */ - void makeStingy() { - stingy = true; - } - - /** Queries if this token has minimal matching enabled. */ - boolean isStingy() { - return stingy; - } - - /** Sets possessive matching mode to true. */ - void makePossessive() { - possessive = true; - } - - /** Queries if this token has possessive matching enabled. */ - boolean isPossessive() { - return possessive; - } - - /** - * The minimum length of a repeated token is the minimum length - * of the token multiplied by the minimum number of times it must - * match. - */ - int getMinimumLength() { - return (min * token.getMinimumLength()); - } - - int getMaximumLength() { - if (max == Integer.MAX_VALUE) return Integer.MAX_VALUE; - int tmax = token.getMaximumLength(); - if (tmax == Integer.MAX_VALUE) return tmax; - return (max * tmax); - } - - // The comment "MUST make a clone" below means that some tests - // failed without doing clone(), - - private static class DoablesFinder { - private REToken tk; - private CharIndexed input; - private REMatch rematch; - private boolean findFirst; - - private DoablesFinder(REToken tk, CharIndexed input, REMatch mymatch) { - this.tk = tk; - this.input = input; - this.rematch = (REMatch) mymatch.clone(); // MUST make a clone - this.rematch.backtrackStack = new BacktrackStack(); - findFirst = true; - } - - private REMatch find() { - int origin = rematch.index; - REMatch rem; - if (findFirst) { - rem = tk.findMatch(input, rematch); - findFirst = false; - } - else { - while (true) { - if (rematch.backtrackStack.empty()) { - rem = null; - break; - } - BacktrackStack.Backtrack bt = rematch.backtrackStack.pop(); - rem = bt.token.backtrack(bt.input, bt.match, bt.param); - if (rem != null) break; - } - } - if (rem == null) return null; - if (rem.index == origin) rem.empty = true; - rematch = rem; - return (REMatch) rem.clone(); // MUST make a clone. - } - - boolean noMore() { - return rematch.backtrackStack.empty(); - } - } - - REMatch findMatch(CharIndexed input, REMatch mymatch) { - if (tokenFixedLength >= 0) return findMatchFixedLength(input, mymatch); - BacktrackStack stack = new BacktrackStack(); - stack.push(new StackedInfo(input, 0, mymatch, null, null)); - return findMatch(stack); - } - - REMatch backtrack(CharIndexed input, REMatch mymatch, Object param) { - if (tokenFixedLength >= 0) return backtrackFixedLength(input, mymatch, param); - return findMatch((BacktrackStack)param); - } - - private static class StackedInfo extends BacktrackStack.Backtrack { - int numRepeats; - int[] visited; - DoablesFinder finder; - StackedInfo(CharIndexed input, int numRepeats, REMatch match, - int[] visited, DoablesFinder finder) { - super(null, input, match, null); - this.numRepeats = numRepeats; - this.visited = visited; - this.finder = finder; - } - } - - private static class FindMatchControlStack extends ArrayList { - private void push(FindMatchControl control) { - add(control); - } - private FindMatchControl pop() { - return (FindMatchControl)remove(size()-1); - } - private boolean empty() { - return isEmpty(); - } - } - - private static class FindMatchControl { - DoablesFinder finder; - FindMatchControl(DoablesFinder finder) { - this.finder = finder; - } - } - - private REMatch findMatch(BacktrackStack stack) { - return findMatch(stack, new FindMatchControlStack()); - } - - private REMatch findMatch(BacktrackStack stack, - FindMatchControlStack controlStack) { - REMatch result = null; - StackedInfo si = null; - CharIndexed input = null; - int numRepeats = 0; - REMatch mymatch = null; - int[] visited = null; - DoablesFinder finder = null; - - // Avoid using recursive calls because a match can be very long. - - // This is the first entry point of this method. - // If you want to call this method recursively and you need the - // result returned, save necessary information in a FindMatchControl - // object and push it to controlStack, then continue from this point. - // You can check the result after exiting MAIN_LOOP. - MAIN_LOOP0: - while (true) { - - // This is the second entry point of this method. - // If you want to call this method recursively but you do not need the - // result returned, just continue from this point. - MAIN_LOOP: - while (true) { - - if (stack.empty()) break MAIN_LOOP; - si = (StackedInfo)(stack.peek()); - input = si.input; - numRepeats = si.numRepeats; - mymatch = si.match; - visited = si.visited; - finder = si.finder; - - if (mymatch.backtrackStack == null) - mymatch.backtrackStack = new BacktrackStack(); - - if (numRepeats >= max) { - stack.pop(); - REMatch m1 = matchRest(input, mymatch); - if (m1 != null) { - if (! stack.empty()) { - m1.backtrackStack.push(new BacktrackStack.Backtrack( - this, input, mymatch, stack)); - } - result = m1; - break MAIN_LOOP; - } - if (stingy) { - continue MAIN_LOOP; - } - break MAIN_LOOP; - } - - if (finder == null) { - finder = new DoablesFinder(token, input, mymatch); - si.finder = finder; - } - - if (numRepeats < min) { - while (true) { - REMatch doable = finder.find(); - if (doable == null) { - if (stack.empty()) return null; - stack.pop(); - continue MAIN_LOOP; - } - if (finder.noMore()) stack.pop(); - int newNumRepeats = (doable.empty ? min : numRepeats + 1); - stack.push(new StackedInfo( - input, newNumRepeats, doable, visited, null)); - continue MAIN_LOOP; - } - } - - if (visited == null) visited = initVisited(); - - if (stingy) { - REMatch nextMatch = finder.find(); - if (nextMatch != null && !nextMatch.empty) { - stack.push(new StackedInfo( - input, numRepeats + 1, nextMatch, visited, null)); - } - else { - stack.pop(); - } - REMatch m1 = matchRest(input, mymatch); - if (m1 != null) { - if (!stack.empty()) { - m1.backtrackStack.push(new BacktrackStack.Backtrack( - this, input, mymatch, stack)); - } - result = m1; - break MAIN_LOOP; - } - else { - continue MAIN_LOOP; - } - } - - visited = addVisited(mymatch.index, visited); - - TryAnotherResult taresult = tryAnother(stack, input, mymatch, numRepeats, finder, visited); - visited = taresult.visited; - switch (taresult.status) { - case TryAnotherResult.TRY_FURTHER: - controlStack.push(new FindMatchControl( - finder)); - continue MAIN_LOOP0; - case TryAnotherResult.RESULT_FOUND: - result = taresult.result; - break MAIN_LOOP; - } - - if (!stack.empty()) { - stack.pop(); - } - if (possessive) { - stack.clear(); - } - REMatch m1 = matchRest(input, mymatch); - if (m1 != null) { - if (! stack.empty()) { - m1.backtrackStack.push(new BacktrackStack.Backtrack( - this, input, mymatch, stack)); - } - result = m1; - break MAIN_LOOP; - } - - } // MAIN_LOOP - - if (controlStack.empty()) return result; - FindMatchControl control = controlStack.pop(); - if (possessive) { - return result; - } - if (result != null) { - result.backtrackStack.push(new BacktrackStack.Backtrack( - this, input, mymatch, stack)); - return result; - } - - finder = control.finder; - - TryAnotherResult taresult = tryAnother(stack, input, mymatch, numRepeats, finder, visited); - visited = taresult.visited; - switch (taresult.status) { - case TryAnotherResult.TRY_FURTHER: - controlStack.push(new FindMatchControl( - finder)); - continue MAIN_LOOP0; - case TryAnotherResult.RESULT_FOUND: - return taresult.result; - } - continue MAIN_LOOP0; - - } // MAIN_LOOP0 - } - - private static class TryAnotherResult { - REMatch result; - int status; - static final int RESULT_FOUND = 1; - static final int TRY_FURTHER = 2; - static final int NOTHING_FOUND = 3; - int[] visited; - } - - private TryAnotherResult tryAnother(BacktrackStack stack, - CharIndexed input, REMatch mymatch, int numRepeats, - DoablesFinder finder, int[] visited) { - - TryAnotherResult taresult = new TryAnotherResult(); - taresult.visited = visited; - - DO_THIS: - { - - boolean emptyMatchFound = false; - - DO_ONE_DOABLE: - while (true) { - - REMatch doable = finder.find(); - if (doable == null) { - break DO_THIS; - } - if (doable.empty) emptyMatchFound = true; - - if (!emptyMatchFound) { - int n = doable.index; - if (visitedContains(n, visited)) { - continue DO_ONE_DOABLE; - } - visited = addVisited(n, visited); - stack.push(new StackedInfo( - input, numRepeats + 1, doable, visited, null)); - taresult.visited = visited; - taresult.status = TryAnotherResult.TRY_FURTHER; - return taresult; - } - else { - REMatch m1 = matchRest(input, doable); - if (possessive) { - taresult.result = m1; - taresult.status = TryAnotherResult.RESULT_FOUND; - return taresult; - } - if (m1 != null) { - if (! stack.empty()) { - m1.backtrackStack.push(new BacktrackStack.Backtrack( - this, input, mymatch, stack)); - } - taresult.result = m1; - taresult.status = TryAnotherResult.RESULT_FOUND; - return taresult; - } - } - - } // DO_ONE_DOABLE - - } // DO_THIS - - taresult.status = TryAnotherResult.NOTHING_FOUND; - return taresult; - - } - - boolean match(CharIndexed input, REMatch mymatch) { - setHitEnd(input, mymatch); - REMatch m1 = findMatch(input, mymatch); - if (m1 != null) { - mymatch.assignFrom(m1); - return true; - } - return false; - } - - // Array visited is an array of character positions we have already - // visited. visited[0] is used to store the effective length of the - // array. - private static int[] initVisited() { - int[] visited = new int[32]; - visited[0] = 0; - return visited; - } - - private static boolean visitedContains(int n, int[] visited) { - // Experience tells that for a small array like this, - // simple linear search is faster than binary search. - for (int i = 1; i < visited[0]; i++) { - if (n == visited[i]) return true; - } - return false; - } - - private static int[] addVisited(int n, int[] visited) { - if (visitedContains(n, visited)) return visited; - if (visited[0] >= visited.length - 1) { - int[] newvisited = new int[visited.length + 32]; - System.arraycopy(visited, 0, newvisited, 0, visited.length); - visited = newvisited; - } - visited[0]++; - visited[visited[0]] = n; - return visited; - } - - private REMatch matchRest(CharIndexed input, final REMatch newMatch) { - if (next(input, newMatch)) { - return newMatch; - } - return null; - } - - private REMatch findMatchFixedLength(CharIndexed input, REMatch mymatch) { - if (mymatch.backtrackStack == null) - mymatch.backtrackStack = new BacktrackStack(); - int numRepeats = token.findFixedLengthMatches(input, (REMatch)mymatch.clone(), max); - if (numRepeats == Integer.MAX_VALUE) numRepeats = min; - int count = numRepeats - min + 1; - if (count <= 0) return null; - int index = 0; - if (!stingy) index = mymatch.index + (tokenFixedLength * numRepeats); - else index = mymatch.index + (tokenFixedLength * min); - return findMatchFixedLength(input, mymatch, index, count); - } - - private REMatch backtrackFixedLength(CharIndexed input, REMatch mymatch, - Object param) { - int[] params = (int[])param; - int index = params[0]; - int count = params[1]; - return findMatchFixedLength(input, mymatch, index, count); - } - - private REMatch findMatchFixedLength(CharIndexed input, REMatch mymatch, - int index, int count) { - REMatch tryMatch = (REMatch) mymatch.clone(); - while (true) { - tryMatch.index = index; - REMatch m = matchRest(input, tryMatch); - count--; - if (stingy) index += tokenFixedLength; - else index -= tokenFixedLength; - if (possessive) return m; - if (m != null) { - if (count > 0) { - m.backtrackStack.push(new BacktrackStack.Backtrack( - this, input, mymatch, - new int[] {index, count})); - } - return m; - } - if (count <= 0) return null; - } - } - - void dump(StringBuffer os) { - os.append("(?:"); - token.dumpAll(os); - os.append(')'); - if ((max == Integer.MAX_VALUE) && (min <= 1)) - os.append( (min == 0) ? '*' : '+' ); - else if ((min == 0) && (max == 1)) - os.append('?'); - else { - os.append('{').append(min); - if (max > min) { - os.append(','); - if (max != Integer.MAX_VALUE) os.append(max); - } - os.append('}'); - } - if (stingy) os.append('?'); - } -} +/* gnu/regexp/RETokenRepeated.java + Copyright (C) 2006 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.java.util.regex; + +import gnu.java.lang.CPStringBuilder; + +import java.util.ArrayDeque; +import java.util.Deque; + +final class RETokenRepeated extends REToken +{ + private REToken token; + private int min, max; + private boolean stingy; + private boolean possessive; + private int tokenFixedLength; + + RETokenRepeated (int subIndex, REToken token, int min, int max) + { + super (subIndex); + this.token = token; + this.min = min; + this.max = max; + if (token.returnsFixedLengthMatches ()) + { + tokenFixedLength = token.getMaximumLength (); + } + else + { + tokenFixedLength = -1; + } + } + + /** Sets the minimal matching mode to true. */ + void makeStingy () + { + stingy = true; + } + + /** Queries if this token has minimal matching enabled. */ + boolean isStingy () + { + return stingy; + } + + /** Sets possessive matching mode to true. */ + void makePossessive () + { + possessive = true; + } + + /** Queries if this token has possessive matching enabled. */ + boolean isPossessive () + { + return possessive; + } + + /** + * The minimum length of a repeated token is the minimum length + * of the token multiplied by the minimum number of times it must + * match. + */ + int getMinimumLength () + { + return (min * token.getMinimumLength ()); + } + + int getMaximumLength () + { + if (max == Integer.MAX_VALUE) + return Integer.MAX_VALUE; + int tmax = token.getMaximumLength (); + if (tmax == Integer.MAX_VALUE) + return tmax; + return (max * tmax); + } + + // The comment "MUST make a clone" below means that some tests + // failed without doing clone(), + + private static class DoablesFinder + { + private REToken tk; + private CharIndexed input; + private REMatch rematch; + private boolean findFirst; + + private DoablesFinder (REToken tk, CharIndexed input, REMatch mymatch) + { + this.tk = tk; + this.input = input; + this.rematch = (REMatch) mymatch.clone (); // MUST make a clone + this.rematch.backtrackStack = new BacktrackStack (); + findFirst = true; + } + + private REMatch find () + { + int origin = rematch.index; + REMatch rem; + if (findFirst) + { + rem = tk.findMatch (input, rematch); + findFirst = false; + } + else + { + while (true) + { + if (rematch.backtrackStack.empty ()) + { + rem = null; + break; + } + BacktrackStack.Backtrack bt = rematch.backtrackStack.pop (); + rem = bt.token.backtrack (bt.input, bt.match, bt.param); + if (rem != null) + break; + } + } + if (rem == null) + return null; + if (rem.index == origin) + rem.empty = true; + rematch = rem; + return (REMatch) rem.clone (); // MUST make a clone. + } + + boolean noMore () + { + return rematch.backtrackStack.empty (); + } + } + + REMatch findMatch (CharIndexed input, REMatch mymatch) + { + if (tokenFixedLength >= 0) + return findMatchFixedLength (input, mymatch); + BacktrackStack stack = new BacktrackStack (); + stack.push (new StackedInfo (input, 0, mymatch, null, null)); + return findMatch (stack); + } + + REMatch backtrack (CharIndexed input, REMatch mymatch, Object param) + { + if (tokenFixedLength >= 0) + return backtrackFixedLength (input, mymatch, param); + return findMatch ((BacktrackStack) param); + } + + private static class StackedInfo extends BacktrackStack.Backtrack + { + int numRepeats; + int[] visited; + DoablesFinder finder; + StackedInfo (CharIndexed input, int numRepeats, REMatch match, + int[]visited, DoablesFinder finder) + { + super (null, input, match, null); + this.numRepeats = numRepeats; + this.visited = visited; + this.finder = finder; + } + } + + private static class FindMatchControl + { + DoablesFinder finder; + FindMatchControl (DoablesFinder finder) + { + this.finder = finder; + } + } + + private REMatch findMatch (BacktrackStack stack) + { + return findMatch (stack, new ArrayDeque < FindMatchControl > ()); + } + + private REMatch findMatch (BacktrackStack stack, + Deque < FindMatchControl > controlStack) + { + REMatch result = null; + StackedInfo si = null; + CharIndexed input = null; + int numRepeats = 0; + REMatch mymatch = null; + int[] visited = null; + DoablesFinder finder = null; + + // Avoid using recursive calls because a match can be very long. + + // This is the first entry point of this method. + // If you want to call this method recursively and you need the + // result returned, save necessary information in a FindMatchControl + // object and push it to controlStack, then continue from this point. + // You can check the result after exiting MAIN_LOOP. + MAIN_LOOP0: + while (true) + { + + // This is the second entry point of this method. + // If you want to call this method recursively but you do not need the + // result returned, just continue from this point. + MAIN_LOOP: + while (true) + { + + if (stack.empty ()) + break MAIN_LOOP; + si = (StackedInfo) (stack.peek ()); + input = si.input; + numRepeats = si.numRepeats; + mymatch = si.match; + visited = si.visited; + finder = si.finder; + + if (mymatch.backtrackStack == null) + mymatch.backtrackStack = new BacktrackStack (); + + if (numRepeats >= max) + { + stack.pop (); + REMatch m1 = matchRest (input, mymatch); + if (m1 != null) + { + if (!stack.empty ()) + { + m1.backtrackStack.push (new BacktrackStack. + Backtrack (this, input, + mymatch, stack)); + } + result = m1; + break MAIN_LOOP; + } + if (stingy) + { + continue MAIN_LOOP; + } + break MAIN_LOOP; + } + + if (finder == null) + { + finder = new DoablesFinder (token, input, mymatch); + si.finder = finder; + } + + if (numRepeats < min) + { + while (true) + { + REMatch doable = finder.find (); + if (doable == null) + { + if (stack.empty ()) + return null; + stack.pop (); + continue MAIN_LOOP; + } + if (finder.noMore ()) + stack.pop (); + int newNumRepeats = (doable.empty ? min : numRepeats + 1); + stack. + push (new + StackedInfo (input, newNumRepeats, doable, + visited, null)); + continue MAIN_LOOP; + } + } + + if (visited == null) + visited = initVisited (); + + if (stingy) + { + REMatch nextMatch = finder.find (); + if (nextMatch != null && !nextMatch.empty) + { + stack. + push (new + StackedInfo (input, numRepeats + 1, nextMatch, + visited, null)); + } + else + { + stack.pop (); + } + REMatch m1 = matchRest (input, mymatch); + if (m1 != null) + { + if (!stack.empty ()) + { + m1.backtrackStack.push (new BacktrackStack. + Backtrack (this, input, + mymatch, stack)); + } + result = m1; + break MAIN_LOOP; + } + else + { + continue MAIN_LOOP; + } + } + + visited = addVisited (mymatch.index, visited); + + TryAnotherResult taresult = + tryAnother (stack, input, mymatch, numRepeats, finder, visited); + visited = taresult.visited; + switch (taresult.status) + { + case TryAnotherResult.TRY_FURTHER: + controlStack.push (new FindMatchControl (finder)); + continue MAIN_LOOP0; + case TryAnotherResult.RESULT_FOUND: + result = taresult.result; + break MAIN_LOOP; + } + + if (!stack.empty ()) + { + stack.pop (); + } + if (possessive) + { + stack.clear (); + } + REMatch m1 = matchRest (input, mymatch); + if (m1 != null) + { + if (!stack.empty ()) + { + m1.backtrackStack.push (new BacktrackStack. + Backtrack (this, input, mymatch, + stack)); + } + result = m1; + break MAIN_LOOP; + } + + } // MAIN_LOOP + + if (controlStack.isEmpty ()) + return result; + FindMatchControl control = controlStack.pop (); + if (possessive) + { + return result; + } + if (result != null) + { + result.backtrackStack.push (new BacktrackStack. + Backtrack (this, input, mymatch, + stack)); + return result; + } + + finder = control.finder; + + TryAnotherResult taresult = + tryAnother (stack, input, mymatch, numRepeats, finder, visited); + visited = taresult.visited; + switch (taresult.status) + { + case TryAnotherResult.TRY_FURTHER: + controlStack.push (new FindMatchControl (finder)); + continue MAIN_LOOP0; + case TryAnotherResult.RESULT_FOUND: + return taresult.result; + } + continue MAIN_LOOP0; + + } // MAIN_LOOP0 + } + + private static class TryAnotherResult + { + REMatch result; + int status; + static final int RESULT_FOUND = 1; + static final int TRY_FURTHER = 2; + static final int NOTHING_FOUND = 3; + int[] visited; + } + + private TryAnotherResult tryAnother (BacktrackStack stack, + CharIndexed input, REMatch mymatch, + int numRepeats, DoablesFinder finder, + int[]visited) + { + + TryAnotherResult taresult = new TryAnotherResult (); + taresult.visited = visited; + + DO_THIS: + { + + boolean emptyMatchFound = false; + + DO_ONE_DOABLE: + while (true) + { + + REMatch doable = finder.find (); + if (doable == null) + { + break DO_THIS; + } + if (doable.empty) + emptyMatchFound = true; + + if (!emptyMatchFound) + { + int n = doable.index; + if (visitedContains (n, visited)) + { + continue DO_ONE_DOABLE; + } + visited = addVisited (n, visited); + stack. + push (new + StackedInfo (input, numRepeats + 1, doable, visited, + null)); + taresult.visited = visited; + taresult.status = TryAnotherResult.TRY_FURTHER; + return taresult; + } + else + { + REMatch m1 = matchRest (input, doable); + if (possessive) + { + taresult.result = m1; + taresult.status = TryAnotherResult.RESULT_FOUND; + return taresult; + } + if (m1 != null) + { + if (!stack.empty ()) + { + m1.backtrackStack.push (new BacktrackStack. + Backtrack (this, input, mymatch, + stack)); + } + taresult.result = m1; + taresult.status = TryAnotherResult.RESULT_FOUND; + return taresult; + } + } + + } // DO_ONE_DOABLE + + } // DO_THIS + + taresult.status = TryAnotherResult.NOTHING_FOUND; + return taresult; + + } + + boolean match (CharIndexed input, REMatch mymatch) + { + setHitEnd (input, mymatch); + REMatch m1 = findMatch (input, mymatch); + if (m1 != null) + { + mymatch.assignFrom (m1); + return true; + } + return false; + } + + // Array visited is an array of character positions we have already + // visited. visited[0] is used to store the effective length of the + // array. + private static int[] initVisited () + { + int[] visited = new int[32]; + visited[0] = 0; + return visited; + } + + private static boolean visitedContains (int n, int[]visited) + { + // Experience tells that for a small array like this, + // simple linear search is faster than binary search. + for (int i = 1; i < visited[0]; i++) + { + if (n == visited[i]) + return true; + } + return false; + } + + private static int[] addVisited (int n, int[]visited) + { + if (visitedContains (n, visited)) + return visited; + if (visited[0] >= visited.length - 1) + { + int[] newvisited = new int[visited.length + 32]; + System.arraycopy (visited, 0, newvisited, 0, visited.length); + visited = newvisited; + } + visited[0]++; + visited[visited[0]] = n; + return visited; + } + + private REMatch matchRest (CharIndexed input, final REMatch newMatch) + { + if (next (input, newMatch)) + { + return newMatch; + } + return null; + } + + private REMatch findMatchFixedLength (CharIndexed input, REMatch mymatch) + { + if (mymatch.backtrackStack == null) + mymatch.backtrackStack = new BacktrackStack (); + int numRepeats = + token.findFixedLengthMatches (input, (REMatch) mymatch.clone (), max); + if (numRepeats == Integer.MAX_VALUE) + numRepeats = min; + int count = numRepeats - min + 1; + if (count <= 0) + return null; + int index = 0; + if (!stingy) + index = mymatch.index + (tokenFixedLength * numRepeats); + else + index = mymatch.index + (tokenFixedLength * min); + return findMatchFixedLength (input, mymatch, index, count); + } + + private REMatch backtrackFixedLength (CharIndexed input, REMatch mymatch, + Object param) + { + int[] params = (int[]) param; + int index = params[0]; + int count = params[1]; + return findMatchFixedLength (input, mymatch, index, count); + } + + private REMatch findMatchFixedLength (CharIndexed input, REMatch mymatch, + int index, int count) + { + REMatch tryMatch = (REMatch) mymatch.clone (); + while (true) + { + tryMatch.index = index; + REMatch m = matchRest (input, tryMatch); + count--; + if (stingy) + index += tokenFixedLength; + else + index -= tokenFixedLength; + if (possessive) + return m; + if (m != null) + { + if (count > 0) + { + m.backtrackStack.push (new BacktrackStack. + Backtrack (this, input, mymatch, + new int[] + { + index, count})); + } + return m; + } + if (count <= 0) + return null; + } + } + + void dump (CPStringBuilder os) + { + os.append ("(?:"); + token.dumpAll (os); + os.append (')'); + if ((max == Integer.MAX_VALUE) && (min <= 1)) + os.append ((min == 0) ? '*' : '+'); + else if ((min == 0) && (max == 1)) + os.append ('?'); + else + { + os.append ('{').append (min); + if (max > min) + { + os.append (','); + if (max != Integer.MAX_VALUE) + os.append (max); + } + os.append ('}'); + } + if (stingy) + os.append ('?'); + } +} diff --git a/libjava/classpath/gnu/java/util/regex/RETokenStart.java b/libjava/classpath/gnu/java/util/regex/RETokenStart.java index aa5f0c91401..6a8d247c9d0 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenStart.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenStart.java @@ -37,85 +37,117 @@ exception statement from your version. */ package gnu.java.util.regex; -class RETokenStart extends REToken { - private String newline; // matches after a newline - private boolean check_java_line_terminators; - - RETokenStart(int subIndex, String newline) { - super(subIndex); - this.newline = newline; - this.check_java_line_terminators = false; - } - - RETokenStart(int subIndex, String newline, boolean b) { - super(subIndex); - this.newline = newline; - this.check_java_line_terminators = b; - } - - int getMaximumLength() { - return 0; - } - - REMatch matchThis(CharIndexed input, REMatch mymatch) { - // charAt(index-n) may be unknown on a Reader/InputStream. FIXME - // Match after a newline if in multiline mode - - if (check_java_line_terminators) { - char ch = input.charAt(mymatch.index - 1); - if (ch != CharIndexed.OUT_OF_BOUNDS) { - if (ch == '\n') return mymatch; - if (ch == '\r') { - char ch1 = input.charAt(mymatch.index); - if (ch1 != '\n') return mymatch; - return null; - } - if (ch == '\u0085') return mymatch; // A next-line character - if (ch == '\u2028') return mymatch; // A line-separator character - if (ch == '\u2029') return mymatch; // A paragraph-separator character - } - } - - if (newline != null) { - int len = newline.length(); - if (mymatch.offset >= len) { - boolean found = true; - char z; - int i = 0; // position in REToken.newline - char ch = input.charAt(mymatch.index - len); - do { - z = newline.charAt(i); - if (ch != z) { - found = false; - break; - } - ++i; - ch = input.charAt(mymatch.index - len + i); - } while (i < len); - - if (found) return mymatch; - } - } - - // Don't match at all if REG_NOTBOL is set. - if ((mymatch.eflags & RE.REG_NOTBOL) > 0) return null; - - if ((mymatch.eflags & RE.REG_ANCHORINDEX) > 0) - return (mymatch.anchor == mymatch.offset) ? - mymatch : null; - else - return ((mymatch.index == 0) && (mymatch.offset == 0)) ? - mymatch : null; - } - - boolean returnsFixedLengthmatches() { return true; } - - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { - if (matchThis(input, mymatch) != null) return max; - else return 0; - } - - void dump(StringBuffer os) { - os.append('^'); - } +import gnu.java.lang.CPStringBuilder; + +class RETokenStart extends REToken +{ + private String newline; // matches after a newline + private boolean check_java_line_terminators; + + RETokenStart (int subIndex, String newline) + { + super (subIndex); + this.newline = newline; + this.check_java_line_terminators = false; + } + + RETokenStart (int subIndex, String newline, boolean b) + { + super (subIndex); + this.newline = newline; + this.check_java_line_terminators = b; + } + + @Override + int getMaximumLength () + { + return 0; + } + + @Override + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + // charAt(index-n) may be unknown on a Reader/InputStream. FIXME + // Match after a newline if in multiline mode + + if (check_java_line_terminators) + { + char ch = input.charAt (mymatch.index - 1); + if (ch != CharIndexed.OUT_OF_BOUNDS) + { + if (ch == '\n') + return mymatch; + if (ch == '\r') + { + char ch1 = input.charAt (mymatch.index); + if (ch1 != '\n') + return mymatch; + return null; + } + if (ch == '\u0085') + return mymatch; // A next-line character + if (ch == '\u2028') + return mymatch; // A line-separator character + if (ch == '\u2029') + return mymatch; // A paragraph-separator character + } + } + + if (newline != null) + { + int len = newline.length (); + if (mymatch.offset >= len) + { + boolean found = true; + char z; + int i = 0; // position in REToken.newline + char ch = input.charAt (mymatch.index - len); + do + { + z = newline.charAt (i); + if (ch != z) + { + found = false; + break; + } + ++i; + ch = input.charAt (mymatch.index - len + i); + } + while (i < len); + + if (found) + return mymatch; + } + } + + // Don't match at all if REG_NOTBOL is set. + if ((mymatch.eflags & RE.REG_NOTBOL) > 0) + return null; + + if ((mymatch.eflags & RE.REG_ANCHORINDEX) > 0) + return (mymatch.anchor == mymatch.offset) ? mymatch : null; + else + return ((mymatch.index == 0) && (mymatch.offset == 0)) ? mymatch : null; + } + + @Override + boolean returnsFixedLengthMatches () + { + return true; + } + + @Override + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + if (matchThis (input, mymatch) != null) + return max; + else + return 0; + } + + @Override + void dump (CPStringBuilder os) + { + os.append ('^'); + } } diff --git a/libjava/classpath/gnu/java/util/regex/RETokenWordBoundary.java b/libjava/classpath/gnu/java/util/regex/RETokenWordBoundary.java index 538c6bef40c..9f758b63588 100644 --- a/libjava/classpath/gnu/java/util/regex/RETokenWordBoundary.java +++ b/libjava/classpath/gnu/java/util/regex/RETokenWordBoundary.java @@ -38,79 +38,104 @@ exception statement from your version. */ package gnu.java.util.regex; +import gnu.java.lang.CPStringBuilder; + /** * Represents a combination lookahead/lookbehind for POSIX [:alnum:]. */ -final class RETokenWordBoundary extends REToken { - private boolean negated; - private int where; - static final int BEGIN = 1; - static final int END = 2; - - RETokenWordBoundary(int subIndex, int where, boolean negated) { - super(subIndex); - this.where = where; - this.negated = negated; - } - - int getMaximumLength() { - return 0; - } - - - REMatch matchThis(CharIndexed input, REMatch mymatch) { - // Word boundary means input[index-1] was a word character - // and input[index] is not, or input[index] is a word character - // and input[index-1] was not - // In the string "one two three", these positions match: - // |o|n|e| |t|w|o| |t|h|r|e|e| - // ^ ^ ^ ^ ^ ^ - boolean after = false; // is current character a letter or digit? - boolean before = false; // is previous character a letter or digit? - char ch; - - // TODO: Also check REG_ANCHORINDEX vs. anchor - if (((mymatch.eflags & RE.REG_ANCHORINDEX) != RE.REG_ANCHORINDEX) - || (mymatch.offset + mymatch.index > mymatch.anchor)) { - if ((ch = input.charAt(mymatch.index - 1)) != CharIndexed.OUT_OF_BOUNDS) { - before = Character.isLetterOrDigit(ch) || (ch == '_'); - } - } - - if ((ch = input.charAt(mymatch.index)) != CharIndexed.OUT_OF_BOUNDS) { - after = Character.isLetterOrDigit(ch) || (ch == '_'); - } - - // if (before) and (!after), we're at end (\>) - // if (after) and (!before), we're at beginning (\<) - boolean doNext = false; - - if ((where & BEGIN) == BEGIN) { - doNext = after && !before; - } - if ((where & END) == END) { - doNext ^= before && !after; - } - - if (negated) doNext = !doNext; - - return (doNext ? mymatch : null); - } - - boolean returnsFixedLengthMatches() { return true; } - - int findFixedLengthMatches(CharIndexed input, REMatch mymatch, int max) { - if(matchThis(input, mymatch) != null) return max; - else return 0; - } - - void dump(StringBuffer os) { - if (where == (BEGIN | END)) { - os.append( negated ? "\\B" : "\\b" ); - } else if (where == BEGIN) { - os.append("\\<"); - } else { - os.append("\\>"); - } - } +final class RETokenWordBoundary extends REToken +{ + private boolean negated; + private int where; + static final int BEGIN = 1; + static final int END = 2; + + RETokenWordBoundary (int subIndex, int where, boolean negated) + { + super (subIndex); + this.where = where; + this.negated = negated; + } + + int getMaximumLength () + { + return 0; + } + + + REMatch matchThis (CharIndexed input, REMatch mymatch) + { + // Word boundary means input[index-1] was a word character + // and input[index] is not, or input[index] is a word character + // and input[index-1] was not + // In the string "one two three", these positions match: + // |o|n|e| |t|w|o| |t|h|r|e|e| + // ^ ^ ^ ^ ^ ^ + boolean after = false; // is current character a letter or digit? + boolean before = false; // is previous character a letter or digit? + char ch; + + // TODO: Also check REG_ANCHORINDEX vs. anchor + if (((mymatch.eflags & RE.REG_ANCHORINDEX) != RE.REG_ANCHORINDEX) + || (mymatch.offset + mymatch.index > mymatch.anchor)) + { + if ((ch = + input.charAt (mymatch.index - 1)) != CharIndexed.OUT_OF_BOUNDS) + { + before = Character.isLetterOrDigit (ch) || (ch == '_'); + } + } + + if ((ch = input.charAt (mymatch.index)) != CharIndexed.OUT_OF_BOUNDS) + { + after = Character.isLetterOrDigit (ch) || (ch == '_'); + } + + // if (before) and (!after), we're at end (\>) + // if (after) and (!before), we're at beginning (\<) + boolean doNext = false; + + if ((where & BEGIN) == BEGIN) + { + doNext = after && !before; + } + if ((where & END) == END) + { + doNext ^= before && !after; + } + + if (negated) + doNext = !doNext; + + return (doNext ? mymatch : null); + } + + boolean returnsFixedLengthMatches () + { + return true; + } + + int findFixedLengthMatches (CharIndexed input, REMatch mymatch, int max) + { + if (matchThis (input, mymatch) != null) + return max; + else + return 0; + } + + void dump (CPStringBuilder os) + { + if (where == (BEGIN | END)) + { + os.append (negated ? "\\B" : "\\b"); + } + else if (where == BEGIN) + { + os.append ("\\<"); + } + else + { + os.append ("\\>"); + } + } } diff --git a/libjava/classpath/gnu/java/util/regex/UncheckedRE.java b/libjava/classpath/gnu/java/util/regex/UncheckedRE.java index 73a67c65736..5f8c7490232 100644 --- a/libjava/classpath/gnu/java/util/regex/UncheckedRE.java +++ b/libjava/classpath/gnu/java/util/regex/UncheckedRE.java @@ -55,7 +55,8 @@ package gnu.java.util.regex; * @since gnu.regexp 1.1.4 */ -public final class UncheckedRE extends RE { +public final class UncheckedRE extends RE +{ /** * Constructs a regular expression pattern buffer without any compilation * flags set, and using the default syntax (RESyntax.RE_SYNTAX_PERL5). @@ -66,8 +67,9 @@ public final class UncheckedRE extends RE { * @exception RuntimeException The input pattern could not be parsed. * @exception NullPointerException The pattern was null. */ - public UncheckedRE(Object pattern) { - this(pattern,0,RESyntax.RE_SYNTAX_PERL5); + public UncheckedRE (Object pattern) + { + this (pattern, 0, RESyntax.RE_SYNTAX_PERL5); } /** @@ -81,8 +83,9 @@ public final class UncheckedRE extends RE { * @exception RuntimeException The input pattern could not be parsed. * @exception NullPointerException The pattern was null. */ - public UncheckedRE(Object pattern, int cflags) { - this(pattern,cflags,RESyntax.RE_SYNTAX_PERL5); + public UncheckedRE (Object pattern, int cflags) + { + this (pattern, cflags, RESyntax.RE_SYNTAX_PERL5); } /** @@ -97,13 +100,15 @@ public final class UncheckedRE extends RE { * @exception RuntimeException The input pattern could not be parsed. * @exception NullPointerException The pattern was null. */ - public UncheckedRE(Object pattern, int cflags, RESyntax syntax) { - try { - initialize(pattern,cflags,syntax,0,0); - } catch (REException e) { - throw new RuntimeException(e.getMessage()); - } + public UncheckedRE (Object pattern, int cflags, RESyntax syntax) + { + try + { + initialize (pattern, cflags, syntax, 0, 0); + } + catch (REException e) + { + throw new RuntimeException (e.getMessage ()); + } } } - - diff --git a/libjava/classpath/gnu/javax/activation/viewers/ImageViewer.java b/libjava/classpath/gnu/javax/activation/viewers/ImageViewer.java new file mode 100644 index 00000000000..829f40cbf84 --- /dev/null +++ b/libjava/classpath/gnu/javax/activation/viewers/ImageViewer.java @@ -0,0 +1,138 @@ +/* ImageViewer.java -- Simple image display component. + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.javax.activation.viewers; + +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Image; +import java.awt.Graphics; +import java.awt.MediaTracker; +import java.awt.Toolkit; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.IOException; + +import javax.activation.CommandObject; +import javax.activation.DataHandler; + +/** + * Simple image display component. + * + * @author Chris Burdess + * @version 1.0.2 + */ +public class ImageViewer extends Component + implements CommandObject +{ + + private Image image; + + /** + * Returns the preferred size for this component (the image size). + */ + public Dimension getPreferredSize() + { + Dimension ps = new Dimension(0, 0); + if (image != null) + { + ps.width = image.getWidth(this); + ps.height = image.getHeight(this); + } + return ps; + } + + public void setCommandContext(String verb, DataHandler dh) + throws IOException + { + // Read image into a byte array + InputStream in = dh.getInputStream(); + ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + byte[] buf = new byte[4096]; + for (int len = in.read(buf); len != -1; len = in.read(buf)) + bytes.write(buf, 0, len); + in.close(); + // Create and prepare the image + Toolkit toolkit = getToolkit(); + Image img = toolkit.createImage(bytes.toByteArray()); + try + { + MediaTracker tracker = new MediaTracker(this); + tracker.addImage(img, 0); + tracker.waitForID(0); + } + catch (InterruptedException e) + { + } + toolkit.prepareImage(img, -1, -1, this); + } + + /** + * Image bits arrive. + */ + public boolean imageUpdate(Image image, int flags, int x, int y, + int width, int height) + { + if ((flags & ALLBITS) != 0) + { + this.image = image; + invalidate(); + repaint(); + return false; + } + return ((flags & ERROR) == 0); + } + + /** + * Scale the image into this component's bounds. + */ + public void paint(Graphics g) + { + if (image != null) + { + Dimension is = new Dimension(image.getWidth(this), + image.getHeight(this)); + if (is.width > -1 && is.height > -1) + { + Dimension cs = getSize(); + g.drawImage(image, 0, 0, cs.width, cs.height, + 0, 0, is.width, is.height, this); + } + } + } + +} diff --git a/libjava/classpath/gnu/javax/activation/viewers/TextEditor.java b/libjava/classpath/gnu/javax/activation/viewers/TextEditor.java new file mode 100644 index 00000000000..1995ae12282 --- /dev/null +++ b/libjava/classpath/gnu/javax/activation/viewers/TextEditor.java @@ -0,0 +1,119 @@ +/* TextEditor.java -- Simple text editor component. + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.javax.activation.viewers; + +import java.awt.Dimension; +import java.awt.TextArea; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.IOException; +import java.io.OutputStream; +import javax.activation.CommandObject; +import javax.activation.DataHandler; + +/** + * Simple text editor component. + * + * @author Chris Burdess + * @version 1.0.2 + */ +public class TextEditor extends TextArea + implements CommandObject, ActionListener +{ + + private transient DataHandler dh; + + public TextEditor() + { + super("", 24, 80, 1); + } + + public Dimension getPreferredSize() + { + return getMinimumSize(24, 80); + } + + public void setCommandContext(String verb, DataHandler dh) + throws IOException + { + this.dh = dh; + InputStream in = dh.getInputStream(); + ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + byte[] buf = new byte[4096]; + for (int len = in.read(buf); len != -1; len = in.read(buf)) + bytes.write(buf, 0, len); + in.close(); + setText(bytes.toString()); + } + + public void actionPerformed(ActionEvent event) + { + if ("save".equals(event.getActionCommand()) && dh != null) + { + OutputStream out = null; + try + { + out = dh.getOutputStream(); + if (out != null) + out.write(getText().getBytes()); + } + catch (IOException e) + { + e.printStackTrace(System.err); + } + finally + { + if (out != null) + { + try + { + + out.close(); + } + catch (IOException e) + { + e.printStackTrace(System.err); + } + } + } + } + } + +} diff --git a/libjava/classpath/gnu/javax/activation/viewers/TextViewer.java b/libjava/classpath/gnu/javax/activation/viewers/TextViewer.java new file mode 100644 index 00000000000..2b4aa90c58f --- /dev/null +++ b/libjava/classpath/gnu/javax/activation/viewers/TextViewer.java @@ -0,0 +1,81 @@ +/* TextViewer.java -- Simple text viewer component. + Copyright (C) 2004 Free Software Foundation, Inc. + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.javax.activation.viewers; + +import java.awt.Dimension; +import java.awt.TextArea; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.IOException; +import javax.activation.CommandObject; +import javax.activation.DataHandler; + +/** + * Simple text display component. + * + * @author Chris Burdess + * @version 1.0.2 + */ +public class TextViewer extends TextArea + implements CommandObject +{ + + public TextViewer() + { + super("", 24, 80, 1); + setEditable(false); + } + + public Dimension getPreferredSize() + { + return getMinimumSize(24, 80); + } + + public void setCommandContext(String verb, DataHandler dh) + throws IOException + { + InputStream in = dh.getInputStream(); + ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + byte[] buf = new byte[4096]; + for (int len = in.read(buf); len != -1; len = in.read(buf)) + bytes.write(buf, 0, len); + in.close(); + setText(bytes.toString()); + } + +} diff --git a/libjava/classpath/gnu/javax/crypto/assembly/TransformerException.java b/libjava/classpath/gnu/javax/crypto/assembly/TransformerException.java index 2c972f858d3..4e93322efb9 100644 --- a/libjava/classpath/gnu/javax/crypto/assembly/TransformerException.java +++ b/libjava/classpath/gnu/javax/crypto/assembly/TransformerException.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.assembly; +import gnu.java.lang.CPStringBuilder; + import java.io.PrintStream; import java.io.PrintWriter; @@ -129,7 +131,7 @@ public class TransformerException */ public String toString() { - StringBuffer sb = new StringBuffer(this.getClass().getName()) + CPStringBuilder sb = new CPStringBuilder(this.getClass().getName()) .append(": ").append(super.toString()); if (_exception != null) sb.append("; caused by: ").append(_exception.toString()); diff --git a/libjava/classpath/gnu/javax/crypto/cipher/BaseCipher.java b/libjava/classpath/gnu/javax/crypto/cipher/BaseCipher.java index a5bbe698769..bae142a638d 100644 --- a/libjava/classpath/gnu/javax/crypto/cipher/BaseCipher.java +++ b/libjava/classpath/gnu/javax/crypto/cipher/BaseCipher.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.cipher; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import java.security.InvalidKeyException; @@ -88,7 +90,7 @@ public abstract class BaseCipher public String name() { - StringBuffer sb = new StringBuffer(name).append('-'); + CPStringBuilder sb = new CPStringBuilder(name).append('-'); if (currentKey == null) sb.append(String.valueOf(8 * defaultBlockSize)); else diff --git a/libjava/classpath/gnu/javax/crypto/jce/sig/DHParameters.java b/libjava/classpath/gnu/javax/crypto/jce/sig/DHParameters.java index 0357c163d41..a917e223088 100644 --- a/libjava/classpath/gnu/javax/crypto/jce/sig/DHParameters.java +++ b/libjava/classpath/gnu/javax/crypto/jce/sig/DHParameters.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.jce.sig; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.der.DER; import gnu.java.security.der.DERReader; @@ -195,7 +197,7 @@ public class DHParameters protected String engineToString() { - StringBuffer sb = new StringBuffer("p="); + CPStringBuilder sb = new CPStringBuilder("p="); if (p == null) sb.append("???"); else diff --git a/libjava/classpath/gnu/javax/crypto/key/KeyAgreementException.java b/libjava/classpath/gnu/javax/crypto/key/KeyAgreementException.java index f0fb1bb83f9..405f011adde 100644 --- a/libjava/classpath/gnu/javax/crypto/key/KeyAgreementException.java +++ b/libjava/classpath/gnu/javax/crypto/key/KeyAgreementException.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.key; +import gnu.java.lang.CPStringBuilder; + import java.io.PrintStream; import java.io.PrintWriter; import java.io.Serializable; @@ -157,7 +159,7 @@ public class KeyAgreementException */ public String toString() { - StringBuffer sb = new StringBuffer(this.getClass().getName()).append(": ") + CPStringBuilder sb = new CPStringBuilder(this.getClass().getName()).append(": ") .append(super.toString()); if (cause != null) sb.append("; caused by: ").append(cause.toString()); diff --git a/libjava/classpath/gnu/javax/crypto/mode/BaseMode.java b/libjava/classpath/gnu/javax/crypto/mode/BaseMode.java index 6d9418ccafa..02e43229044 100644 --- a/libjava/classpath/gnu/javax/crypto/mode/BaseMode.java +++ b/libjava/classpath/gnu/javax/crypto/mode/BaseMode.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.mode; +import gnu.java.lang.CPStringBuilder; + import gnu.javax.crypto.cipher.IBlockCipher; import java.security.InvalidKeyException; @@ -110,7 +112,7 @@ public abstract class BaseMode public String name() { - return new StringBuffer(name).append('(').append(cipher.name()).append(')') + return new CPStringBuilder(name).append('(').append(cipher.name()).append(')') .toString(); } diff --git a/libjava/classpath/gnu/javax/crypto/pad/BasePad.java b/libjava/classpath/gnu/javax/crypto/pad/BasePad.java index 8b475d2d8cb..adc2c9bbc02 100644 --- a/libjava/classpath/gnu/javax/crypto/pad/BasePad.java +++ b/libjava/classpath/gnu/javax/crypto/pad/BasePad.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.pad; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import java.util.Map; @@ -67,7 +69,7 @@ public abstract class BasePad public String name() { - final StringBuffer sb = new StringBuffer(name); + final CPStringBuilder sb = new CPStringBuilder(name); if (blockSize != -1) sb.append('-').append(String.valueOf(8 * blockSize)); return sb.toString(); diff --git a/libjava/classpath/gnu/javax/crypto/sasl/crammd5/CramMD5Util.java b/libjava/classpath/gnu/javax/crypto/sasl/crammd5/CramMD5Util.java index 2145512215a..a6a06b6b849 100644 --- a/libjava/classpath/gnu/javax/crypto/sasl/crammd5/CramMD5Util.java +++ b/libjava/classpath/gnu/javax/crypto/sasl/crammd5/CramMD5Util.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.sasl.crammd5; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.util.Util; import gnu.javax.crypto.mac.HMacFactory; @@ -83,7 +85,7 @@ class CramMD5Util final byte[] result; try { - result = new StringBuffer("<") + result = new CPStringBuilder("<") .append(encoded.substring(0,encoded.length())) .append(".").append(String.valueOf(System.currentTimeMillis())) .append("@").append(hostname).append(">") diff --git a/libjava/classpath/gnu/javax/crypto/sasl/crammd5/PasswordFile.java b/libjava/classpath/gnu/javax/crypto/sasl/crammd5/PasswordFile.java index df952111660..4900842a737 100644 --- a/libjava/classpath/gnu/javax/crypto/sasl/crammd5/PasswordFile.java +++ b/libjava/classpath/gnu/javax/crypto/sasl/crammd5/PasswordFile.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.sasl.crammd5; +import gnu.java.lang.CPStringBuilder; + import gnu.javax.crypto.sasl.NoSuchUserException; import gnu.javax.crypto.sasl.UserAlreadyExistsException; @@ -201,13 +203,13 @@ public class PasswordFile pw = new PrintWriter(fos); String key; String[] fields; - StringBuffer sb; + CPStringBuilder sb; int i; for (Iterator it = entries.keySet().iterator(); it.hasNext();) { key = (String) it.next(); fields = (String[]) entries.get(key); - sb = new StringBuffer(fields[0]); + sb = new CPStringBuilder(fields[0]); for (i = 1; i < fields.length; i++) sb.append(":").append(fields[i]); pw.println(sb.toString()); diff --git a/libjava/classpath/gnu/javax/crypto/sasl/plain/PasswordFile.java b/libjava/classpath/gnu/javax/crypto/sasl/plain/PasswordFile.java index b6fb3f87ead..4888214d821 100644 --- a/libjava/classpath/gnu/javax/crypto/sasl/plain/PasswordFile.java +++ b/libjava/classpath/gnu/javax/crypto/sasl/plain/PasswordFile.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.sasl.plain; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.action.GetPropertyAction; import gnu.javax.crypto.sasl.NoSuchUserException; import gnu.javax.crypto.sasl.UserAlreadyExistsException; @@ -205,13 +207,13 @@ public class PasswordFile pw = new PrintWriter(fos); String key; String[] fields; - StringBuffer sb; + CPStringBuilder sb; Enumeration keys = entries.keys(); while (keys.hasMoreElements()) { key = (String) keys.nextElement(); fields = (String[]) entries.get(key); - sb = new StringBuffer(fields[0]); + sb = new CPStringBuilder(fields[0]); for (int i = 1; i < fields.length; i++) sb.append(":" + fields[i]); pw.println(sb.toString()); diff --git a/libjava/classpath/gnu/javax/crypto/sasl/plain/PlainClient.java b/libjava/classpath/gnu/javax/crypto/sasl/plain/PlainClient.java index 5c60578db67..87fffa01ee1 100644 --- a/libjava/classpath/gnu/javax/crypto/sasl/plain/PlainClient.java +++ b/libjava/classpath/gnu/javax/crypto/sasl/plain/PlainClient.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.sasl.plain; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.javax.crypto.sasl.ClientMechanism; @@ -128,7 +130,7 @@ public class PlainClient } if (password == null) throw new SaslException("null password supplied"); - final StringBuffer sb = new StringBuffer(); + final CPStringBuilder sb = new CPStringBuilder(); if (authorizationID != null) sb.append(authorizationID); sb.append('\0'); diff --git a/libjava/classpath/gnu/javax/crypto/sasl/srp/PasswordFile.java b/libjava/classpath/gnu/javax/crypto/sasl/srp/PasswordFile.java index 36888df8724..7946e84fbcc 100644 --- a/libjava/classpath/gnu/javax/crypto/sasl/srp/PasswordFile.java +++ b/libjava/classpath/gnu/javax/crypto/sasl/srp/PasswordFile.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.sasl.srp; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Registry; import gnu.java.security.util.Util; import gnu.javax.crypto.key.srp6.SRPAlgorithm; @@ -445,12 +447,12 @@ public class PasswordFile { String ndx; String[] mpi; - StringBuffer sb; + CPStringBuilder sb; for (Iterator it = configurations.keySet().iterator(); it.hasNext();) { ndx = (String) it.next(); mpi = (String[]) configurations.get(ndx); - sb = new StringBuffer(ndx) + sb = new CPStringBuilder(ndx) .append(":").append(mpi[0]) .append(":").append(mpi[1]); pw.println(sb.toString()); @@ -591,7 +593,7 @@ public class PasswordFile { String user, digestID; HashMap fields, verifiers; - StringBuffer sb1, sb2; + CPStringBuilder sb1, sb2; Iterator j; final Iterator i = entries.keySet().iterator(); while (i.hasNext()) @@ -601,7 +603,7 @@ public class PasswordFile if (! user.equals(fields.get(USER_FIELD))) throw new IOException("Inconsistent SRP password data"); verifiers = (HashMap) fields.get(VERIFIERS_FIELD); - sb1 = new StringBuffer(user) + sb1 = new CPStringBuilder(user) .append(":").append((String) verifiers.get("0")) .append(":").append((String) fields.get(SALT_FIELD)) .append(":").append((String) fields.get(CONFIG_FIELD)); @@ -614,7 +616,7 @@ public class PasswordFile if (! "0".equals(digestID)) { // #0 is the default digest, already present in tpasswd! - sb2 = new StringBuffer(digestID) + sb2 = new CPStringBuilder(digestID) .append(":").append(user) .append(":").append((String) verifiers.get(digestID)); pw2.println(sb2.toString()); diff --git a/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPClient.java b/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPClient.java index f4ef4cc34c1..3406c14cec4 100644 --- a/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPClient.java +++ b/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPClient.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.sasl.srp; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import gnu.java.security.Registry; import gnu.java.security.hash.MD5; @@ -863,7 +865,7 @@ public class SRPClient // For now we just select the defaults. Later we need to add support for // properties (perhaps in a file) where a user can specify the list of // algorithms they would prefer to use. - final StringBuffer sb = new StringBuffer(); + final CPStringBuilder sb = new CPStringBuilder(); sb.append(SRPRegistry.OPTION_SRP_DIGEST) .append("=").append(mdName).append(","); if (replayDetection) diff --git a/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java b/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java index ff7e4e9d689..3f000deefbf 100644 --- a/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java +++ b/libjava/classpath/gnu/javax/crypto/sasl/srp/SRPServer.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.sasl.srp; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import gnu.java.security.Registry; import gnu.java.security.util.PRNG; @@ -612,7 +614,7 @@ public class SRPServer s = (String) properties.get(SRPRegistry.SRP_REPLAY_DETECTION); final boolean replayDetection = (s == null ? SRPRegistry.DEFAULT_REPLAY_DETECTION : Boolean.valueOf(s).booleanValue()); - final StringBuffer sb = new StringBuffer(); + final CPStringBuilder sb = new CPStringBuilder(); sb.append(SRPRegistry.OPTION_SRP_DIGEST).append("=") .append(srp.getAlgorithm()).append(","); diff --git a/libjava/classpath/gnu/javax/crypto/sasl/srp/ServerStore.java b/libjava/classpath/gnu/javax/crypto/sasl/srp/ServerStore.java index e9b1a728273..9fa83295a0f 100644 --- a/libjava/classpath/gnu/javax/crypto/sasl/srp/ServerStore.java +++ b/libjava/classpath/gnu/javax/crypto/sasl/srp/ServerStore.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.crypto.sasl.srp; +import gnu.java.lang.CPStringBuilder; + import java.util.HashMap; /** @@ -84,7 +86,7 @@ public class ServerStore static synchronized final byte[] getNewSessionID() { final String sid = String.valueOf(++counter); - return new StringBuffer("SID-") + return new CPStringBuilder("SID-") .append("0000000000".substring(0, 10 - sid.length())).append(sid) .toString().getBytes(); } diff --git a/libjava/classpath/gnu/javax/imageio/bmp/BMPImageWriter.java b/libjava/classpath/gnu/javax/imageio/bmp/BMPImageWriter.java index 08b5041c967..be42ffae1ee 100644 --- a/libjava/classpath/gnu/javax/imageio/bmp/BMPImageWriter.java +++ b/libjava/classpath/gnu/javax/imageio/bmp/BMPImageWriter.java @@ -178,7 +178,6 @@ public class BMPImageWriter encoder.encode(out, streamMetadata, image, param); else throw new BMPException("Encoder has not been initialized."); - out.close(); } /** diff --git a/libjava/classpath/gnu/javax/imageio/bmp/BMPImageWriterSpi.java b/libjava/classpath/gnu/javax/imageio/bmp/BMPImageWriterSpi.java index b2a4273c93a..32f9f59d1ac 100644 --- a/libjava/classpath/gnu/javax/imageio/bmp/BMPImageWriterSpi.java +++ b/libjava/classpath/gnu/javax/imageio/bmp/BMPImageWriterSpi.java @@ -51,7 +51,7 @@ public class BMPImageWriterSpi static final String vendorName = "GNU"; static final String version = "0.1"; static final String writerClassName = "gnu.javax.imageio.bmp.BMPImageWriter"; - static final String[] names = { "Microsoft Windows BMP" }; + static final String[] names = { "bmp", "BMP", "Microsoft Windows BMP" }; static final String[] suffixes = { ".bmp", ".bm" }; static final String[] MIMETypes = { "image/bmp", "image/x-windows-bmp" }; static final String[] readerSpiNames = { "gnu.javax.imageio.bmp.BMPImageReaderSpi" }; diff --git a/libjava/classpath/gnu/javax/management/Server.java b/libjava/classpath/gnu/javax/management/Server.java index 8e8d826c00f..e35c3b11745 100644 --- a/libjava/classpath/gnu/javax/management/Server.java +++ b/libjava/classpath/gnu/javax/management/Server.java @@ -48,12 +48,13 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Set; + import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.ConcurrentHashMap; import javax.management.Attribute; import javax.management.AttributeList; @@ -113,19 +114,20 @@ public class Server /** * The registered beans, represented as a map of * {@link javax.management.ObjectName}s to - * {@link java.lang.Object}s. + * {@link gnu.javax.management.Server.ServerInfo}s. */ - private final Map beans = new HashMap(); + private final ConcurrentHashMap beans = + new ConcurrentHashMap(); /** * The default domain. */ - private String defaultDomain; + private final String defaultDomain; /** * The outer server. */ - private MBeanServer outer; + private final MBeanServer outer; /** * The class loader repository. @@ -134,9 +136,15 @@ public class Server /** * The map of listener delegates to the true - * listener. + * listener. We wrap this in an inner class + * to delay initialisation until a listener + * is actually added. */ - private Map listeners; + private static class LazyListenersHolder + { + private static final Map listeners = + new ConcurrentHashMap(); + } /** * An MBean that emits notifications when an MBean is registered and @@ -145,7 +153,10 @@ public class Server */ private final MBeanServerDelegate delegate; - static private final AtomicLong sequenceNumber = new AtomicLong(1); + /** + * Provides sequencing for notifications about registrations. + */ + private static final AtomicLong sequenceNumber = new AtomicLong(1); /** * Initialise the delegate name. @@ -274,7 +285,7 @@ public class Server private Object getBean(ObjectName name) throws InstanceNotFoundException { - ServerInfo bean = (ServerInfo) beans.get(name); + ServerInfo bean = beans.get(name); if (bean == null) throw new InstanceNotFoundException("The bean, " + name + ", was not found."); @@ -319,12 +330,10 @@ public class Server if (bean instanceof NotificationBroadcaster) { NotificationBroadcaster bbean = (NotificationBroadcaster) bean; - if (listeners == null) - listeners = new HashMap(); NotificationListener indirection = new ServerNotificationListener(bean, name, listener); bbean.addNotificationListener(indirection, filter, passback); - listeners.put(listener, indirection); + LazyListenersHolder.listeners.put(listener, indirection); } } @@ -671,7 +680,7 @@ public class Server { try { - Class c = getClassLoaderRepository().loadClass(name); + Class c = getClassLoaderRepository().loadClass(name); return new ServerInputStream(new ByteArrayInputStream(data), c.getClassLoader()); } @@ -717,7 +726,7 @@ public class Server { try { - Class c = getClassLoader(loader).loadClass(name); + Class c = getClassLoader(loader).loadClass(name); return new ServerInputStream(new ByteArrayInputStream(data), c.getClassLoader()); } @@ -951,7 +960,6 @@ public class Server return defaultDomain; } - /** * Returns an array containing all the domains used by beans registered * with this server. The ordering of the array is undefined. @@ -975,11 +983,11 @@ public class Server public String[] getDomains() { checkSecurity(null, null, "getDomains"); - Set domains = new HashSet(); - Iterator iterator = beans.keySet().iterator(); + Set domains = new HashSet(); + Iterator iterator = beans.keySet().iterator(); while (iterator.hasNext()) { - String d = ((ObjectName) iterator.next()).getDomain(); + String d = iterator.next().getDomain(); try { checkSecurity(new ObjectName(d + ":x=x"), null, "getDomains"); @@ -990,7 +998,7 @@ public class Server /* Ignored */ } } - return (String[]) domains.toArray(new String[domains.size()]); + return domains.toArray(new String[domains.size()]); } /** @@ -1077,7 +1085,7 @@ public class Server public ObjectInstance getObjectInstance(ObjectName name) throws InstanceNotFoundException { - ServerInfo bean = (ServerInfo) beans.get(name); + ServerInfo bean = beans.get(name); if (bean == null) throw new InstanceNotFoundException("The bean, " + name + ", was not found."); @@ -1158,7 +1166,7 @@ public class Server new IllegalArgumentException("The name was null."); throw new RuntimeOperationsException(e); } - Class[] sigTypes = new Class[sig.length]; + Class[] sigTypes = new Class[sig.length]; for (int a = 0; a < sigTypes.length; ++a) { try @@ -1174,7 +1182,7 @@ public class Server } try { - Constructor cons = + Constructor cons = repository.loadClass(name).getConstructor(sigTypes); return cons.newInstance(params); } @@ -1288,7 +1296,7 @@ public class Server throw new RuntimeOperationsException(e); } ClassLoader loader = getClassLoader(loaderName); - Class[] sigTypes = new Class[sig.length]; + Class[] sigTypes = new Class[sig.length]; for (int a = 0; a < sig.length; ++a) { try @@ -1304,7 +1312,7 @@ public class Server } try { - Constructor cons = + Constructor cons = Class.forName(name, true, loader).getConstructor(sigTypes); return cons.newInstance(params); } @@ -1433,10 +1441,10 @@ public class Server } if (info.getClassName().equals(className)) return true; - Class bclass = bean.getClass(); + Class bclass = bean.getClass(); try { - Class oclass = Class.forName(className); + Class oclass = Class.forName(className); return (bclass.getClassLoader().equals(oclass.getClassLoader()) && oclass.isAssignableFrom(bclass)); } @@ -1502,21 +1510,19 @@ public class Server * arise from the execution of the query, in which * case that particular bean will again be excluded. */ - public Set queryMBeans(ObjectName name, QueryExp query) + public Set queryMBeans(ObjectName name, QueryExp query) { checkSecurity(name, null, "queryMBeans"); - Set results = new HashSet(); - Iterator iterator = beans.entrySet().iterator(); - while (iterator.hasNext()) + Set results = new HashSet(); + for (Map.Entry entry : beans.entrySet()) { - Map.Entry entry = (Map.Entry) iterator.next(); - ObjectName nextName = (ObjectName) entry.getKey(); + ObjectName nextName = entry.getKey(); checkSecurity(name, nextName.toString(), "queryMBeans"); try { if ((name == null || name.apply(nextName)) && (query == null || query.apply(nextName))) - results.add(((ServerInfo) entry.getValue()).getInstance()); + results.add(entry.getValue().getInstance()); } catch (BadStringOperationException e) { @@ -1575,15 +1581,12 @@ public class Server * Note that these permissions are implied if the * queryMBeans permissions are available. */ - public Set queryNames(ObjectName name, QueryExp query) + public Set queryNames(ObjectName name, QueryExp query) { checkSecurity(name, null, "queryNames"); - Set results = new HashSet(); - Iterator iterator = beans.entrySet().iterator(); - while (iterator.hasNext()) + Set results = new HashSet(); + for (ObjectName nextName : beans.keySet()) { - Map.Entry entry = (Map.Entry) iterator.next(); - ObjectName nextName = (ObjectName) entry.getKey(); checkSecurity(name, nextName.toString(), "queryNames"); try { @@ -1656,7 +1659,7 @@ public class Server NotCompliantMBeanException { SecurityManager sm = System.getSecurityManager(); - Class cl = obj.getClass(); + Class cl = obj.getClass(); String className = cl.getName(); if (sm != null) { @@ -1712,14 +1715,13 @@ public class Server throw new MBeanRegistrationException(e, "Pre-registration failed."); } } - if (beans.containsKey(name)) + ObjectInstance obji = new ObjectInstance(name, className); + if (beans.putIfAbsent(name, new ServerInfo(obji, obj)) != null) { if (register != null) register.postRegister(Boolean.FALSE); throw new InstanceAlreadyExistsException(name + "is already registered."); } - ObjectInstance obji = new ObjectInstance(name, className); - beans.put(name, new ServerInfo(obji, obj)); if (register != null) register.postRegister(Boolean.TRUE); notify(name, MBeanServerNotification.REGISTRATION_NOTIFICATION); @@ -1758,15 +1760,8 @@ public class Server if (bean instanceof NotificationBroadcaster) { NotificationBroadcaster bbean = (NotificationBroadcaster) bean; - NotificationListener indirection = (NotificationListener) - listeners.get(listener); - if (indirection == null) - bbean.removeNotificationListener(listener); - else - { - bbean.removeNotificationListener(indirection); - listeners.remove(listener); - } + bbean.removeNotificationListener(listener); + LazyListenersHolder.listeners.remove(listener); } } @@ -1809,15 +1804,8 @@ public class Server if (bean instanceof NotificationEmitter) { NotificationEmitter bbean = (NotificationEmitter) bean; - NotificationListener indirection = (NotificationListener) - listeners.get(listener); - if (indirection == null) - bbean.removeNotificationListener(listener, filter, passback); - else - { - bbean.removeNotificationListener(indirection, filter, passback); - listeners.remove(listener); - } + bbean.removeNotificationListener(listener, filter, passback); + LazyListenersHolder.listeners.remove(listener); } } @@ -2011,7 +1999,7 @@ public class Server Object abean = getBean(name); checkSecurity(name, null, "setAttribute"); AttributeList list = new AttributeList(attributes.size()); - Iterator it = attributes.iterator(); + Iterator it = attributes.iterator(); while (it.hasNext()) { try @@ -2113,6 +2101,15 @@ public class Server register.postDeregister(); } + /** + * Notifies the delegate of beans being registered + * and unregistered. + * + * @param name the bean being registered. + * @param type the type of notification; + * {@code REGISTRATION_NOTIFICATION} or + * {@code UNREGISTRATION_NOTIFICATION}. + */ private void notify(ObjectName name, String type) { delegate.sendNotification @@ -2136,7 +2133,7 @@ public class Server this.cl = cl; } - protected Class resolveClass(ObjectStreamClass osc) + protected Class resolveClass(ObjectStreamClass osc) throws ClassNotFoundException, IOException { try diff --git a/libjava/classpath/gnu/javax/management/Translator.java b/libjava/classpath/gnu/javax/management/Translator.java index 4ede3743088..a15994429a3 100644 --- a/libjava/classpath/gnu/javax/management/Translator.java +++ b/libjava/classpath/gnu/javax/management/Translator.java @@ -143,14 +143,14 @@ public final class Translator throw new IllegalArgumentException(jtype + " has a " + "non-comparable element " + "type, " + elemClass); - if (((SortedSet) jtype).comparator() != null) + if (((SortedSet) jtype).comparator() != null) throw new IllegalArgumentException(jtype + " does not " + "use natural ordering."); } - Collection elems = (Collection) jtype; + Collection elems = (Collection) jtype; int numElems = elems.size(); Object[] celems = new Object[numElems]; - Iterator i = elems.iterator(); + Iterator i = elems.iterator(); for (int a = 0; a < numElems; ++a) { Object elem = i.next(); @@ -159,7 +159,7 @@ public final class Translator return makeArraySpecific(celems); } if (jtype instanceof Enum) - return ((Enum) jtype).name(); + return ((Enum) jtype).name(); if (jtype instanceof Map || jtype instanceof SortedMap) { int lparam = tName.indexOf("<"); @@ -177,13 +177,13 @@ public final class Translator throw new IllegalArgumentException(jtype + " has a " + "non-comparable element " + "type, " + keyClass); - if (((SortedMap) jtype).comparator() != null) + if (((SortedMap) jtype).comparator() != null) throw new IllegalArgumentException(jtype + " does not " + "use natural ordering."); typeName = "java.util.SortedMap" + tName.substring(lparam); } - OpenType k = translate(key).getOpenType(); - OpenType v = translate(value).getOpenType(); + OpenType k = translate(key).getOpenType(); + OpenType v = translate(value).getOpenType(); CompositeType rowType = new CompositeType(typeName, typeName, new String[] { "key", "value" }, new String[] { "Map key", "Map value"}, @@ -191,7 +191,7 @@ public final class Translator TabularType tabType = new TabularType(typeName, typeName, rowType, new String[]{"key"}); TabularData data = new TabularDataSupport(tabType); - for (Map.Entry entry : (Set) ((Map) jtype).entrySet()) + for (Map.Entry entry : ((Map) jtype).entrySet()) { try { @@ -258,15 +258,15 @@ public final class Translator if (returnType.isEnum()) { String ename = (String) otype; - Enum[] constants = (Enum[]) returnType.getEnumConstants(); - for (Enum c : constants) + Enum[] constants = (Enum[]) returnType.getEnumConstants(); + for (Enum c : constants) if (c.name().equals(ename)) return c; } if (List.class.isAssignableFrom(returnType)) { Object[] elems = (Object[]) otype; - List l = new ArrayList(elems.length); + List l = new ArrayList(elems.length); for (Object elem : elems) l.add(elem); return l; @@ -274,7 +274,7 @@ public final class Translator if (Map.class.isAssignableFrom(returnType)) { TabularData data = (TabularData) otype; - Map m = new HashMap(data.size()); + Map m = new HashMap(data.size()); for (Object val : data.values()) { CompositeData vals = (CompositeData) val; @@ -401,8 +401,8 @@ public final class Translator int comma = type.indexOf(",", lparam); int rparam = type.indexOf(">", comma); String key = type.substring(lparam + 1, comma).trim(); - OpenType k = translate(key).getOpenType(); - OpenType v = translate(type.substring(comma + 1, rparam).trim()).getOpenType(); + OpenType k = translate(key).getOpenType(); + OpenType v = translate(type.substring(comma + 1, rparam).trim()).getOpenType(); CompositeType ctype = new CompositeType(Map.class.getName(), Map.class.getName(), new String[] { "key", "value" }, new String[] { "Map key", "Map value"}, @@ -417,13 +417,13 @@ public final class Translator { int lparam = type.indexOf("<"); int rparam = type.indexOf(">"); - OpenType e = translate(type.substring(lparam + 1, rparam).trim()).getOpenType(); + OpenType e = translate(type.substring(lparam + 1, rparam).trim()).getOpenType(); return new OpenMBeanParameterInfoSupport("TransParam", "Translated parameter", - new ArrayType(1, e) + new ArrayType>(1, e) ); } - Class c; + Class c; try { c = Class.forName(type); @@ -450,15 +450,15 @@ public final class Translator int depth; for (depth = 0; c.getName().charAt(depth) == '['; ++depth) ; - OpenType ot = getTypeFromClass(c.getComponentType()); + OpenType ot = getTypeFromClass(c.getComponentType()); return new OpenMBeanParameterInfoSupport("TransParam", "Translated parameter", - new ArrayType(depth, ot) + new ArrayType>(depth, ot) ); } Method[] methods = c.getDeclaredMethods(); List names = new ArrayList(); - List types = new ArrayList(); + List> types = new ArrayList>(); for (int a = 0; a < methods.length; ++a) { String name = methods[a].getName(); @@ -495,7 +495,7 @@ public final class Translator * @return the appropriate instance. * @throws OpenDataException if the type is not open. */ - private static final OpenType getTypeFromClass(Class c) + private static final OpenType getTypeFromClass(Class c) throws OpenDataException { return Translator.translate(c.getName()).getOpenType(); diff --git a/libjava/classpath/gnu/javax/naming/giop/CorbalocParser.java b/libjava/classpath/gnu/javax/naming/giop/CorbalocParser.java index 397b1c7d9e4..95ebb8a0689 100644 --- a/libjava/classpath/gnu/javax/naming/giop/CorbalocParser.java +++ b/libjava/classpath/gnu/javax/naming/giop/CorbalocParser.java @@ -43,6 +43,8 @@ import gnu.CORBA.Unexpected; import gnu.CORBA.Version; import gnu.CORBA.NamingService.NameTransformer; +import gnu.java.lang.CPStringBuilder; + import java.io.File; import java.io.FileReader; import java.io.IOException; @@ -288,7 +290,7 @@ public class CorbalocParser ior.Internet.version = new Version(major, minor); // Then host data goes till '/' or ':'. - StringBuffer bhost = new StringBuffer(corbaloc.length()); + CPStringBuilder bhost = new CPStringBuilder(corbaloc.length()); while (!t[p].equals(":") && !t[p].equals("/") && !t[p].equals(",")) bhost.append(t[p++]); @@ -381,7 +383,7 @@ public class CorbalocParser { InputStreamReader r = new InputStreamReader(u.openStream()); - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); int c; while ((c = r.read()) > 0) @@ -418,7 +420,7 @@ public class CorbalocParser + "' found"); } - StringBuffer bKey = new StringBuffer(); + CPStringBuilder bKey = new CPStringBuilder(); p++; while (p < t.length && !t[p].equals("#")) diff --git a/libjava/classpath/gnu/javax/naming/giop/GiopNamingServiceFactory.java b/libjava/classpath/gnu/javax/naming/giop/GiopNamingServiceFactory.java index 84aa3241365..6c221548f47 100644 --- a/libjava/classpath/gnu/javax/naming/giop/GiopNamingServiceFactory.java +++ b/libjava/classpath/gnu/javax/naming/giop/GiopNamingServiceFactory.java @@ -40,6 +40,8 @@ package gnu.javax.naming.giop; import gnu.CORBA.OrbFunctional; +import gnu.java.lang.CPStringBuilder; + import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; @@ -161,7 +163,7 @@ public class GiopNamingServiceFactory { TreeMap map = new TreeMap(); map.putAll(props); - StringBuffer b = new StringBuffer(50*props.size()); + CPStringBuilder b = new CPStringBuilder(50*props.size()); Iterator iter = map.entrySet().iterator(); Map.Entry m; diff --git a/libjava/classpath/gnu/javax/naming/giop/ListBindingsEnumeration.java b/libjava/classpath/gnu/javax/naming/giop/ListBindingsEnumeration.java index 00f4a0779c7..68ba49b3fed 100644 --- a/libjava/classpath/gnu/javax/naming/giop/ListBindingsEnumeration.java +++ b/libjava/classpath/gnu/javax/naming/giop/ListBindingsEnumeration.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.naming.giop; +import gnu.java.lang.CPStringBuilder; + import javax.naming.NamingEnumeration; import org.omg.CosNaming.Binding; @@ -92,7 +94,7 @@ public class ListBindingsEnumeration extends GiopNamingEnumeration implements */ public Object convert(Binding binding) { - StringBuffer name = new StringBuffer(); + CPStringBuilder name = new CPStringBuilder(); for (int i = 0; i < binding.binding_name.length; i++) { diff --git a/libjava/classpath/gnu/javax/naming/giop/ListEnumeration.java b/libjava/classpath/gnu/javax/naming/giop/ListEnumeration.java index 2e64e67d393..3fca1e0abc8 100644 --- a/libjava/classpath/gnu/javax/naming/giop/ListEnumeration.java +++ b/libjava/classpath/gnu/javax/naming/giop/ListEnumeration.java @@ -29,7 +29,7 @@ executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from +odule. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.naming.giop; +import gnu.java.lang.CPStringBuilder; + import javax.naming.NameClassPair; import javax.naming.NamingEnumeration; @@ -85,7 +87,7 @@ public class ListEnumeration extends GiopNamingEnumeration implements */ public Object convert(Binding binding) { - StringBuffer name = new StringBuffer(); + CPStringBuilder name = new CPStringBuilder(); for (int i = 0; i < binding.binding_name.length; i++) { diff --git a/libjava/classpath/gnu/javax/naming/ictxImpl/trans/GnuName.java b/libjava/classpath/gnu/javax/naming/ictxImpl/trans/GnuName.java index b20bfa4ea8b..b423c721bc0 100644 --- a/libjava/classpath/gnu/javax/naming/ictxImpl/trans/GnuName.java +++ b/libjava/classpath/gnu/javax/naming/ictxImpl/trans/GnuName.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.javax.naming.ictxImpl.trans; +import gnu.java.lang.CPStringBuilder; + import java.util.Enumeration; import java.util.NoSuchElementException; @@ -455,7 +457,7 @@ public class GnuName */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < length; i++) { b.append(get(i)); diff --git a/libjava/classpath/gnu/javax/net/ssl/PrivateCredentials.java b/libjava/classpath/gnu/javax/net/ssl/PrivateCredentials.java index 4a37cd8b1f9..7fff253dd4f 100644 --- a/libjava/classpath/gnu/javax/net/ssl/PrivateCredentials.java +++ b/libjava/classpath/gnu/javax/net/ssl/PrivateCredentials.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.net.ssl; +import gnu.java.lang.CPStringBuilder; + import java.io.EOFException; import java.io.InputStream; import java.io.IOException; @@ -137,7 +139,7 @@ public class PrivateCredentials implements ManagerFactoryParameters boolean encrypted = false; String cipher = null; String salt = null; - StringBuffer base64 = new StringBuffer(); + CPStringBuilder base64 = new CPStringBuilder(); while (true) { line = readLine(privateKey); @@ -235,7 +237,7 @@ public class PrivateCredentials implements ManagerFactoryParameters private String readLine(InputStream in) throws IOException { boolean eol_is_cr = System.getProperty("line.separator").equals("\r"); - StringBuffer str = new StringBuffer(); + CPStringBuilder str = new CPStringBuilder(); while (true) { int i = in.read(); diff --git a/libjava/classpath/gnu/javax/net/ssl/Session.java b/libjava/classpath/gnu/javax/net/ssl/Session.java index e2b21aa1e81..09b50eef069 100644 --- a/libjava/classpath/gnu/javax/net/ssl/Session.java +++ b/libjava/classpath/gnu/javax/net/ssl/Session.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.net.ssl; +import gnu.java.lang.CPStringBuilder; + import java.io.Serializable; import java.security.Principal; @@ -349,7 +351,7 @@ public abstract class Session implements SSLSession, Serializable public String toString() { - StringBuffer str = new StringBuffer (3 * id.length + 1); + CPStringBuilder str = new CPStringBuilder (3 * id.length + 1); for (int i = 0; i < id.length; i++) { int x = id[i] & 0xFF; @@ -361,4 +363,4 @@ public abstract class Session implements SSLSession, Serializable return str.toString (); } } -} \ No newline at end of file +} diff --git a/libjava/classpath/gnu/javax/net/ssl/provider/HelloRequest.java b/libjava/classpath/gnu/javax/net/ssl/provider/HelloRequest.java index 0ffc26c2b5d..81dfce591e5 100644 --- a/libjava/classpath/gnu/javax/net/ssl/provider/HelloRequest.java +++ b/libjava/classpath/gnu/javax/net/ssl/provider/HelloRequest.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.net.ssl.provider; +import gnu.java.lang.CPStringBuilder; + /** * The handshake body for a HelloRequest handshake message. * @@ -51,7 +53,7 @@ public final class HelloRequest implements Handshake.Body public String toString (final String prefix) { - StringBuffer str = new StringBuffer (); + CPStringBuilder str = new CPStringBuilder (); if (prefix != null) str.append (prefix); str.append ("HelloRequest { };"); diff --git a/libjava/classpath/gnu/javax/net/ssl/provider/Util.java b/libjava/classpath/gnu/javax/net/ssl/provider/Util.java index ba8ea7db70b..57f637c1849 100644 --- a/libjava/classpath/gnu/javax/net/ssl/provider/Util.java +++ b/libjava/classpath/gnu/javax/net/ssl/provider/Util.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.net.ssl.provider; +import gnu.java.lang.CPStringBuilder; + import java.io.PrintWriter; import java.io.StringWriter; @@ -128,7 +130,7 @@ public final class Util */ public static String toHexString(byte[] buf, int off, int len) { - StringBuffer str = new StringBuffer(); + CPStringBuilder str = new CPStringBuilder(); for (int i = 0; i < len; i++) { str.append(HEX.charAt(buf[i+off] >>> 4 & 0x0F)); @@ -157,7 +159,7 @@ public final class Util */ public static String toHexString(byte[] buf, int off, int len, char sep) { - StringBuffer str = new StringBuffer(); + CPStringBuilder str = new CPStringBuilder(); for (int i = 0; i < len; i++) { str.append(HEX.charAt(buf[i+off] >>> 4 & 0x0F)); @@ -194,7 +196,7 @@ public final class Util public static String hexDump(byte[] buf, int off, int len, String prefix) { String nl = getProperty("line.separator"); - StringBuffer str = new StringBuffer(); + CPStringBuilder str = new CPStringBuilder(); int i = 0; while (i < len) { @@ -294,7 +296,7 @@ public final class Util public static String formatInt(int i, int radix, int len) { String s = Integer.toString(i, radix); - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); for (int j = 0; j < len - s.length(); j++) buf.append("0"); buf.append(s); diff --git a/libjava/classpath/gnu/javax/print/ipp/IppRequest.java b/libjava/classpath/gnu/javax/print/ipp/IppRequest.java index 05a6faae72e..3de88715a68 100644 --- a/libjava/classpath/gnu/javax/print/ipp/IppRequest.java +++ b/libjava/classpath/gnu/javax/print/ipp/IppRequest.java @@ -469,7 +469,7 @@ public class IppRequest } else { - new IppException("Unknown target operation attribute combination."); + throw new IppException("Unknown target operation attribute combination."); } writeAttributes(attributes); diff --git a/libjava/classpath/gnu/javax/print/ipp/attribute/RequestedAttributes.java b/libjava/classpath/gnu/javax/print/ipp/attribute/RequestedAttributes.java index ae9d32dfdbd..814fe2d0a74 100644 --- a/libjava/classpath/gnu/javax/print/ipp/attribute/RequestedAttributes.java +++ b/libjava/classpath/gnu/javax/print/ipp/attribute/RequestedAttributes.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.print.ipp.attribute; +import gnu.java.lang.CPStringBuilder; + import java.util.ArrayList; import java.util.List; @@ -117,7 +119,7 @@ public final class RequestedAttributes implements Attribute */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); if (attributes.size() > 0) b.append(attributes.get(0)); diff --git a/libjava/classpath/gnu/javax/rmi/CORBA/RmiUtilities.java b/libjava/classpath/gnu/javax/rmi/CORBA/RmiUtilities.java index 91bfa3776dc..5fa78b1e915 100644 --- a/libjava/classpath/gnu/javax/rmi/CORBA/RmiUtilities.java +++ b/libjava/classpath/gnu/javax/rmi/CORBA/RmiUtilities.java @@ -46,6 +46,8 @@ import gnu.CORBA.CDR.gnuRuntime; import gnu.CORBA.CDR.gnuValueStream; import gnu.CORBA.CDR.HeadlessInput; +import gnu.java.lang.CPStringBuilder; + import org.omg.CORBA.MARSHAL; import org.omg.CORBA.StringValueHelper; import org.omg.CORBA.WStringValueHelper; @@ -393,7 +395,7 @@ public class RmiUtilities */ public static String toHex(long l) { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append(Long.toHexString(l).toUpperCase()); while (b.length() < 16) b.insert(0, '0'); @@ -425,7 +427,7 @@ public class RmiUtilities return "V"; else if (type.isArray()) { - StringBuffer l = new StringBuffer("["); + CPStringBuilder l = new CPStringBuilder("["); Class component = type.getComponentType(); while (component.isArray()) @@ -700,13 +702,14 @@ public class RmiUtilities if (in instanceof HeadlessInput) ((HeadlessInput) in).subsequentCalls = true; - gnuRuntime g; + gnuRuntime g = null; Serializable object = null; try { g = (gnuRuntime) sender; - object = g.target; + if (sender != null) + object = g.target; } catch (ClassCastException e) { diff --git a/libjava/classpath/gnu/javax/security/auth/callback/AWTCallbackHandler.java b/libjava/classpath/gnu/javax/security/auth/callback/AWTCallbackHandler.java index 539c4a17e1c..d75ce4104fa 100644 --- a/libjava/classpath/gnu/javax/security/auth/callback/AWTCallbackHandler.java +++ b/libjava/classpath/gnu/javax/security/auth/callback/AWTCallbackHandler.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.security.auth.callback; +import gnu.java.lang.CPStringBuilder; + import java.awt.BorderLayout; import java.awt.Button; import java.awt.Dialog; @@ -238,8 +240,8 @@ public class AWTCallbackHandler extends AbstractCallbackHandler int defind = 0; for (int i = 0; i < locales.length; i++) { - StringBuffer lang = - new StringBuffer(locales[i].getDisplayLanguage(locales[i])); + CPStringBuilder lang = + new CPStringBuilder(locales[i].getDisplayLanguage(locales[i])); String country = locales[i].getDisplayCountry(locales[i]); String variant = locales[i].getDisplayVariant(locales[i]); if (country.length() > 0 && variant.length() > 0) diff --git a/libjava/classpath/gnu/javax/security/auth/login/ConfigFileTokenizer.java b/libjava/classpath/gnu/javax/security/auth/login/ConfigFileTokenizer.java index 06a1d2c7ce9..0235c6971c3 100644 --- a/libjava/classpath/gnu/javax/security/auth/login/ConfigFileTokenizer.java +++ b/libjava/classpath/gnu/javax/security/auth/login/ConfigFileTokenizer.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.security.auth.login; +import gnu.java.lang.CPStringBuilder; + import gnu.java.security.Configuration; import java.io.BufferedReader; @@ -92,7 +94,7 @@ public class ConfigFileTokenizer private BufferedReader br; boolean initialised; - private StringBuffer sb; + private CPStringBuilder sb; private int sbNdx; // Constructor(s) @@ -185,7 +187,7 @@ public class ConfigFileTokenizer private void init() throws IOException { - sb = new StringBuffer(); + sb = new CPStringBuilder(); String line; while ((line = br.readLine()) != null) { diff --git a/libjava/classpath/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java b/libjava/classpath/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java index b90caef24b5..0514c937a9f 100644 --- a/libjava/classpath/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java +++ b/libjava/classpath/gnu/javax/sound/sampled/gstreamer/io/GstAudioFileReader.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.javax.sound.sampled.gstreamer.io; +import gnu.java.lang.CPStringBuilder; + import gnu.javax.sound.sampled.gstreamer.GStreamerMixer; import java.io.BufferedInputStream; @@ -65,7 +67,7 @@ public class GstAudioFileReader public AudioFileFormat getAudioFileFormat(File file) throws UnsupportedAudioFileException, IOException { - StringBuffer name = new StringBuffer(file.getName()); + CPStringBuilder name = new CPStringBuilder(file.getName()); String _name = name.substring(name.lastIndexOf(".") + 1); return getAudioFileFormat( diff --git a/libjava/classpath/gnu/javax/swing/text/html/parser/htmlValidator.java b/libjava/classpath/gnu/javax/swing/text/html/parser/htmlValidator.java index 7507850e8f9..7f16f1f2dba 100644 --- a/libjava/classpath/gnu/javax/swing/text/html/parser/htmlValidator.java +++ b/libjava/classpath/gnu/javax/swing/text/html/parser/htmlValidator.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.swing.text.html.parser; +import gnu.java.lang.CPStringBuilder; + import gnu.javax.swing.text.html.parser.models.node; import gnu.javax.swing.text.html.parser.models.transformer; @@ -499,11 +501,11 @@ public abstract class htmlValidator dtdAttribute = tag.getElement().getAttribute(foundAttribute.toString()); if (dtdAttribute == null) { - StringBuffer valid = - new StringBuffer("The tag <" + tag.getHTMLTag() + - "> cannot contain the attribute '" + foundAttribute + - "'. The valid attributes for this tag are: " - ); + CPStringBuilder valid = + new CPStringBuilder("The tag <" + tag.getHTMLTag() + + "> cannot contain the attribute '" + foundAttribute + + "'. The valid attributes for this tag are: " + ); AttributeList a = tag.getElement().getAttributes(); @@ -545,22 +547,22 @@ public abstract class htmlValidator !dtdAttribute.values.contains(value.toUpperCase()) ) { - StringBuffer valid; + CPStringBuilder valid; if (dtdAttribute.values.size() == 1) valid = - new StringBuffer("The attribute '" + foundAttribute + - "' of the tag <" + tag.getHTMLTag() + - "> cannot have the value '" + value + - "'. The only valid value is " - ); + new CPStringBuilder("The attribute '" + foundAttribute + + "' of the tag <" + tag.getHTMLTag() + + "> cannot have the value '" + value + + "'. The only valid value is " + ); else valid = - new StringBuffer("The attribute '" + foundAttribute + - "' of the tag <" + tag.getHTMLTag() + - "> cannot have the value '" + value + "'. The " + - dtdAttribute.values.size() + - " valid values are: " - ); + new CPStringBuilder("The attribute '" + foundAttribute + + "' of the tag <" + tag.getHTMLTag() + + "> cannot have the value '" + value + "'. The " + + dtdAttribute.values.size() + + " valid values are: " + ); Enumeration vv = dtdAttribute.values.elements(); while (vv.hasMoreElements()) diff --git a/libjava/classpath/gnu/javax/swing/text/html/parser/models/list.java b/libjava/classpath/gnu/javax/swing/text/html/parser/models/list.java index b77ef7fd850..c303ae8571d 100644 --- a/libjava/classpath/gnu/javax/swing/text/html/parser/models/list.java +++ b/libjava/classpath/gnu/javax/swing/text/html/parser/models/list.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.swing.text.html.parser.models; +import gnu.java.lang.CPStringBuilder; + import java.io.Serializable; /** @@ -296,7 +298,7 @@ public class list */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append(" ( "); for (int i = 0; i < nodes.length; i++) { diff --git a/libjava/classpath/gnu/javax/swing/text/html/parser/models/node.java b/libjava/classpath/gnu/javax/swing/text/html/parser/models/node.java index 54469b34995..f45a13b3e86 100644 --- a/libjava/classpath/gnu/javax/swing/text/html/parser/models/node.java +++ b/libjava/classpath/gnu/javax/swing/text/html/parser/models/node.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.swing.text.html.parser.models; +import gnu.java.lang.CPStringBuilder; + import java.io.Serializable; /** @@ -239,7 +241,7 @@ public class node */ public String toString() { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); b.append(token); if (unary != 0) diff --git a/libjava/classpath/gnu/javax/swing/text/html/parser/support/Parser.java b/libjava/classpath/gnu/javax/swing/text/html/parser/support/Parser.java index e99be3238e9..b087c3c003c 100644 --- a/libjava/classpath/gnu/javax/swing/text/html/parser/support/Parser.java +++ b/libjava/classpath/gnu/javax/swing/text/html/parser/support/Parser.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.javax.swing.text.html.parser.support; +import gnu.java.lang.CPStringBuilder; + import gnu.javax.swing.text.html.parser.htmlAttributeSet; import gnu.javax.swing.text.html.parser.htmlValidator; import gnu.javax.swing.text.html.parser.support.low.Constants; @@ -132,12 +134,12 @@ public class Parser /** * The buffer to collect the incremental output like text or coment. */ - private StringBuffer buffer = new StringBuffer(); + private final StringBuffer buffer = new StringBuffer(); /** * The buffer to store the document title. */ - private StringBuffer title = new StringBuffer(); + private final StringBuffer title = new StringBuffer(); /** * The current token. @@ -994,7 +996,7 @@ public class Parser // character, not as a token. The character may be part of // the unquoted URL. { - StringBuffer image = new StringBuffer(value.getImage()); + CPStringBuilder image = new CPStringBuilder(value.getImage()); while (next.kind == NUMTOKEN || next.kind == SLASH || next.kind == OTHER) { @@ -1025,7 +1027,7 @@ public class Parser // character, not as a token. The slash may be part of // the unquoted URL. { - StringBuffer image = new StringBuffer(value.getImage()); + CPStringBuilder image = new CPStringBuilder(value.getImage()); while (next.kind == NUMTOKEN || next.kind == SLASH) { image.append(getNextToken().getImage()); diff --git a/libjava/classpath/gnu/xml/dom/DomAttr.java b/libjava/classpath/gnu/xml/dom/DomAttr.java index 31d7af2d2f1..6a8da837154 100644 --- a/libjava/classpath/gnu/xml/dom/DomAttr.java +++ b/libjava/classpath/gnu/xml/dom/DomAttr.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.Attr; import org.w3c.dom.DOMException; import org.w3c.dom.Element; @@ -106,7 +108,37 @@ public class DomAttr // and character data change events and when they happen, // report self-mutation } - + + /** + * Constructs an Attr node associated with the specified document. + * The "specified" flag is initialized to true, since this DOM has + * no current "back door" mechanisms to manage default values so + * that every value must effectively be "specified". + * + *

    This constructor should only be invoked by a Document as part of + * its createAttribute functionality, or through a subclass which is + * similarly used in a "Sub-DOM" style layer. + *

    + * With this constructor, the prefix and local part are given explicitly + * rather than being computed. This allows them to be explicitly set to + * {@code null} as required by {@link Document#createAttribute(String)}. + *

    + * + * @param owner The document with which this node is associated + * @param namespaceURI Combined with the local part of the name, + * this is used to uniquely identify a type of attribute + * @param name Name of this attribute, which may include a prefix + * @param prefix the namespace prefix of the name. May be {@code null}. + * @param localName the local part of the name. May be {@code null}. + */ + protected DomAttr(DomDocument owner, String namespaceURI, String name, + String prefix, String localName) + { + super(ATTRIBUTE_NODE, owner, namespaceURI, name, prefix, localName); + specified = true; + length = 1; + } + /** * DOM L1 * Returns the attribute name (same as getNodeName) @@ -147,7 +179,7 @@ public class DomAttr return (value == null) ? "" : value; } // Otherwise collect child node-values - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); for (DomNode ctx = first; ctx != null; ctx = ctx.next) { switch (ctx.nodeType) diff --git a/libjava/classpath/gnu/xml/dom/DomDocument.java b/libjava/classpath/gnu/xml/dom/DomDocument.java index bcc729335d5..b32c6b82dfc 100644 --- a/libjava/classpath/gnu/xml/dom/DomDocument.java +++ b/libjava/classpath/gnu/xml/dom/DomDocument.java @@ -597,6 +597,8 @@ public class DomDocument /** * DOM L1 * Returns a newly created element with the specified name. + * The node name of the created element will be equal to {@code name}. + * The namespace, prefix and local name will all be {@code null}. */ public Element createElement(String name) { @@ -612,8 +614,7 @@ public class DomDocument } else { - DomElement domElement = new DomElement(this, null, name); - domElement.localName = null; + DomElement domElement = new DomElement(this, null, name, null, null); element = domElement; } if (defaultAttributes) @@ -813,8 +814,7 @@ public class DomDocument } else { - DomAttr ret = new DomAttr(this, null, name); - ret.localName = null; + DomAttr ret = new DomAttr(this, null, name, null, null); return ret; } } diff --git a/libjava/classpath/gnu/xml/dom/DomElement.java b/libjava/classpath/gnu/xml/dom/DomElement.java index 9fd81e9705b..462cb9178a6 100644 --- a/libjava/classpath/gnu/xml/dom/DomElement.java +++ b/libjava/classpath/gnu/xml/dom/DomElement.java @@ -90,6 +90,32 @@ public class DomElement } /** + *

    + * Constructs an Element node associated with the specified document. + * This constructor should only be invoked by a Document as part + * of its createElement functionality, or through a subclass which is + * similarly used in a "Sub-DOM" style layer. + *

    + *

    + * With this constructor, the prefix and local part are given explicitly + * rather than being computed. This allows them to be explicitly set to + * {@code null} as required by {@link Document#createElement(String)}. + *

    + * + * @param owner The document with which this node is associated + * @param namespaceURI Combined with the local part of the name, + * this is used to uniquely identify a type of element + * @param name Name of this element, which may include a prefix + * @param prefix the namespace prefix of the name. May be {@code null}. + * @param localName the local part of the name. May be {@code null}. + */ + protected DomElement(DomDocument owner, String namespaceURI, String name, + String prefix, String localName) + { + super(ELEMENT_NODE, owner, namespaceURI, name, prefix, localName); + } + + /** * DOM L1 * Returns the element's attributes */ diff --git a/libjava/classpath/gnu/xml/dom/DomEvent.java b/libjava/classpath/gnu/xml/dom/DomEvent.java index d57eac0e445..9190ed8eb0e 100644 --- a/libjava/classpath/gnu/xml/dom/DomEvent.java +++ b/libjava/classpath/gnu/xml/dom/DomEvent.java @@ -37,8 +37,15 @@ exception statement from your version. */ package gnu.xml.dom; -import org.w3c.dom.*; -import org.w3c.dom.events.*; +import gnu.java.lang.CPStringBuilder; + +import org.w3c.dom.Node; + +import org.w3c.dom.events.Event; +import org.w3c.dom.events.EventTarget; +import org.w3c.dom.events.MutationEvent; +import org.w3c.dom.events.UIEvent; + import org.w3c.dom.views.AbstractView; // used by UIEvent /** @@ -180,7 +187,7 @@ public class DomEvent */ public String toString() { - StringBuffer buf = new StringBuffer("[Event "); + CPStringBuilder buf = new CPStringBuilder("[Event "); buf.append(type); switch (eventPhase) { diff --git a/libjava/classpath/gnu/xml/dom/DomNode.java b/libjava/classpath/gnu/xml/dom/DomNode.java index 1cbdc2aecc0..78e1ab85c85 100644 --- a/libjava/classpath/gnu/xml/dom/DomNode.java +++ b/libjava/classpath/gnu/xml/dom/DomNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.dom; +import gnu.java.lang.CPStringBuilder; + import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -1939,7 +1941,7 @@ public abstract class DomNode case ENTITY_NODE: case ENTITY_REFERENCE_NODE: case DOCUMENT_FRAGMENT_NODE: - StringBuffer buffer = new StringBuffer(); + CPStringBuilder buffer = new CPStringBuilder(); for (DomNode ctx = first; ctx != null; ctx = ctx.next) { String textContent = ctx.getTextContent(false); @@ -2124,7 +2126,7 @@ public abstract class DomNode { String nodeName = getNodeName(); String nodeValue = getNodeValue(); - StringBuffer buf = new StringBuffer(getClass().getName()); + CPStringBuilder buf = new CPStringBuilder(getClass().getName()); buf.append('['); if (nodeName != null) { @@ -2146,7 +2148,7 @@ public abstract class DomNode String encode(String value) { - StringBuffer buf = null; + CPStringBuilder buf = null; int len = value.length(); for (int i = 0; i < len; i++) { @@ -2155,7 +2157,7 @@ public abstract class DomNode { if (buf == null) { - buf = new StringBuffer(value.substring(0, i)); + buf = new CPStringBuilder(value.substring(0, i)); } buf.append("\\n"); } @@ -2163,7 +2165,7 @@ public abstract class DomNode { if (buf == null) { - buf = new StringBuffer(value.substring(0, i)); + buf = new CPStringBuilder(value.substring(0, i)); } buf.append("\\r"); } diff --git a/libjava/classpath/gnu/xml/dom/DomNsNode.java b/libjava/classpath/gnu/xml/dom/DomNsNode.java index b27514ecb56..d3361515b70 100644 --- a/libjava/classpath/gnu/xml/dom/DomNsNode.java +++ b/libjava/classpath/gnu/xml/dom/DomNsNode.java @@ -54,7 +54,7 @@ public abstract class DomNsNode private String name; private String namespace; private String prefix; - String localName; + private String localName; /** * Constructs a node associated with the specified document, and @@ -76,6 +76,33 @@ public abstract class DomNsNode } /** + * Constructs a node associated with the specified document, and + * with the specified namespace information. The prefix and local part + * are given explicitly rather than being computed. This allows them + * to be explicitly set to {@code null} as required by + * {@link Document#createElement(String)}. + * + * @param owner The document with which this entity is associated + * @param namespaceURI Combined with the local part of the name, + * this identifies a type of element or attribute; may be null. + * If this is the empty string, it is reassigned as null so that + * applications only need to test that case. + * @param name Name of this node, which may include a prefix + * @param prefix the namespace prefix of the name. May be {@code null}. + * @param localName the local part of the name. May be {@code null}. + */ + // package private + DomNsNode(short nodeType, DomDocument owner, String namespaceURI, String name, + String prefix, String localName) + { + super(nodeType, owner); + this.name = name.intern(); + this.prefix = prefix == null ? null : prefix.intern(); + this.localName = localName == null ? null : localName.intern(); + setNamespaceURI(namespaceURI); + } + + /** * DOM L1 * Returns the node's name, including any namespace prefix. */ diff --git a/libjava/classpath/gnu/xml/dom/DomText.java b/libjava/classpath/gnu/xml/dom/DomText.java index 3ca17dc9b87..167eba3c1d2 100644 --- a/libjava/classpath/gnu/xml/dom/DomText.java +++ b/libjava/classpath/gnu/xml/dom/DomText.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.DOMException; import org.w3c.dom.Text; @@ -172,7 +174,7 @@ public class DomText { ref = ctx; } - StringBuffer buf = new StringBuffer(ref.getNodeValue()); + CPStringBuilder buf = new CPStringBuilder(ref.getNodeValue()); for (ctx = ref.next; ctx != null && (ctx.nodeType == TEXT_NODE || ctx.nodeType == CDATA_SECTION_NODE); ctx = ctx.next) diff --git a/libjava/classpath/gnu/xml/dom/ls/DomLSInput.java b/libjava/classpath/gnu/xml/dom/ls/DomLSInput.java index 44274ec4734..68705fdee92 100644 --- a/libjava/classpath/gnu/xml/dom/ls/DomLSInput.java +++ b/libjava/classpath/gnu/xml/dom/ls/DomLSInput.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.dom.ls; +import gnu.java.lang.CPStringBuilder; + import java.io.InputStream; import java.io.InputStreamReader; import java.io.IOException; @@ -82,7 +84,7 @@ public class DomLSInput public String getStringData() { - StringBuffer acc = new StringBuffer(); + CPStringBuilder acc = new CPStringBuilder(); Reader reader = getCharacterStream(); try { diff --git a/libjava/classpath/gnu/xml/dom/ls/DomLSParser.java b/libjava/classpath/gnu/xml/dom/ls/DomLSParser.java index 88f9bae23fe..f4f555e8c39 100644 --- a/libjava/classpath/gnu/xml/dom/ls/DomLSParser.java +++ b/libjava/classpath/gnu/xml/dom/ls/DomLSParser.java @@ -253,7 +253,7 @@ public class DomLSParser eventSink = (filter == null) ? new SAXEventSink() : new FilteredSAXEventSink(filter); // configure sink - eventSink.namespaceAware = namespaceAware; + eventSink.setNamespaceAware(namespaceAware); eventSink.ignoreWhitespace = ignoreWhitespace; eventSink.expandEntityReferences = expandEntityReferences; eventSink.ignoreComments = ignoreComments; diff --git a/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java b/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java index 0a165aafbad..1f8de046d42 100644 --- a/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java +++ b/libjava/classpath/gnu/xml/dom/ls/SAXEventSink.java @@ -89,7 +89,7 @@ public class SAXEventSink PREDEFINED_ENTITIES.add("apos"); } - boolean namespaceAware; + private boolean namespaceAware; boolean ignoreWhitespace; boolean expandEntityReferences; boolean ignoreComments; @@ -128,6 +128,11 @@ public class SAXEventSink this.locator = locator; } + public void setNamespaceAware(boolean namespaceAware) + { + this.namespaceAware = namespaceAware; + } + public void startDocument() throws SAXException { diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeAttr.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeAttr.java index 24088fb8154..144aaf82862 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeAttr.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeAttr.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.Attr; import org.w3c.dom.DOMException; import org.w3c.dom.Element; @@ -103,7 +105,7 @@ class GnomeAttr public String toString() { - StringBuffer buffer = new StringBuffer(getClass().getName()); + CPStringBuilder buffer = new CPStringBuilder(getClass().getName()); buffer.append("[name="); buffer.append(getName()); buffer.append(",value="); diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCharacterData.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCharacterData.java index a3200921df6..aa98652ba83 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCharacterData.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeCharacterData.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.CharacterData; import org.w3c.dom.DOMException; @@ -107,7 +109,7 @@ abstract class GnomeCharacterData public String toString() { - StringBuffer buffer = new StringBuffer(getClass().getName()); + CPStringBuilder buffer = new CPStringBuilder(getClass().getName()); buffer.append("[data="); buffer.append(getData()); buffer.append("]"); diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocument.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocument.java index 03420c463e8..a5333550e16 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocument.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocument.java @@ -37,6 +37,9 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; +import gnu.xml.dom.DomNodeIterator; + import java.util.Iterator; import org.w3c.dom.Attr; @@ -66,8 +69,6 @@ import org.w3c.dom.xpath.XPathException; import org.w3c.dom.xpath.XPathExpression; import org.w3c.dom.xpath.XPathNSResolver; -import gnu.xml.dom.DomNodeIterator; - /** * A DOM document node implemented in libxml2. * @@ -549,7 +550,7 @@ public class GnomeDocument public String toString() { - StringBuffer buffer = new StringBuffer(getClass().getName()); + CPStringBuilder buffer = new CPStringBuilder(getClass().getName()); buffer.append("[version="); buffer.append(getXmlVersion()); buffer.append(",standalone="); diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentType.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentType.java index 257fbbceb69..eb3a65f1d49 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentType.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeDocumentType.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.DocumentType; import org.w3c.dom.NamedNodeMap; @@ -79,7 +81,7 @@ implements DocumentType public String toString () { String publicId = getPublicId (); - StringBuffer buffer = new StringBuffer (getClass ().getName ()); + CPStringBuilder buffer = new CPStringBuilder (getClass ().getName ()); buffer.append ("["); if (publicId != null) { diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeElement.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeElement.java index 2770cbbfd1e..e87e3adfe1c 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeElement.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeElement.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import java.util.HashSet; import java.util.Set; @@ -172,7 +174,7 @@ class GnomeElement public String toString() { - StringBuffer buffer = new StringBuffer(getClass().getName()); + CPStringBuilder buffer = new CPStringBuilder(getClass().getName()); buffer.append("[tagName="); buffer.append(getTagName()); buffer.append("]"); diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntity.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntity.java index 76367f8bd4f..8d61a26c1ad 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntity.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeEntity.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.Entity; /** @@ -83,7 +85,7 @@ implements Entity public String toString () { String publicId = getPublicId (); - StringBuffer buffer = new StringBuffer (getClass ().getName ()); + CPStringBuilder buffer = new CPStringBuilder (getClass ().getName ()); buffer.append ("["); if (publicId != null) { diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNode.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNode.java index 4a2e9ff48d6..6f574ec29dd 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNode.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -368,7 +370,7 @@ class GnomeNode case ENTITY_NODE: case ENTITY_REFERENCE_NODE: case DOCUMENT_FRAGMENT_NODE: - StringBuffer buffer = new StringBuffer(); + CPStringBuilder buffer = new CPStringBuilder(); NodeList children = getChildNodes(); int len = children.getLength(); for (int i = 0; i < len; i++) @@ -489,7 +491,7 @@ class GnomeNode public String toString() { - StringBuffer buffer = new StringBuffer(getClass().getName()); + CPStringBuilder buffer = new CPStringBuilder(getClass().getName()); buffer.append("[nodeName="); buffer.append(getNodeName()); buffer.append("]"); diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNotation.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNotation.java index ca1560e21bc..7f6fdf44896 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNotation.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeNotation.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.Notation; /** @@ -61,7 +63,7 @@ implements Notation public String toString () { String publicId = getPublicId (); - StringBuffer buffer = new StringBuffer (getClass ().getName ()); + CPStringBuilder buffer = new CPStringBuilder (getClass ().getName ()); buffer.append ("["); if (publicId != null) { diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java index a6c47b2e1ca..d2ecd189004 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeProcessingInstruction.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.DOMException; import org.w3c.dom.ProcessingInstruction; @@ -67,7 +69,7 @@ implements ProcessingInstruction public String toString () { - StringBuffer buffer = new StringBuffer (getClass ().getName ()); + CPStringBuilder buffer = new CPStringBuilder (getClass ().getName ()); buffer.append ("[data="); buffer.append (getData ()); buffer.append ("]"); diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeText.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeText.java index 77677a56223..8b8e5e0c1a4 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeText.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeText.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.DOMException; import org.w3c.dom.Node; import org.w3c.dom.Text; @@ -84,7 +86,7 @@ implements Text first = node; node = node.getPreviousSibling (); } - StringBuffer buf = new StringBuffer (first.getNodeValue ()); + CPStringBuilder buf = new CPStringBuilder (first.getNodeValue ()); node = first.getNextSibling (); while (node != null && node instanceof Text) { diff --git a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathResult.java b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathResult.java index d0e1a4f20de..850b5fae08f 100644 --- a/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathResult.java +++ b/libjava/classpath/gnu/xml/libxmlj/dom/GnomeXPathResult.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.libxmlj.dom; +import gnu.java.lang.CPStringBuilder; + import org.w3c.dom.DOMException; import org.w3c.dom.Node; import org.w3c.dom.xpath.XPathException; @@ -112,7 +114,7 @@ implements XPathResult case 1: return getSingleNodeValue ().toString (); default: - StringBuffer buffer = new StringBuffer (); + CPStringBuilder buffer = new CPStringBuilder (); for (int i = 0; i < len; i++) { if (i > 0) diff --git a/libjava/classpath/gnu/xml/stream/XMLEventImpl.java b/libjava/classpath/gnu/xml/stream/XMLEventImpl.java index de2fccb7a1e..8d73b177427 100644 --- a/libjava/classpath/gnu/xml/stream/XMLEventImpl.java +++ b/libjava/classpath/gnu/xml/stream/XMLEventImpl.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.stream; +import gnu.java.lang.CPStringBuilder; + import java.io.Writer; import javax.xml.namespace.QName; import javax.xml.stream.Location; @@ -141,7 +143,7 @@ public abstract class XMLEventImpl protected String encode(String text, boolean inAttr) { int len = text.length(); - StringBuffer buf = null; + CPStringBuilder buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); @@ -149,7 +151,7 @@ public abstract class XMLEventImpl { if (buf == null) { - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); } buf.append("<"); } @@ -157,7 +159,7 @@ public abstract class XMLEventImpl { if (buf == null) { - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); } buf.append(">"); } @@ -165,7 +167,7 @@ public abstract class XMLEventImpl { if (buf == null) { - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); } buf.append("&"); } @@ -173,7 +175,7 @@ public abstract class XMLEventImpl { if (buf == null) { - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); } buf.append("'"); } @@ -181,7 +183,7 @@ public abstract class XMLEventImpl { if (buf == null) { - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); } buf.append("""); } diff --git a/libjava/classpath/gnu/xml/stream/XMLParser.java b/libjava/classpath/gnu/xml/stream/XMLParser.java index 049575ac707..27aaa734dd6 100644 --- a/libjava/classpath/gnu/xml/stream/XMLParser.java +++ b/libjava/classpath/gnu/xml/stream/XMLParser.java @@ -53,6 +53,8 @@ Partly derived from code which carried the following notice: package gnu.xml.stream; +import gnu.java.lang.CPStringBuilder; + import java.io.BufferedInputStream; import java.io.EOFException; import java.io.File; @@ -691,7 +693,7 @@ public class XMLParser { if (event != XMLStreamConstants.START_ELEMENT) throw new XMLStreamException("current event must be START_ELEMENT"); - StringBuffer elementText = new StringBuffer(); + CPStringBuilder elementText = new CPStringBuilder(); int depth = stack.size(); while (event != XMLStreamConstants.END_ELEMENT || stack.size() > depth) { @@ -2011,7 +2013,7 @@ public class XMLParser else { ContentModel model; - StringBuffer acc = new StringBuffer(); + CPStringBuilder acc = new CPStringBuilder(); require('('); acc.append('('); skipWhitespace(); @@ -2058,7 +2060,7 @@ public class XMLParser /** * Parses an element content model. */ - private ElementContentModel readElements(StringBuffer acc) + private ElementContentModel readElements(CPStringBuilder acc) throws IOException, XMLStreamException { int separator; @@ -2159,7 +2161,7 @@ public class XMLParser /** * Parse a cp production. */ - private ContentParticle readContentParticle(StringBuffer acc) + private ContentParticle readContentParticle(CPStringBuilder acc) throws IOException, XMLStreamException { ContentParticle cp = new ContentParticle(); @@ -2228,7 +2230,7 @@ public class XMLParser { String name = readNmtoken(true); requireWhitespace(); - StringBuffer acc = new StringBuffer(); + CPStringBuilder acc = new CPStringBuilder(); HashSet values = new HashSet(); String type = readAttType(acc, values); if (validating) @@ -2277,7 +2279,7 @@ public class XMLParser /** * Parse an attribute type. */ - private String readAttType(StringBuffer acc, HashSet values) + private String readAttType(CPStringBuilder acc, HashSet values) throws IOException, XMLStreamException { if (tryRead('(')) @@ -2313,7 +2315,7 @@ public class XMLParser /** * Parse an enumeration. */ - private void readEnumeration(boolean isNames, StringBuffer acc, + private void readEnumeration(boolean isNames, CPStringBuilder acc, HashSet values) throws IOException, XMLStreamException { @@ -2344,7 +2346,7 @@ public class XMLParser /** * Parse a notation type for an attribute. */ - private void readNotationType(StringBuffer acc, HashSet values) + private void readNotationType(CPStringBuilder acc, HashSet values) throws IOException, XMLStreamException { requireWhitespace(); @@ -3518,7 +3520,7 @@ public class XMLParser private char[] readCharacterRef(int base) throws IOException, XMLStreamException { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int c = readCh(); c != 0x3b && c != -1; c = readCh()) b.append(Character.toChars(c)); try @@ -4246,7 +4248,7 @@ public class XMLParser throws XMLStreamException { // Use regular expression - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); for (Iterator i = children.iterator(); i.hasNext(); ) { buf.append((String) i.next()); @@ -4266,7 +4268,7 @@ public class XMLParser { if (model.regex == null) { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); buf.append('('); for (Iterator i = model.contentParticles.iterator(); i.hasNext(); ) { @@ -4476,7 +4478,7 @@ public class XMLParser */ private static String encodeText(String text) { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); int len = text.length(); for (int i = 0; i < len; i++) { @@ -4584,7 +4586,7 @@ public class XMLParser public String toString() { - StringBuffer buf = new StringBuffer(getClass().getName()); + CPStringBuilder buf = new CPStringBuilder(getClass().getName()); buf.append('['); buf.append("name="); buf.append(name); diff --git a/libjava/classpath/gnu/xml/transform/AbstractNumberNode.java b/libjava/classpath/gnu/xml/transform/AbstractNumberNode.java index 6d1202e69b4..fb953e4f66b 100644 --- a/libjava/classpath/gnu/xml/transform/AbstractNumberNode.java +++ b/libjava/classpath/gnu/xml/transform/AbstractNumberNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -140,7 +142,7 @@ abstract class AbstractNumberNode start = end; } // Process tokens - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); len = tokens.size(); int pos = 0; for (int i = 0; i < len; i++) @@ -188,7 +190,7 @@ abstract class AbstractNumberNode return l; }*/ - void format(StringBuffer buf, int number, String formatToken) + void format(CPStringBuilder buf, int number, String formatToken) { int len = formatToken.length(); char c = formatToken.charAt(len - 1); @@ -254,7 +256,7 @@ abstract class AbstractNumberNode static final String alphabetic(char offset, int number) { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); while (number > 0) { int r = number % 26; @@ -269,7 +271,7 @@ abstract class AbstractNumberNode static final String roman(boolean upper, int number) { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); for (int pos = roman_numbers.length - 1; pos >= 0; pos -= 2) { int f = number / roman_numbers[pos]; @@ -317,7 +319,7 @@ abstract class AbstractNumberNode public String toString() { - StringBuffer buf = new StringBuffer("number"); + CPStringBuilder buf = new CPStringBuilder("number"); buf.append('['); buf.append("format="); buf.append(format); diff --git a/libjava/classpath/gnu/xml/transform/ApplyTemplatesNode.java b/libjava/classpath/gnu/xml/transform/ApplyTemplatesNode.java index 041809bdf1a..0daaa7aeccd 100644 --- a/libjava/classpath/gnu/xml/transform/ApplyTemplatesNode.java +++ b/libjava/classpath/gnu/xml/transform/ApplyTemplatesNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -192,7 +194,7 @@ final class ApplyTemplatesNode public String toString() { - StringBuffer buf = new StringBuffer("apply-templates"); + CPStringBuilder buf = new CPStringBuilder("apply-templates"); buf.append('['); boolean o = false; if (select != null) diff --git a/libjava/classpath/gnu/xml/transform/AttributeNode.java b/libjava/classpath/gnu/xml/transform/AttributeNode.java index 71e2ed0f7af..bbc4e08059e 100644 --- a/libjava/classpath/gnu/xml/transform/AttributeNode.java +++ b/libjava/classpath/gnu/xml/transform/AttributeNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import javax.xml.XMLConstants; import javax.xml.namespace.QName; import javax.xml.transform.TransformerException; @@ -231,7 +233,7 @@ final class AttributeNode public String toString() { - StringBuffer buf = new StringBuffer("attribute"); + CPStringBuilder buf = new CPStringBuilder("attribute"); buf.append('['); buf.append("name="); buf.append(name); diff --git a/libjava/classpath/gnu/xml/transform/Bindings.java b/libjava/classpath/gnu/xml/transform/Bindings.java index 4ee08322317..009321315bb 100644 --- a/libjava/classpath/gnu/xml/transform/Bindings.java +++ b/libjava/classpath/gnu/xml/transform/Bindings.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -259,7 +261,7 @@ public class Bindings public String toString() { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); boolean next = false; Collection seen = new HashSet(); Map wctx = (Map) withParameters.getFirst(); diff --git a/libjava/classpath/gnu/xml/transform/CallTemplateNode.java b/libjava/classpath/gnu/xml/transform/CallTemplateNode.java index 31b26cbcdb0..fe0eea74eff 100644 --- a/libjava/classpath/gnu/xml/transform/CallTemplateNode.java +++ b/libjava/classpath/gnu/xml/transform/CallTemplateNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; @@ -86,7 +88,7 @@ final class CallTemplateNode TemplateNode t = stylesheet.getTemplate(mode, name); if (t != null) { - if (withParams != null) + if (!withParams.isEmpty()) { // compute the parameter values LinkedList values = new LinkedList(); @@ -118,7 +120,7 @@ final class CallTemplateNode } t.apply(stylesheet, mode, context, pos, len, parent, nextSibling); - if (withParams != null) + if (!withParams.isEmpty()) { // pop the variable context stylesheet.bindings.pop(Bindings.WITH_PARAM); @@ -133,20 +135,17 @@ final class CallTemplateNode public boolean references(QName var) { - if (withParams != null) + for (Iterator i = withParams.iterator(); i.hasNext(); ) { - for (Iterator i = withParams.iterator(); i.hasNext(); ) - { - if (((WithParam) i.next()).references(var)) - return true; - } + if (((WithParam) i.next()).references(var)) + return true; } return super.references(var); } public String toString() { - StringBuffer buf = new StringBuffer("call-template"); + CPStringBuilder buf = new CPStringBuilder("call-template"); buf.append('['); buf.append("name="); buf.append(name); diff --git a/libjava/classpath/gnu/xml/transform/ChooseNode.java b/libjava/classpath/gnu/xml/transform/ChooseNode.java index cf07fa54b07..fe2dc0c2f3a 100644 --- a/libjava/classpath/gnu/xml/transform/ChooseNode.java +++ b/libjava/classpath/gnu/xml/transform/ChooseNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import javax.xml.namespace.QName; import javax.xml.transform.TransformerException; import org.w3c.dom.Node; @@ -77,7 +79,7 @@ final class ChooseNode public String toString() { - StringBuffer buf = new StringBuffer("choose"); + CPStringBuilder buf = new CPStringBuilder("choose"); buf.append('['); buf.append(']'); return buf.toString(); diff --git a/libjava/classpath/gnu/xml/transform/CopyNode.java b/libjava/classpath/gnu/xml/transform/CopyNode.java index 64cfa519158..bae628d9632 100644 --- a/libjava/classpath/gnu/xml/transform/CopyNode.java +++ b/libjava/classpath/gnu/xml/transform/CopyNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.Iterator; import java.util.StringTokenizer; import javax.xml.namespace.QName; @@ -152,7 +154,7 @@ final class CopyNode public String toString() { - StringBuffer buf = new StringBuffer("copy"); + CPStringBuilder buf = new CPStringBuilder("copy"); if (uas != null) { buf.append('['); diff --git a/libjava/classpath/gnu/xml/transform/CopyOfNode.java b/libjava/classpath/gnu/xml/transform/CopyOfNode.java index ed4358c90b6..4ce84329fc0 100644 --- a/libjava/classpath/gnu/xml/transform/CopyOfNode.java +++ b/libjava/classpath/gnu/xml/transform/CopyOfNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -161,7 +163,7 @@ final class CopyOfNode public String toString() { - StringBuffer buf = new StringBuffer("copy-of"); + CPStringBuilder buf = new CPStringBuilder("copy-of"); buf.append('['); buf.append("select="); buf.append(select); diff --git a/libjava/classpath/gnu/xml/transform/ElementNode.java b/libjava/classpath/gnu/xml/transform/ElementNode.java index b6a5c365b12..c5a4dd20da4 100644 --- a/libjava/classpath/gnu/xml/transform/ElementNode.java +++ b/libjava/classpath/gnu/xml/transform/ElementNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -238,7 +240,7 @@ final class ElementNode public String toString() { - StringBuffer buf = new StringBuffer("element"); + CPStringBuilder buf = new CPStringBuilder("element"); buf.append('['); buf.append("name="); if (namespace != null) diff --git a/libjava/classpath/gnu/xml/transform/ForEachNode.java b/libjava/classpath/gnu/xml/transform/ForEachNode.java index 25b824534c9..8908114ccf4 100644 --- a/libjava/classpath/gnu/xml/transform/ForEachNode.java +++ b/libjava/classpath/gnu/xml/transform/ForEachNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -57,9 +59,9 @@ final class ForEachNode { final Expr select; - final List sortKeys; + final List sortKeys; - ForEachNode(Expr select, List sortKeys) + ForEachNode(Expr select, List sortKeys) { this.select = select; this.sortKeys = sortKeys; @@ -67,10 +69,10 @@ final class ForEachNode TemplateNode clone(Stylesheet stylesheet) { - int len = sortKeys != null ? sortKeys.size() : 0; - List sortKeys2 = new ArrayList(len); + int len = sortKeys.size(); + List sortKeys2 = new ArrayList(len); for (int i = 0; i < len; i++) - sortKeys2.add(((Key) sortKeys.get(i)).clone(stylesheet)); + sortKeys2.add(sortKeys.get(i).clone(stylesheet)); TemplateNode ret = new ForEachNode(select.clone(stylesheet), sortKeys2); if (children != null) @@ -80,6 +82,7 @@ final class ForEachNode return ret; } + @Override void doApply(Stylesheet stylesheet, QName mode, Node context, int pos, int len, Node parent, Node nextSibling) @@ -94,26 +97,26 @@ final class ForEachNode //System.err.println(toString() + ": " + context+" -> "+ret); if (ret instanceof Collection) { - Collection ns = (Collection) ret; - List list = new ArrayList(ns); - if (sortKeys != null) - { - for (Iterator i = sortKeys.iterator(); i.hasNext(); ) - { - SortKey sortKey = (SortKey) i.next(); - sortKey.init(stylesheet, mode, context, pos, len, parent, - nextSibling); - } - Collections.sort(list, new XSLComparator(sortKeys)); - } - else + /* Suppression is safe, as we know context produces Collection */ + @SuppressWarnings("unchecked") + Collection ns = (Collection) ret; + List list = new ArrayList(ns); + if (!sortKeys.isEmpty()) + { + for (SortKey sortKey : sortKeys) + { + sortKey.init(stylesheet, mode, context, pos, len, parent, + nextSibling); + } + Collections.sort(list, new XSLComparator(sortKeys)); + } + else Collections.sort(list, documentOrderComparator); // Perform children for each node int l = list.size(); int p = 1; - for (Iterator i = list.iterator(); i.hasNext(); ) + for (Node node : list) { - Node node = (Node) i.next(); stylesheet.current = node; children.apply(stylesheet, mode, node, p++, l, @@ -129,24 +132,23 @@ final class ForEachNode parent, nextSibling); } + @Override public boolean references(QName var) { if (select != null && select.references(var)) return true; - if (sortKeys != null) + for (Iterator i = sortKeys.iterator(); i.hasNext(); ) { - for (Iterator i = sortKeys.iterator(); i.hasNext(); ) - { - if (((SortKey) i.next()).references(var)) - return true; - } + if (i.next().references(var)) + return true; } return super.references(var); } - + + @Override public String toString() { - StringBuffer buf = new StringBuffer("for-each"); + CPStringBuilder buf = new CPStringBuilder("for-each"); buf.append('['); buf.append("select="); buf.append(select); diff --git a/libjava/classpath/gnu/xml/transform/IfNode.java b/libjava/classpath/gnu/xml/transform/IfNode.java index 2a00d64ca82..eeb294138ba 100644 --- a/libjava/classpath/gnu/xml/transform/IfNode.java +++ b/libjava/classpath/gnu/xml/transform/IfNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import javax.xml.namespace.QName; import javax.xml.transform.TransformerException; import org.w3c.dom.Node; @@ -99,7 +101,7 @@ final class IfNode public String toString() { - StringBuffer buf = new StringBuffer("if"); + CPStringBuilder buf = new CPStringBuilder("if"); buf.append('['); buf.append("test="); buf.append(test); diff --git a/libjava/classpath/gnu/xml/transform/MessageNode.java b/libjava/classpath/gnu/xml/transform/MessageNode.java index 890d76f6b1c..a7eeeeef6ee 100644 --- a/libjava/classpath/gnu/xml/transform/MessageNode.java +++ b/libjava/classpath/gnu/xml/transform/MessageNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.logging.Logger; import javax.xml.namespace.QName; import javax.xml.transform.TransformerException; @@ -95,7 +97,7 @@ final class MessageNode public String toString() { - StringBuffer buf = new StringBuffer("message"); + CPStringBuilder buf = new CPStringBuilder("message"); if (terminate) { buf.append('['); diff --git a/libjava/classpath/gnu/xml/transform/ParameterNode.java b/libjava/classpath/gnu/xml/transform/ParameterNode.java index 8cd2677cf08..431fbd3b1ea 100644 --- a/libjava/classpath/gnu/xml/transform/ParameterNode.java +++ b/libjava/classpath/gnu/xml/transform/ParameterNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.util.Collections; import javax.xml.namespace.QName; import javax.xml.transform.TransformerException; @@ -53,7 +55,7 @@ import gnu.xml.xpath.Expr; */ final class ParameterNode extends TemplateNode - implements Comparable + implements Comparable { final QName name; @@ -67,11 +69,12 @@ final class ParameterNode this.type = type; } - TemplateNode clone(Stylesheet stylesheet) + @Override + ParameterNode clone(Stylesheet stylesheet) { - TemplateNode ret = new ParameterNode(name, - select.clone(stylesheet), - type); + ParameterNode ret = new ParameterNode(name, + select == null ? null : select.clone(stylesheet), + type); if (children != null) ret.children = children.clone(stylesheet); if (next != null) @@ -129,26 +132,22 @@ final class ParameterNode return super.references(var); } - public int compareTo(Object other) + public int compareTo(ParameterNode pn) { - if (other instanceof ParameterNode) - { - ParameterNode pn = (ParameterNode) other; - boolean r1 = references(pn.name); - boolean r2 = pn.references(name); - if (r1 && r2) - throw new IllegalArgumentException("circular definitions"); - if (r1) - return 1; - if (r2) - return -1; - } + boolean r1 = references(pn.name); + boolean r2 = pn.references(name); + if (r1 && r2) + throw new IllegalArgumentException("circular definitions"); + if (r1) + return 1; + if (r2) + return -1; return 0; } public String toString() { - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); switch (type) { case Bindings.VARIABLE: @@ -164,11 +163,8 @@ final class ParameterNode buf.append('['); buf.append("name="); buf.append(name); - if (select != null) - { - buf.append(",select="); - buf.append(select); - } + buf.append(",select="); + buf.append(select); buf.append(']'); return buf.toString(); } diff --git a/libjava/classpath/gnu/xml/transform/ProcessingInstructionNode.java b/libjava/classpath/gnu/xml/transform/ProcessingInstructionNode.java index bf61fc03880..655f51f0130 100644 --- a/libjava/classpath/gnu/xml/transform/ProcessingInstructionNode.java +++ b/libjava/classpath/gnu/xml/transform/ProcessingInstructionNode.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import javax.xml.namespace.QName; import javax.xml.transform.TransformerException; import org.w3c.dom.Document; @@ -105,7 +107,7 @@ final class ProcessingInstructionNode public String toString() { - StringBuffer buf = new StringBuffer("processing-instruction"); + CPStringBuilder buf = new CPStringBuilder("processing-instruction"); buf.append('['); buf.append("name="); buf.append(name); diff --git a/libjava/classpath/gnu/xml/transform/SortKey.java b/libjava/classpath/gnu/xml/transform/SortKey.java index d4ffb05e224..72934a5b750 100644 --- a/libjava/classpath/gnu/xml/transform/SortKey.java +++ b/libjava/classpath/gnu/xml/transform/SortKey.java @@ -45,7 +45,22 @@ import org.w3c.dom.Node; import gnu.xml.xpath.Expr; /** - * An XSL sort key. + *

    + * An XSL sort key, as specified by section 10 of the XSL + * Transformations specification. This takes the form: + *

    + *
    + * <xsl:sort
    + * select = string-expression
    + * lang = { nmtoken }
    + * data-type = { "text" | "number" | qname-but-not-ncname }
    + * order = { "ascending" | "descending" }
    + * case-order = { "upper-first" | "lower-first" } /&rt;
    + * 
    + *

    + * Note that all but the selection expression are optional, + * and so may be {@code null}. + *

    * * @author Chris Burdess */ @@ -67,6 +82,20 @@ final class SortKey transient boolean descending; transient int caseOrder; + /** + * Constructs a new {@link SortKey} to represent an <xsl:sort&rt; + * tag. + * + * @param select the XPath expression which selects the nodes to be sorted. + * @param lang the language of the sort keys or {@code null} if unspecified. + * @param dataType the data type of the strings. May be "string", "number", + * a QName or {@code null} if unspecified. + * @param order the ordering of the nodes, which may be "ascending", "descending" + * or {@code null} if unspecified. + * @param caseOrder the treatment of case when the data type is a string. This + * may be "upper-first", "lower-first" or {@code null} if + * unspecified. + */ SortKey(Expr select, TemplateNode lang, TemplateNode dataType, TemplateNode order, TemplateNode caseOrder) { @@ -176,4 +205,35 @@ final class SortKey return false; } + /** + * Provides a clone of this {@link SortKey}, using the given + * stylesheet as a context. + * + * @param stylesheet the stylesheet which provides context for the cloning. + * @return a clone of this instance. + */ + SortKey clone(Stylesheet stylesheet) + { + return new SortKey(select.clone(stylesheet), + langTemplate == null ? null : cloneAttributeValueTemplate(langTemplate, stylesheet), + dataTypeTemplate == null ? null : cloneAttributeValueTemplate(dataTypeTemplate, stylesheet), + orderTemplate == null ? null : cloneAttributeValueTemplate(orderTemplate, stylesheet), + caseOrderTemplate == null ? null : cloneAttributeValueTemplate(caseOrderTemplate, stylesheet)); + } + + /** + * Clones an attribute value template as created by + * {@link Stylesheet#parseAttributeValueTemplate(String, Node)}. + * The node may either by a literal node or an xsl:value-of expression. + * + * @param node the node to clone. + * @param stylesheet the stylesheet which provides context for the cloning. + * @return the cloned node. + */ + private TemplateNode cloneAttributeValueTemplate(TemplateNode node, Stylesheet stylesheet) + { + if (node instanceof ValueOfNode) + return ((ValueOfNode) node).clone(stylesheet); + return ((LiteralNode) node).clone(stylesheet); + } } diff --git a/libjava/classpath/gnu/xml/transform/StreamSerializer.java b/libjava/classpath/gnu/xml/transform/StreamSerializer.java index 35323e7353d..28996721884 100644 --- a/libjava/classpath/gnu/xml/transform/StreamSerializer.java +++ b/libjava/classpath/gnu/xml/transform/StreamSerializer.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -595,7 +597,7 @@ public class StreamSerializer if (!encoder.canEncode(text) || htmlNeedingEncoding) { // Check each character - StringBuffer buf = new StringBuffer(); + CPStringBuilder buf = new CPStringBuilder(); int len = text.length(); for (int i = 0; i < len; i++) { @@ -648,20 +650,20 @@ public class StreamSerializer String encode(String text, boolean encodeCtl, boolean inAttr) { int len = text.length(); - StringBuffer buf = null; + CPStringBuilder buf = null; for (int i = 0; i < len; i++) { char c = text.charAt(i); if (c == '<') { if (buf == null) - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); buf.append("<"); } else if (c == '>') { if (buf == null) - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); buf.append(">"); } else if (c == '&') @@ -675,14 +677,14 @@ public class StreamSerializer else { if (buf == null) - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); buf.append("&"); } } else if (c == '\'' && inAttr) { if (buf == null) - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); if (mode == Stylesheet.OUTPUT_HTML) // HTML does not define ', use character entity ref buf.append("'"); @@ -692,7 +694,7 @@ public class StreamSerializer else if (c == '"' && inAttr) { if (buf == null) - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); buf.append("""); } else if (encodeCtl) @@ -700,7 +702,7 @@ public class StreamSerializer if (c < 0x20) { if (buf == null) - buf = new StringBuffer(text.substring(0, i)); + buf = new CPStringBuilder(text.substring(0, i)); buf.append('&'); buf.append('#'); buf.append((int) c); diff --git a/libjava/classpath/gnu/xml/transform/Stylesheet.java b/libjava/classpath/gnu/xml/transform/Stylesheet.java index 41562c3c60a..30bd953495b 100644 --- a/libjava/classpath/gnu/xml/transform/Stylesheet.java +++ b/libjava/classpath/gnu/xml/transform/Stylesheet.java @@ -37,6 +37,8 @@ exception statement from your version. */ package gnu.xml.transform; +import gnu.java.lang.CPStringBuilder; + import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.ArrayList; @@ -108,18 +110,18 @@ class Stylesheet */ String version; - Collection extensionElementPrefixes; - Collection excludeResultPrefixes; + Collection extensionElementPrefixes; + Collection excludeResultPrefixes; /** * Set of element names for which we should strip whitespace. */ - Set stripSpace; + Set stripSpace; /** * Set of element names for which we should preserve whitespace. */ - Set preserveSpace; + Set preserveSpace; /** * Output options. @@ -132,34 +134,34 @@ class Stylesheet boolean outputStandalone; String outputPublicId; String outputSystemId; - Collection outputCdataSectionElements; + Collection outputCdataSectionElements; boolean outputIndent; String outputMediaType; /** * Keys. */ - Collection keys; + Collection keys; /** * Decimal formats. */ - Map decimalFormats; + Map decimalFormats; /** * Namespace aliases. */ - Map namespaceAliases; + Map namespaceAliases; /** * Attribute-sets. */ - List attributeSets; + List attributeSets; /** * Variables. */ - List variables; + List variables; /** * Variable and parameter bindings. @@ -169,7 +171,7 @@ class Stylesheet /** * Templates. */ - LinkedList templates; + LinkedList