2005-09-13 Anthony Green * javax/swing/plaf/basic/BasicFileChooserUI.java, javax/swing/filechooser/FileSystemView.java, java/util/logging/LogManager.java, gnu/xml/libxmlj/dom/GnomeDocument.java, gnu/xml/aelfred2/JAXPFactory.java, gnu/java/security/x509/ext/Extension.java, gnu/java/security/x509/ext/BasicConstraints.java, gnu/java/rmi/server/RMIObjectInputStream.java, gnu/java/rmi/dgc/DGCImpl_Stub.java, gnu/java/beans/decoder/BooleanHandler.java: Use Boolean.valueOf() instead of new Boolean. Index: gnu/java/beans/decoder/BooleanHandler.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/beans/decoder/BooleanHandler.java,v retrieving revision 1.2 diff -u -p -r1.2 BooleanHandler.java --- gnu/java/beans/decoder/BooleanHandler.java 2 Jul 2005 20:32:12 -0000 1.2 +++ gnu/java/beans/decoder/BooleanHandler.java 14 Sep 2005 07:00:11 -0000 @@ -57,10 +57,10 @@ class BooleanHandler extends SimpleHandl protected Object parse(String number) throws AssemblyException { if (number.equals("true")) - return new Boolean(true); + return Boolean.valueOf(true); if (number.equals("false")) - return new Boolean(false); + return Boolean.valueOf(false); throw new AssemblyException(new IllegalArgumentException("Element contained no valid boolean value.")); } Index: gnu/java/rmi/dgc/DGCImpl_Stub.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/rmi/dgc/DGCImpl_Stub.java,v retrieving revision 1.3 diff -u -p -r1.3 DGCImpl_Stub.java --- gnu/java/rmi/dgc/DGCImpl_Stub.java 2 Jul 2005 20:32:14 -0000 1.3 +++ gnu/java/rmi/dgc/DGCImpl_Stub.java 14 Sep 2005 07:00:12 -0000 @@ -81,7 +81,7 @@ public final class DGCImpl_Stub public void clean(java.rmi.server.ObjID[] $param_0, long $param_1, java.rmi.dgc.VMID $param_2, boolean $param_3) throws java.rmi.RemoteException { try { if (useNewInvoke) { - ref.invoke(this, $method_clean_0, new java.lang.Object[] {$param_0, new java.lang.Long($param_1), $param_2, new java.lang.Boolean($param_3)}, -5803803475088455571L); + ref.invoke(this, $method_clean_0, new java.lang.Object[] {$param_0, new java.lang.Long($param_1), $param_2, Boolean.valueOf($param_3)}, -5803803475088455571L); } else { java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject)this, operations, 0, interfaceHash); Index: gnu/java/rmi/server/RMIObjectInputStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/rmi/server/RMIObjectInputStream.java,v retrieving revision 1.8 diff -u -p -r1.8 RMIObjectInputStream.java --- gnu/java/rmi/server/RMIObjectInputStream.java 2 Jul 2005 20:32:14 -0000 1.8 +++ gnu/java/rmi/server/RMIObjectInputStream.java 14 Sep 2005 07:00:12 -0000 @@ -102,7 +102,7 @@ protected Class resolveProxyClass(String protected Object readValue(Class valueClass) throws IOException, ClassNotFoundException { if(valueClass.isPrimitive()){ if(valueClass == Boolean.TYPE) - return new Boolean(readBoolean()); + return Boolean.valueOf(readBoolean()); if(valueClass == Byte.TYPE) return new Byte(readByte()); if(valueClass == Character.TYPE) Index: gnu/java/security/x509/ext/BasicConstraints.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/security/x509/ext/BasicConstraints.java,v retrieving revision 1.3 diff -u -p -r1.3 BasicConstraints.java --- gnu/java/security/x509/ext/BasicConstraints.java 2 Jul 2005 20:32:14 -0000 1.3 +++ gnu/java/security/x509/ext/BasicConstraints.java 14 Sep 2005 07:00:13 -0000 @@ -112,7 +112,7 @@ public class BasicConstraints extends Ex if (encoded == null) { List bc = new ArrayList (2); - bc.add (new DERValue (DER.BOOLEAN, new Boolean (ca))); + bc.add (new DERValue (DER.BOOLEAN, Boolean.valueOf (ca))); if (pathLenConstraint >= 0) bc.add (new DERValue (DER.INTEGER, BigInteger.valueOf ((long) pathLenConstraint))); Index: gnu/java/security/x509/ext/Extension.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/java/security/x509/ext/Extension.java,v retrieving revision 1.3 diff -u -p -r1.3 Extension.java --- gnu/java/security/x509/ext/Extension.java 2 Jul 2005 20:32:14 -0000 1.3 +++ gnu/java/security/x509/ext/Extension.java 14 Sep 2005 07:00:13 -0000 @@ -232,7 +232,7 @@ public class Extension { List ext = new ArrayList (3); ext.add (new DERValue (DER.OBJECT_IDENTIFIER, oid)); - ext.add (new DERValue (DER.BOOLEAN, new Boolean (critical))); + ext.add (new DERValue (DER.BOOLEAN, Boolean.valueOf (critical))); ext.add (new DERValue (DER.OCTET_STRING, value.getEncoded())); return new DERValue (DER.CONSTRUCTED|DER.SEQUENCE, ext); } Index: gnu/xml/aelfred2/JAXPFactory.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/aelfred2/JAXPFactory.java,v retrieving revision 1.3 diff -u -p -r1.3 JAXPFactory.java --- gnu/xml/aelfred2/JAXPFactory.java 2 Jul 2005 20:32:15 -0000 1.3 +++ gnu/xml/aelfred2/JAXPFactory.java 14 Sep 2005 07:00:13 -0000 @@ -109,7 +109,7 @@ public final class JAXPFactory // (flags can't necessarily be set before parsing) new JaxpParser().getXMLReader().setFeature(name, value); - flags.put(name, new Boolean(value)); + flags.put(name, Boolean.valueOf(value)); } catch (SAXNotRecognizedException e) { Index: gnu/xml/libxmlj/dom/GnomeDocument.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/libxmlj/dom/GnomeDocument.java,v retrieving revision 1.3 diff -u -p -r1.3 GnomeDocument.java --- gnu/xml/libxmlj/dom/GnomeDocument.java 2 Jul 2005 20:32:16 -0000 1.3 +++ gnu/xml/libxmlj/dom/GnomeDocument.java 14 Sep 2005 07:00:14 -0000 @@ -376,31 +376,31 @@ public class GnomeDocument name = name.toLowerCase(); if ("canonical-form".equals(name)) { - return new Boolean(canonicalForm); + return Boolean.valueOf(canonicalForm); } else if ("cdata-sections".equals(name)) { - return new Boolean(cdataSections); + return Boolean.valueOf(cdataSections); } else if ("check-character-normalization".equals(name)) { - return new Boolean(checkCharacterNormalization); + return Boolean.valueOf(checkCharacterNormalization); } else if ("comments".equals(name)) { - return new Boolean(comments); + return Boolean.valueOf(comments); } else if ("datatype-normalization".equals(name)) { - return new Boolean(datatypeNormalization); + return Boolean.valueOf(datatypeNormalization); } else if ("element-content-whitespace".equals(name)) { - return new Boolean(elementContentWhitespace); + return Boolean.valueOf(elementContentWhitespace); } else if ("entities".equals(name)) { - return new Boolean(entities); + return Boolean.valueOf(entities); } else if ("error-handler".equals(name)) { @@ -408,43 +408,43 @@ public class GnomeDocument } else if ("infoset".equals(name)) { - return new Boolean(!validateIfSchema && - !entities && - !datatypeNormalization && - !cdataSections && - namespaceDeclarations && - wellFormed && - elementContentWhitespace && - comments && - namespaces); + return Boolean.valueOf(!validateIfSchema && + !entities && + !datatypeNormalization && + !cdataSections && + namespaceDeclarations && + wellFormed && + elementContentWhitespace && + comments && + namespaces); } else if ("namespaces".equals(name)) { - return new Boolean(namespaces); + return Boolean.valueOf(namespaces); } else if ("namespace-declarations".equals(name)) { - return new Boolean(namespaceDeclarations); + return Boolean.valueOf(namespaceDeclarations); } else if ("normalize-characters".equals(name)) { - return new Boolean(normalizeCharacters); + return Boolean.valueOf(normalizeCharacters); } else if ("split-cdata-sections".equals(name)) { - return new Boolean(splitCdataSections); + return Boolean.valueOf(splitCdataSections); } else if ("validate".equals(name)) { - return new Boolean(validate); + return Boolean.valueOf(validate); } else if ("validate-if-schema".equals(name)) { - return new Boolean(validateIfSchema); + return Boolean.valueOf(validateIfSchema); } else if ("well-formed".equals(name)) { - return new Boolean(wellFormed); + return Boolean.valueOf(wellFormed); } else { @@ -497,7 +497,7 @@ public class GnomeDocument } else if (value instanceof String) { - return new Boolean ((String) value).booleanValue(); + return Boolean.valueOf ((String) value).booleanValue(); } return false; } Index: java/util/logging/LogManager.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/logging/LogManager.java,v retrieving revision 1.15 diff -u -p -r1.15 LogManager.java --- java/util/logging/LogManager.java 14 Jul 2005 13:16:58 -0000 1.15 +++ java/util/logging/LogManager.java 14 Sep 2005 07:00:17 -0000 @@ -664,7 +664,7 @@ public class LogManager { try { - return (new Boolean(getLogManager().getProperty(name))).booleanValue(); + return (Boolean.valueOf(getLogManager().getProperty(name))).booleanValue(); } catch (Exception ex) { Index: javax/swing/filechooser/FileSystemView.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/filechooser/FileSystemView.java,v retrieving revision 1.6 diff -u -p -r1.6 FileSystemView.java --- javax/swing/filechooser/FileSystemView.java 8 Jul 2005 15:06:37 -0000 1.6 +++ javax/swing/filechooser/FileSystemView.java 14 Sep 2005 07:00:19 -0000 @@ -356,6 +356,6 @@ public abstract class FileSystemView // traversable. (No files are listed when you traverse the directory) // My best guess is that as long as it's a directory, the file is // traversable. - return new Boolean(f.isDirectory()); + return Boolean.valueOf(f.isDirectory()); } } Index: javax/swing/plaf/basic/BasicFileChooserUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicFileChooserUI.java,v retrieving revision 1.8 diff -u -p -r1.8 BasicFileChooserUI.java --- javax/swing/plaf/basic/BasicFileChooserUI.java 31 Aug 2005 20:00:46 -0000 1.8 +++ javax/swing/plaf/basic/BasicFileChooserUI.java 14 Sep 2005 07:00:20 -0000 @@ -276,7 +276,7 @@ public class BasicFileChooserUI extends */ public Boolean isHidden(File f) { - return new Boolean(filechooser.getFileSystemView().isHiddenFile(f)); + return Boolean.valueOf(filechooser.getFileSystemView().isHiddenFile(f)); } }