From cd6d4007aa4f72b51756e4a571abf876fa3e3133 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Tue, 21 Oct 2008 17:55:01 +0000 Subject: re PR libgcj/37636 (java tools are unable to find resource files) 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. From-SVN: r141271 --- 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 ++- 33 files changed, 112 insertions(+), 63 deletions(-) (limited to 'libjava/classpath/javax/swing') diff --git a/libjava/classpath/javax/swing/AbstractButton.java b/libjava/classpath/javax/swing/AbstractButton.java index cb0f458..8764f6f 100644 --- a/libjava/classpath/javax/swing/AbstractButton.java +++ b/libjava/classpath/javax/swing/AbstractButton.java @@ -37,6 +37,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Component; import java.awt.Graphics; import java.awt.Image; @@ -2445,7 +2447,7 @@ public abstract class AbstractButton extends JComponent */ protected String paramString() { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(super.paramString()); sb.append(",defaultIcon="); if (getIcon() != null) diff --git a/libjava/classpath/javax/swing/JButton.java b/libjava/classpath/javax/swing/JButton.java index 878cfa6..705a863 100644 --- a/libjava/classpath/javax/swing/JButton.java +++ b/libjava/classpath/javax/swing/JButton.java @@ -37,6 +37,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import javax.accessibility.Accessible; import javax.accessibility.AccessibleContext; import javax.accessibility.AccessibleRole; @@ -225,7 +227,7 @@ public class JButton extends AbstractButton String superParam = super.paramString(); // 41 is the maximum number of chars which may be needed. - StringBuffer sb = new StringBuffer(41); + CPStringBuilder sb = new CPStringBuilder(41); sb.append(",defaultButton=").append(isDefaultButton()); sb.append(",defaultCapable=").append(defaultCapable); diff --git a/libjava/classpath/javax/swing/JComboBox.java b/libjava/classpath/javax/swing/JComboBox.java index fa6941c..74ff315 100644 --- a/libjava/classpath/javax/swing/JComboBox.java +++ b/libjava/classpath/javax/swing/JComboBox.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.ItemSelectable; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -1104,7 +1106,7 @@ public class JComboBox extends JComponent implements ItemSelectable, protected String paramString() { String superParamStr = super.paramString(); - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(",isEditable=").append(isEditable()); sb.append(",lightWeightPopupEnabled=").append(isLightWeightPopupEnabled()); sb.append(",maximumRowCount=").append(getMaximumRowCount()); diff --git a/libjava/classpath/javax/swing/JComponent.java b/libjava/classpath/javax/swing/JComponent.java index a22a92e..f712178 100644 --- a/libjava/classpath/javax/swing/JComponent.java +++ b/libjava/classpath/javax/swing/JComponent.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.applet.Applet; import java.awt.AWTEvent; import java.awt.Color; @@ -2405,7 +2407,7 @@ public abstract class JComponent extends Container implements Serializable */ protected String paramString() { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(super.paramString()); sb.append(",alignmentX=").append(getAlignmentX()); sb.append(",alignmentY=").append(getAlignmentY()); diff --git a/libjava/classpath/javax/swing/JDesktopPane.java b/libjava/classpath/javax/swing/JDesktopPane.java index 454870e..b068a29 100644 --- a/libjava/classpath/javax/swing/JDesktopPane.java +++ b/libjava/classpath/javax/swing/JDesktopPane.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Component; import java.beans.PropertyVetoException; @@ -306,7 +308,7 @@ public class JDesktopPane extends JLayeredPane implements Accessible protected String paramString() { String superParamStr = super.paramString(); - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(",isOptimizedDrawingPossible="); sb.append(isOptimizedDrawingEnabled()); sb.append(",desktopManager="); diff --git a/libjava/classpath/javax/swing/JFileChooser.java b/libjava/classpath/javax/swing/JFileChooser.java index a508b8f..b7615a5 100644 --- a/libjava/classpath/javax/swing/JFileChooser.java +++ b/libjava/classpath/javax/swing/JFileChooser.java @@ -37,6 +37,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Component; import java.awt.Frame; import java.awt.GraphicsEnvironment; @@ -1543,7 +1545,7 @@ public class JFileChooser extends JComponent implements Accessible */ protected String paramString() { - StringBuffer sb = new StringBuffer(super.paramString()); + CPStringBuilder sb = new CPStringBuilder(super.paramString()); sb.append(",approveButtonText="); if (approveButtonText != null) sb.append(approveButtonText); diff --git a/libjava/classpath/javax/swing/JFrame.java b/libjava/classpath/javax/swing/JFrame.java index e54d453..0c956b3 100644 --- a/libjava/classpath/javax/swing/JFrame.java +++ b/libjava/classpath/javax/swing/JFrame.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.AWTEvent; import java.awt.BorderLayout; import java.awt.Component; @@ -341,7 +343,7 @@ public class JFrame extends Frame */ protected String paramString() { - StringBuffer sb = new StringBuffer(super.paramString()); + CPStringBuilder sb = new CPStringBuilder(super.paramString()); sb.append(",defaultCloseOperation="); sb.append(SwingUtilities.convertWindowConstantToString( getDefaultCloseOperation())); diff --git a/libjava/classpath/javax/swing/JLabel.java b/libjava/classpath/javax/swing/JLabel.java index 721287b..2bbd1ee 100644 --- a/libjava/classpath/javax/swing/JLabel.java +++ b/libjava/classpath/javax/swing/JLabel.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Component; import java.awt.Font; import java.awt.FontMetrics; @@ -555,7 +557,7 @@ public class JLabel extends JComponent implements Accessible, SwingConstants */ protected String paramString() { - StringBuffer sb = new StringBuffer(super.paramString()); + CPStringBuilder sb = new CPStringBuilder(super.paramString()); sb.append(",defaultIcon="); if (icon != null) sb.append(icon); diff --git a/libjava/classpath/javax/swing/JList.java b/libjava/classpath/javax/swing/JList.java index ff1b239..bd74406 100644 --- a/libjava/classpath/javax/swing/JList.java +++ b/libjava/classpath/javax/swing/JList.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Color; import java.awt.Component; import java.awt.ComponentOrientation; @@ -2481,7 +2483,7 @@ public class JList extends JComponent implements Accessible, Scrollable */ protected String paramString() { - StringBuffer sb = new StringBuffer(super.paramString()); + CPStringBuilder sb = new CPStringBuilder(super.paramString()); sb.append(",fixedCellHeight=").append(getFixedCellHeight()); sb.append(",fixedCellWidth=").append(getFixedCellWidth()); sb.append(",selectionBackground="); diff --git a/libjava/classpath/javax/swing/JMenuBar.java b/libjava/classpath/javax/swing/JMenuBar.java index 73b409e..030fc4c 100644 --- a/libjava/classpath/javax/swing/JMenuBar.java +++ b/libjava/classpath/javax/swing/JMenuBar.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Component; import java.awt.Graphics; import java.awt.Insets; @@ -481,7 +483,7 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement */ protected String paramString() { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(super.paramString()); sb.append(",margin="); if (getMargin() != null) diff --git a/libjava/classpath/javax/swing/JPopupMenu.java b/libjava/classpath/javax/swing/JPopupMenu.java index 1ae8ada..ac1a9eb 100644 --- a/libjava/classpath/javax/swing/JPopupMenu.java +++ b/libjava/classpath/javax/swing/JPopupMenu.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Component; import java.awt.Dimension; import java.awt.Insets; @@ -767,7 +769,7 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement */ protected String paramString() { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(super.paramString()); sb.append(",label="); if (getLabel() != null) diff --git a/libjava/classpath/javax/swing/JProgressBar.java b/libjava/classpath/javax/swing/JProgressBar.java index ed2d008..b20b02a 100644 --- a/libjava/classpath/javax/swing/JProgressBar.java +++ b/libjava/classpath/javax/swing/JProgressBar.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Graphics; import java.beans.PropertyChangeEvent; @@ -786,7 +788,7 @@ public class JProgressBar extends JComponent implements SwingConstants, protected String paramString() { String superParamStr = super.paramString(); - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(",orientation="); if (orientation == HORIZONTAL) sb.append("HORIZONTAL"); diff --git a/libjava/classpath/javax/swing/JScrollBar.java b/libjava/classpath/javax/swing/JScrollBar.java index f55feb3..371bb60 100644 --- a/libjava/classpath/javax/swing/JScrollBar.java +++ b/libjava/classpath/javax/swing/JScrollBar.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Adjustable; import java.awt.Dimension; import java.awt.event.AdjustmentEvent; @@ -671,7 +673,7 @@ public class JScrollBar extends JComponent implements Adjustable, Accessible */ protected String paramString() { - StringBuffer sb = new StringBuffer(super.paramString()); + CPStringBuilder sb = new CPStringBuilder(super.paramString()); sb.append(",blockIncrement=").append(blockIncrement); sb.append(",orientation="); if (this.orientation == JScrollBar.HORIZONTAL) diff --git a/libjava/classpath/javax/swing/JSlider.java b/libjava/classpath/javax/swing/JSlider.java index 948a962..979707a 100644 --- a/libjava/classpath/javax/swing/JSlider.java +++ b/libjava/classpath/javax/swing/JSlider.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.MenuContainer; import java.awt.image.ImageObserver; import java.beans.PropertyChangeEvent; @@ -1104,7 +1106,7 @@ public class JSlider extends JComponent implements SwingConstants, Accessible, protected String paramString() { String superParamStr = super.paramString(); - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(",isInverted=").append(getInverted()); sb.append(",majorTickSpacing=").append(getMajorTickSpacing()); sb.append(",minorTickSpacing=").append(getMinorTickSpacing()); diff --git a/libjava/classpath/javax/swing/JSplitPane.java b/libjava/classpath/javax/swing/JSplitPane.java index fcdc1c0..5b6ec15 100644 --- a/libjava/classpath/javax/swing/JSplitPane.java +++ b/libjava/classpath/javax/swing/JSplitPane.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Component; import java.awt.Graphics; import java.beans.PropertyChangeEvent; @@ -597,7 +599,7 @@ public class JSplitPane extends JComponent implements Accessible { // FIXME: the next line can be restored once PR27208 is fixed String superParamStr = ""; //super.paramString(); - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append(",continuousLayout=").append(isContinuousLayout()); sb.append(",dividerSize=").append(getDividerSize()); sb.append(",lastDividerLocation=").append(getLastDividerLocation()); diff --git a/libjava/classpath/javax/swing/JTabbedPane.java b/libjava/classpath/javax/swing/JTabbedPane.java index c7244bf..79521be3 100644 --- a/libjava/classpath/javax/swing/JTabbedPane.java +++ b/libjava/classpath/javax/swing/JTabbedPane.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Color; import java.awt.Component; import java.awt.Point; @@ -1692,7 +1694,7 @@ public class JTabbedPane extends JComponent implements Serializable, */ protected String paramString() { - StringBuffer sb = new StringBuffer(super.paramString()); + CPStringBuilder sb = new CPStringBuilder(super.paramString()); sb.append(",tabPlacement="); if (tabPlacement == TOP) sb.append("TOP"); diff --git a/libjava/classpath/javax/swing/JToolBar.java b/libjava/classpath/javax/swing/JToolBar.java index fe4d2ae..33ebcfc 100644 --- a/libjava/classpath/javax/swing/JToolBar.java +++ b/libjava/classpath/javax/swing/JToolBar.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Component; import java.awt.Container; import java.awt.Dimension; @@ -766,7 +768,7 @@ public class JToolBar extends JComponent implements SwingConstants, Accessible */ protected String paramString() { - StringBuffer sb = new StringBuffer(super.paramString()); + CPStringBuilder sb = new CPStringBuilder(super.paramString()); sb.append(",floatable=").append(floatable); sb.append(",margin="); if (margin != null) diff --git a/libjava/classpath/javax/swing/JToolTip.java b/libjava/classpath/javax/swing/JToolTip.java index 16bdd2d..f59ec95 100644 --- a/libjava/classpath/javax/swing/JToolTip.java +++ b/libjava/classpath/javax/swing/JToolTip.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.AWTEvent; import java.beans.PropertyChangeEvent; @@ -179,7 +181,7 @@ public class JToolTip extends JComponent implements Accessible */ protected String paramString() { - StringBuffer sb = new StringBuffer(super.paramString()); + CPStringBuilder sb = new CPStringBuilder(super.paramString()); sb.append(",tiptext="); if (text != null) sb.append(text); diff --git a/libjava/classpath/javax/swing/UIManager.java b/libjava/classpath/javax/swing/UIManager.java index 3b1b3f7..0369b65 100644 --- a/libjava/classpath/javax/swing/UIManager.java +++ b/libjava/classpath/javax/swing/UIManager.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing; +import gnu.java.lang.CPStringBuilder; + import java.awt.Color; import java.awt.Dimension; import java.awt.Font; @@ -107,7 +109,7 @@ public class UIManager implements Serializable */ public String toString() { - StringBuffer s = new StringBuffer(); + CPStringBuilder s = new CPStringBuilder(); s.append(getClass().getName()); s.append('['); s.append(getName()); diff --git a/libjava/classpath/javax/swing/event/EventListenerList.java b/libjava/classpath/javax/swing/event/EventListenerList.java index 1568039..8c76f7f 100644 --- a/libjava/classpath/javax/swing/event/EventListenerList.java +++ b/libjava/classpath/javax/swing/event/EventListenerList.java @@ -37,6 +37,8 @@ exception statement from your version. */ package javax.swing.event; +import gnu.java.lang.CPStringBuilder; + import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; @@ -295,7 +297,7 @@ public class EventListenerList */ public String toString() { - StringBuffer buf = new StringBuffer("EventListenerList: "); + CPStringBuilder buf = new CPStringBuilder("EventListenerList: "); buf.append(listenerList.length / 2); buf.append(" listeners: "); for (int i = 0; i < listenerList.length; i += 2) diff --git a/libjava/classpath/javax/swing/table/AbstractTableModel.java b/libjava/classpath/javax/swing/table/AbstractTableModel.java index 66b6a074..743e5d4 100644 --- a/libjava/classpath/javax/swing/table/AbstractTableModel.java +++ b/libjava/classpath/javax/swing/table/AbstractTableModel.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing.table; +import gnu.java.lang.CPStringBuilder; + import java.io.Serializable; import java.util.EventListener; @@ -80,7 +82,7 @@ public abstract class AbstractTableModel implements TableModel, Serializable */ public String getColumnName(int columnIndex) { - StringBuffer buffer = new StringBuffer(); + CPStringBuilder buffer = new CPStringBuilder(); while (columnIndex >= 0) { buffer.insert(0, (char) ('A' + columnIndex % 26)); diff --git a/libjava/classpath/javax/swing/text/AbstractDocument.java b/libjava/classpath/javax/swing/text/AbstractDocument.java index 72178f8..29b20b3 100644 --- a/libjava/classpath/javax/swing/text/AbstractDocument.java +++ b/libjava/classpath/javax/swing/text/AbstractDocument.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing.text; +import gnu.java.lang.CPStringBuilder; + import java.awt.font.TextAttribute; import java.io.PrintStream; import java.io.Serializable; @@ -2013,7 +2015,7 @@ public abstract class AbstractDocument implements Document, Serializable */ public void dump(PrintStream stream, int indent) { - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); for (int i = 0; i < indent; ++i) b.append(' '); b.append('<'); diff --git a/libjava/classpath/javax/swing/text/DefaultEditorKit.java b/libjava/classpath/javax/swing/text/DefaultEditorKit.java index aa69dec..0d999a3 100644 --- a/libjava/classpath/javax/swing/text/DefaultEditorKit.java +++ b/libjava/classpath/javax/swing/text/DefaultEditorKit.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing.text; +import gnu.java.lang.CPStringBuilder; + import java.awt.Toolkit; import java.awt.event.ActionEvent; @@ -1634,7 +1636,7 @@ public class DefaultEditorKit extends EditorKit BufferedReader reader = new BufferedReader(in); String line; - StringBuffer content = new StringBuffer(); + CPStringBuilder content = new CPStringBuilder(); while ((line = reader.readLine()) != null) { diff --git a/libjava/classpath/javax/swing/text/DefaultStyledDocument.java b/libjava/classpath/javax/swing/text/DefaultStyledDocument.java index 341579e..8c70a8a 100644 --- a/libjava/classpath/javax/swing/text/DefaultStyledDocument.java +++ b/libjava/classpath/javax/swing/text/DefaultStyledDocument.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing.text; +import gnu.java.lang.CPStringBuilder; + import java.awt.Color; import java.awt.Font; import java.io.Serializable; @@ -374,7 +376,7 @@ public class DefaultStyledDocument extends AbstractDocument implements */ public String toString() { - StringBuilder b = new StringBuilder(); + CPStringBuilder b = new CPStringBuilder(); switch (type) { case StartTagType: @@ -2420,7 +2422,7 @@ public class DefaultStyledDocument extends AbstractDocument implements writeLock(); // First we collect the content to be inserted. - StringBuffer contentBuffer = new StringBuffer(); + CPStringBuilder contentBuffer = new CPStringBuilder(); for (int i = 0; i < data.length; i++) { // Collect all inserts into one so we can get the correct diff --git a/libjava/classpath/javax/swing/text/JTextComponent.java b/libjava/classpath/javax/swing/text/JTextComponent.java index 8e70fe2..24035e3 100644 --- a/libjava/classpath/javax/swing/text/JTextComponent.java +++ b/libjava/classpath/javax/swing/text/JTextComponent.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing.text; +import gnu.java.lang.CPStringBuilder; + import java.awt.AWTEvent; import java.awt.Color; import java.awt.Container; @@ -2016,7 +2018,7 @@ public abstract class JTextComponent extends JComponent d.putProperty(Document.StreamDescriptionProperty, streamDescription); } - StringBuffer b = new StringBuffer(); + CPStringBuilder b = new CPStringBuilder(); int c; // Read till -1 (EOF). diff --git a/libjava/classpath/javax/swing/text/MaskFormatter.java b/libjava/classpath/javax/swing/text/MaskFormatter.java index 581cceb..4ebf65b 100644 --- a/libjava/classpath/javax/swing/text/MaskFormatter.java +++ b/libjava/classpath/javax/swing/text/MaskFormatter.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing.text; +import gnu.java.lang.CPStringBuilder; + import java.text.ParseException; import javax.swing.JFormattedTextField; @@ -311,7 +313,7 @@ public class MaskFormatter extends DefaultFormatter private String convertStringToValue(String value) throws ParseException { - StringBuffer result = new StringBuffer(); + CPStringBuilder result = new CPStringBuilder(); char valueChar; boolean isPlaceHolder; @@ -447,7 +449,7 @@ public class MaskFormatter extends DefaultFormatter private String convertValueToString(String value) throws ParseException { - StringBuffer result = new StringBuffer(); + CPStringBuilder result = new CPStringBuilder(); char valueChar; boolean isPlaceHolder; diff --git a/libjava/classpath/javax/swing/text/TabSet.java b/libjava/classpath/javax/swing/text/TabSet.java index 0f2c8c7..c08a650 100644 --- a/libjava/classpath/javax/swing/text/TabSet.java +++ b/libjava/classpath/javax/swing/text/TabSet.java @@ -37,6 +37,8 @@ exception statement from your version. */ package javax.swing.text; +import gnu.java.lang.CPStringBuilder; + import java.io.Serializable; /** @@ -194,7 +196,7 @@ public class TabSet implements Serializable */ public String toString() { - StringBuffer sb = new StringBuffer(); + CPStringBuilder sb = new CPStringBuilder(); sb.append("[ "); for (int i = 0; i < tabs.length; ++i) { diff --git a/libjava/classpath/javax/swing/text/html/CSSParser.java b/libjava/classpath/javax/swing/text/html/CSSParser.java index 54a16bc..d49ac3a 100644 --- a/libjava/classpath/javax/swing/text/html/CSSParser.java +++ b/libjava/classpath/javax/swing/text/html/CSSParser.java @@ -163,11 +163,6 @@ class CSSParser private int pushedChar; /** - * Temporary place to hold identifiers. - */ - private StringBuffer unitBuffer; - - /** * Used to indicate blocks. */ private int[] unitStack; @@ -212,7 +207,6 @@ class CSSParser */ CSSParser() { - unitBuffer = new StringBuffer(); tokenBuffer = new char[10]; } diff --git a/libjava/classpath/javax/swing/text/html/HTMLWriter.java b/libjava/classpath/javax/swing/text/html/HTMLWriter.java index 44119c7..6cc23df 100644 --- a/libjava/classpath/javax/swing/text/html/HTMLWriter.java +++ b/libjava/classpath/javax/swing/text/html/HTMLWriter.java @@ -37,6 +37,8 @@ exception statement from your version. */ package javax.swing.text.html; +import gnu.java.lang.CPStringBuilder; + import java.io.IOException; import java.io.Writer; @@ -574,7 +576,7 @@ public class HTMLWriter protected void output(char[] chars, int off, int len) throws IOException { - StringBuffer strBuffer = new StringBuffer(); + CPStringBuilder strBuffer = new CPStringBuilder(); for (int i = 0; i < chars.length; i++) { @@ -1081,4 +1083,4 @@ public class HTMLWriter return ret_str; } // private String escapeCharHtmlEntity(char param_char) -} // public class HTMLWriter extends AbstractWriter \ No newline at end of file +} // public class HTMLWriter extends AbstractWriter diff --git a/libjava/classpath/javax/swing/text/html/StyleSheet.java b/libjava/classpath/javax/swing/text/html/StyleSheet.java index 01f19fd..08578c8 100644 --- a/libjava/classpath/javax/swing/text/html/StyleSheet.java +++ b/libjava/classpath/javax/swing/text/html/StyleSheet.java @@ -182,7 +182,7 @@ public class StyleSheet extends StyleContext */ private class CSSStyle extends SimpleAttributeSet - implements Style, Comparable + implements Style, Comparable { static final int PREC_UA = 0; @@ -229,9 +229,8 @@ public class StyleSheet extends StyleContext * Sorts the rule according to the style's precedence and the * selectors specificity. */ - public int compareTo(Object o) + public int compareTo(CSSStyle other) { - CSSStyle other = (CSSStyle) o; return other.precedence + other.selector.getSpecificity() - precedence - selector.getSpecificity(); } @@ -247,18 +246,18 @@ public class StyleSheet extends StyleContext /** * The linked style sheets stored. */ - private ArrayList linked; + private ArrayList linked; /** * Maps element names (selectors) to AttributSet (the corresponding style * information). */ - ArrayList css = new ArrayList(); + ArrayList css = new ArrayList(); /** * Maps selectors to their resolved styles. */ - private HashMap resolvedStyles; + private HashMap resolvedStyles; /** * Constructs a StyleSheet. @@ -267,7 +266,7 @@ public class StyleSheet extends StyleContext { super(); baseFontSize = 4; // Default font size from CSS - resolvedStyles = new HashMap(); + resolvedStyles = new HashMap(); } /** @@ -283,7 +282,7 @@ public class StyleSheet extends StyleContext { // Create list of the element and all of its parents, starting // with the bottommost element. - ArrayList path = new ArrayList(); + ArrayList path = new ArrayList(); Element el; AttributeSet atts; for (el = e; el != null; el = el.getParentElement()) @@ -295,7 +294,7 @@ public class StyleSheet extends StyleContext // We append the actual element after this loop. for (int i = count - 1; i > 0; i--) { - el = (Element) path.get(i); + el = path.get(i); atts = el.getAttributes(); Object name = atts.getAttribute(StyleConstants.NameAttribute); selector.append(name.toString()); @@ -322,7 +321,7 @@ public class StyleSheet extends StyleContext selector.append(' '); } selector.append(t.toString()); - el = (Element) path.get(0); + el = path.get(0); atts = el.getAttributes(); // For leaf elements, we have to fetch the tag specific attributes. if (el.isLeaf()) @@ -372,7 +371,7 @@ public class StyleSheet extends StyleContext */ private Style getResolvedStyle(String selector, List path, HTML.Tag tag) { - Style style = (Style) resolvedStyles.get(selector); + Style style = resolvedStyles.get(selector); if (style == null) style = resolveStyle(selector, path, tag); return style; @@ -439,11 +438,9 @@ public class StyleSheet extends StyleContext { // FIXME: This style resolver is not correct. But it works good enough for // the default.css. - int count = tags.length; - ArrayList styles = new ArrayList(); - for (Iterator i = css.iterator(); i.hasNext();) + ArrayList styles = new ArrayList(); + for (CSSStyle style : css) { - CSSStyle style = (CSSStyle) i.next(); if (style.selector.matches(tags, attributes)) styles.add(style); } @@ -453,10 +450,10 @@ public class StyleSheet extends StyleContext { for (int i = linked.size() - 1; i >= 0; i--) { - StyleSheet ss = (StyleSheet) linked.get(i); + StyleSheet ss = linked.get(i); for (int j = ss.css.size() - 1; j >= 0; j--) { - CSSStyle style = (CSSStyle) ss.css.get(j); + CSSStyle style = ss.css.get(j); if (style.selector.matches(tags, attributes)) styles.add(style); } @@ -615,7 +612,7 @@ public class StyleSheet extends StyleContext if (linked != null) { linkedSS = new StyleSheet[linked.size()]; - linkedSS = (StyleSheet[]) linked.toArray(linkedSS); + linkedSS = linked.toArray(linkedSS); } else { @@ -1074,7 +1071,7 @@ public class StyleSheet extends StyleContext */ public void setBaseFontSize(String size) { - size.trim(); + size = size.trim(); int temp = 0; try { @@ -1446,8 +1443,8 @@ public class StyleSheet extends StyleContext */ private Map attributeSetToMap(AttributeSet atts) { - HashMap map = new HashMap(); - Enumeration keys = atts.getAttributeNames(); + HashMap map = new HashMap(); + Enumeration keys = atts.getAttributeNames(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); diff --git a/libjava/classpath/javax/swing/text/html/ViewAttributeSet.java b/libjava/classpath/javax/swing/text/html/ViewAttributeSet.java index 25db89f..8838646 100644 --- a/libjava/classpath/javax/swing/text/html/ViewAttributeSet.java +++ b/libjava/classpath/javax/swing/text/html/ViewAttributeSet.java @@ -83,7 +83,7 @@ class ViewAttributeSet { styleSheet = ss; view = v; - ArrayList atts = new ArrayList(); + ArrayList atts = new ArrayList(); Element el = v.getElement(); AttributeSet elAtts = el.getAttributes(); @@ -93,7 +93,7 @@ class ViewAttributeSet if (el.isLeaf()) { - Enumeration n = elAtts.getAttributeNames(); + Enumeration n = elAtts.getAttributeNames(); while (n.hasMoreElements()) { Object key = n.nextElement(); @@ -115,7 +115,7 @@ class ViewAttributeSet } AttributeSet[] atts1 = new AttributeSet[atts.size()]; - atts1 = (AttributeSet[]) atts.toArray(atts1); + atts1 = atts.toArray(atts1); init(atts1); } diff --git a/libjava/classpath/javax/swing/tree/DefaultMutableTreeNode.java b/libjava/classpath/javax/swing/tree/DefaultMutableTreeNode.java index a1afe78..34a70c1 100644 --- a/libjava/classpath/javax/swing/tree/DefaultMutableTreeNode.java +++ b/libjava/classpath/javax/swing/tree/DefaultMutableTreeNode.java @@ -68,7 +68,7 @@ public class DefaultMutableTreeNode * children. */ public static final Enumeration EMPTY_ENUMERATION = - EmptyEnumeration.getInstance(); + new EmptyEnumeration(); /** * The parent of this node (possibly null). diff --git a/libjava/classpath/javax/swing/tree/DefaultTreeSelectionModel.java b/libjava/classpath/javax/swing/tree/DefaultTreeSelectionModel.java index 2bb0d00..b2806f2 100644 --- a/libjava/classpath/javax/swing/tree/DefaultTreeSelectionModel.java +++ b/libjava/classpath/javax/swing/tree/DefaultTreeSelectionModel.java @@ -38,6 +38,8 @@ exception statement from your version. */ package javax.swing.tree; +import gnu.java.lang.CPStringBuilder; + import java.beans.PropertyChangeListener; import java.io.IOException; import java.io.ObjectInputStream; @@ -224,7 +226,7 @@ public class DefaultTreeSelectionModel return "[selection empty]"; else { - StringBuffer b = new StringBuffer("selected rows: ["); + CPStringBuilder b = new CPStringBuilder("selected rows: ["); for (int i = 0; i < selection.length; i++) { b.append(getRow(selection[i])); -- cgit v1.1