From 5bf762459121cc397663d22498d62d71fa179ef6 Mon Sep 17 00:00:00 2001 From: doko Date: Sun, 3 Jun 2007 23:18:43 +0000 Subject: libjava/classpath/ChangeLog.gcj: 2007-05-31 Matthias Klose * javax/management/NotificationBroadcasterSupport.java (getNotificationInfo): Add cast. * native/jni/qt-peer/Makefile.am (AM_CXXFLAGS): Add libstdc++ include directories. * native/jni/qt-peer/Makefile.in: Regenerate. libjava/ChangeLog: 2007-06-03 Matthias Klose * java/io/natFileWin32.cc (setFilePermissions): New (stub only). _access: Handle EXEC query, stub only. 2007-06-03 Matthias Klose Merged from classpath: * gnu/java/nio/SelectorProviderImpl.java: Whitespace merge. * java/lang/System.java(inheritedChannel): New. * java/lang/Character.java: Remove stray`;'. * java/net/MulticastSocket.java: Merged. * java/text/DateFormatSymbols.java(getInstance): New, comment updates. * java/text/Collator.java(getInstance): Merged. * java/util/Calendar.java: New attributes ALL_STYLES, SHORT, LONG. getDisplayName, getDisplayNames: New. * java/util/logging/Logger.java: Merged. * Regenerate .class and .h files. 2007-06-03 Matthias Klose * java/io/File.java: Merge with classpath-0.95, new method setFilePermissions, new attribute EXEC. * java/io/natFilePosix.cc (setFilePermissions): New. _access: Handle EXEC query. * classpath/lib/java/io/File.class, java/io/File.h: Regenerate. 2007-06-03 Matthias Klose Imported GNU Classpath 0.95. * classpath/Makefile.in, classpath/native/jni/midi-dssi/Makefile.in, classpath/native/jni/classpath/Makefile.in, classpath/native/jni/Makefile.in, classpath/native/jni/gconf-peer/Makefile.in, classpath/native/jni/java-io/Makefile.in, classpath/native/jni/native-lib/Makefile.in, classpath/native/jni/java-util/Makefile.in, classpath/native/jni/midi-alsa/Makefile.in, classpath/native/jni/java-lang/Makefile.in, classpath/native/jni/java-nio/Makefile.in, classpath/native/jni/java-net/Makefile.in, classpath/native/jni/xmlj/Makefile.in, classpath/native/jni/qt-peer/Makefile.in, classpath/native/jni/gtk-peer/Makefile.in, classpath/native/Makefile.in, classpath/native/jawt/Makefile.in, classpath/native/fdlibm/Makefile.in, classpath/native/plugin/Makefile.in, classpath/resource/Makefile.in, classpath/scripts/Makefile.in, classpath/tools/Makefile.in, classpath/doc/Makefile.in, classpath/doc/api/Makefile.in, classpath/lib/Makefile.in, classpath/external/Makefile.in, classpath/external/jsr166/Makefile.in, classpath/external/sax/Makefile.in, classpath/external/w3c_dom/Makefile.in, classpath/external/relaxngDatatype/Makefile.in, classpath/include/Makefile.in, classpath/examples/Makefile.in: Regenerate. * classpath/config.guess, classpath/config.sub, classpath/ltmain.sh : Update. * classpath/configure, classpath/depcomp, classpath/missing, classpath/aclocal.m4, classpath/install-sh: Regenerate. * gnu/classpath/Configuration.java (CLASSPATH_VERSION): Now 0.95. * sources.am: Regenerate. * Makefile.in: Regenerate. * Update the .class files and generated CNI header files, add new .class and generated CNI header files. * Remove generated files for removed java source files: classpath/gnu/java/net/BASE64.java, classpath/gnu/java/security/util/Base64.java, classpath/gnu/java/awt/peer/gtk/GThreadMutex.java, classpath/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java, classpath/gnu/java/awt/font/autofit/Scaler.java, classpath/gnu/classpath/jdwp/util/Value.java, classpath/gnu/javax/net/ssl/Base64.java. * Remove empty directories. * Makefile.am(nat_source_files): Add natVMOperatingSystemMXBeanImpl.cc. * java/lang/Class.java(setAccessible): Merge from classpath. * java/util/Locale.java: Remove. * gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java, gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc: New. * gcj/javaprims.h: Update class declarations. * scripts/classes.pl: Update usage. * HACKING: Mention to build all peers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125302 138bc75d-0d04-0410-961f-82ee72b054a4 --- .../classpath/tools/appletviewer/TagParser.java | 2 +- .../tools/gnu/classpath/tools/getopt/package.html | 49 ---------------- .../tools/gnu/classpath/tools/jar/Creator.java | 14 ++--- .../tools/gnu/classpath/tools/jar/Indexer.java | 2 +- .../tools/gnu/classpath/tools/jar/Main.java | 2 +- .../tools/gnu/classpath/tools/jar/WorkSet.java | 4 +- .../gnu/classpath/tools/jarsigner/HashUtils.java | 4 +- .../gnu/classpath/tools/jarsigner/JarVerifier.java | 29 ++++------ .../tools/gnu/classpath/tools/jarsigner/Main.java | 8 +-- .../gnu/classpath/tools/jarsigner/Messages.java | 11 ++-- .../gnu/classpath/tools/jarsigner/SFHelper.java | 28 +++------- .../gnu/classpath/tools/jarsigner/package.html | 60 -------------------- .../gnu/classpath/tools/javah/PathOptionGroup.java | 7 +++ .../gnu/classpath/tools/keytool/CertReqCmd.java | 6 +- .../gnu/classpath/tools/keytool/ExportCmd.java | 6 +- .../tools/gnu/classpath/tools/keytool/ListCmd.java | 6 +- .../tools/gnu/classpath/tools/keytool/package.html | 65 ---------------------- .../classpath/tools/native2ascii/Native2ASCII.java | 5 +- .../gnu/classpath/tools/rmi/registry/package.html | 46 --------------- .../classpath/tools/rmid/ActivationSystemImpl.java | 2 +- .../gnu/classpath/tools/serialver/SerialVer.java | 6 +- 21 files changed, 64 insertions(+), 298 deletions(-) delete mode 100644 libjava/classpath/tools/gnu/classpath/tools/getopt/package.html delete mode 100644 libjava/classpath/tools/gnu/classpath/tools/jarsigner/package.html delete mode 100644 libjava/classpath/tools/gnu/classpath/tools/keytool/package.html delete mode 100644 libjava/classpath/tools/gnu/classpath/tools/rmi/registry/package.html (limited to 'libjava/classpath/tools/gnu') diff --git a/libjava/classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java b/libjava/classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java index b5bdca70f9b..56bb1bb87c5 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java +++ b/libjava/classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java @@ -130,7 +130,7 @@ public class TagParser { ArrayList allTags = new ArrayList(); if (document == null) - return null;; + return null; recurseDocument(document.getChildNodes()); diff --git a/libjava/classpath/tools/gnu/classpath/tools/getopt/package.html b/libjava/classpath/tools/gnu/classpath/tools/getopt/package.html deleted file mode 100644 index ce6d34a4370..00000000000 --- a/libjava/classpath/tools/gnu/classpath/tools/getopt/package.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - -GNU Classpath - gnu.classpath.tools.getopt - - -

This package contains a GNU-style command line option parser. It -handles short and long options, options with arguments (optionally -joined to the option text), and a "long option only" mode. It also -automatically handles --help output.

- - - diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java b/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java index 294549327a6..c1660b725e3 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java @@ -60,7 +60,7 @@ public class Creator extends Action { JarOutputStream outputStream; - HashSet writtenItems = new HashSet(); + HashSet writtenItems = new HashSet(); // The manifest to use, or null if we don't want a manifest. Manifest manifest; @@ -150,13 +150,13 @@ public class Creator } else { - InputStream inputStream = new FileInputStream(file); - writeFile(isDirectory, inputStream, filename, verbose); - inputStream.close(); + InputStream inputStream = new FileInputStream(file); + writeFile(isDirectory, inputStream, filename, verbose); + inputStream.close(); } } - private void addEntries(ArrayList result, Entry entry) + private void addEntries(ArrayList result, Entry entry) { if (entry.file.isDirectory()) { @@ -176,10 +176,10 @@ public class Creator result.add(entry); } - private ArrayList getAllEntries(Main parameters) + private ArrayList getAllEntries(Main parameters) { Iterator it = parameters.entries.iterator(); - ArrayList allEntries = new ArrayList(); + ArrayList allEntries = new ArrayList(); while (it.hasNext()) { Entry entry = (Entry) it.next(); diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/Indexer.java b/libjava/classpath/tools/gnu/classpath/tools/jar/Indexer.java index aae25f82166..401c6fb6a4e 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jar/Indexer.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jar/Indexer.java @@ -72,7 +72,7 @@ public class Indexer // Index the files in this jar. // The results look a little better if we keep them // in insertion order. - LinkedHashSet entries = new LinkedHashSet(); + LinkedHashSet entries = new LinkedHashSet(); Enumeration e = jf.entries(); while (e.hasMoreElements()) { diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/Main.java b/libjava/classpath/tools/gnu/classpath/tools/jar/Main.java index c3575bdefd5..d52028fefce 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jar/Main.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jar/Main.java @@ -80,7 +80,7 @@ public class Main File manifestFile; /** A list of Entry objects, each describing a file to write. */ - ArrayList entries = new ArrayList(); + ArrayList entries = new ArrayList(); /** Used only while parsing, holds the first argument for -C. */ String changedDirectory; diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/WorkSet.java b/libjava/classpath/tools/gnu/classpath/tools/jar/WorkSet.java index ff0b487861e..c085516c6f1 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jar/WorkSet.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jar/WorkSet.java @@ -44,13 +44,13 @@ import java.util.Iterator; public class WorkSet { - private HashSet allItems; + private HashSet allItems; private void initSet(ArrayList entries) { if (entries == null || entries.isEmpty()) return; - allItems = new HashSet(); + allItems = new HashSet(); Iterator it = entries.iterator(); while (it.hasNext()) { diff --git a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/HashUtils.java b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/HashUtils.java index a085ca0c943..c9921dd70b6 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/HashUtils.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/HashUtils.java @@ -1,5 +1,5 @@ /* Utils.java -- Utility methods for JAR file signing/verification - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -40,7 +40,7 @@ package gnu.classpath.tools.jarsigner; import gnu.classpath.Configuration; import gnu.java.security.hash.Sha160; -import gnu.java.security.util.Base64; +import gnu.java.util.Base64; import gnu.java.util.jar.JarUtils; import java.io.BufferedInputStream; diff --git a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/JarVerifier.java b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/JarVerifier.java index 663f6906a9b..8847441fa4e 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/JarVerifier.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/JarVerifier.java @@ -1,5 +1,5 @@ /* JarVerifier.java -- The verification handler of the gjarsigner tool - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -55,13 +55,12 @@ import gnu.java.util.jar.JarUtils; import java.io.IOException; import java.io.InputStream; import java.security.PublicKey; -import java.security.cert.Certificate; import java.security.cert.CRLException; +import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; @@ -84,7 +83,7 @@ public class JarVerifier /** The JAR file to verify. */ private JarFile jarFile; /** Map of jar entry names to their hash. */ - private Map entryHashes = new HashMap(); + private Map entryHashes = new HashMap(); JarVerifier(Main main) { @@ -101,7 +100,7 @@ public class JarVerifier jarFile = new JarFile(jarFileName); // 1. find all signature (.SF) files - List sfFiles = new ArrayList(); + List sfFiles = new ArrayList(); for (Enumeration e = jarFile.entries(); e.hasMoreElements(); ) { JarEntry je = (JarEntry) e.nextElement(); @@ -127,13 +126,10 @@ public class JarVerifier { int limit = sfFiles.size(); int count = 0; - for (Iterator it = sfFiles.iterator(); it.hasNext(); ) - { - String alias = (String) it.next(); - if (verifySF(alias)) - if (verifySFEntries(alias)) - count++; - } + for (String alias : sfFiles) + if (verifySF(alias)) + if (verifySFEntries(alias)) + count++; if (count == 0) System.out.println(Messages.getString("JarVerifier.3")); //$NON-NLS-1$ @@ -264,7 +260,7 @@ public class JarVerifier + JarUtils.SF_SUFFIX); InputStream in = jarFile.getInputStream(jarEntry); Attributes attr = new Attributes(); - Map entries = new HashMap(); + Map entries = new HashMap(); JarUtils.readSFManifest(attr, entries, in); // 2. The .SF file by default includes a header containing a hash of the @@ -287,11 +283,10 @@ public class JarVerifier // with the digest for this file in the manifest section. The digests // should be the same, or verification fails. if (! result) - for (Iterator it = entries.keySet().iterator(); it.hasNext();) + for (Entry me : entries.entrySet()) { - Entry me = (Entry) it.next(); - String name = (String) me.getKey(); - attr = (Attributes) me.getValue(); + String name = me.getKey(); + attr = me.getValue(); hash = attr.getValue(Main.DIGEST_ATTR); result = verifySFEntry(name, hash); if (! result) diff --git a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/Main.java b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/Main.java index 0cff2fd856a..cea521c7e38 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/Main.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/Main.java @@ -1,5 +1,5 @@ /* Main.java -- JAR signing and verification tool not unlike jarsigner - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -123,7 +123,7 @@ public class Main private CallbackHandler handler; /** The command line parser. */ private ToolParser cmdLineParser; - protected ArrayList fileAndAlias = new ArrayList();; + protected ArrayList fileAndAlias = new ArrayList(); private Main() { @@ -163,8 +163,6 @@ public class Main System.exit(result); } - // helper methods ----------------------------------------------------------- - /** * Read the command line arguments setting the tool's parameters in * preparation for the user desired action. @@ -568,7 +566,7 @@ public class Main alias = "mykey"; //$NON-NLS-1$ } else - alias = (String) fileAndAlias.get(1); + alias = fileAndAlias.get(1); } public void initializeParser() diff --git a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/Messages.java b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/Messages.java index d5b8760ee9d..f27f79eaeaf 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/Messages.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/Messages.java @@ -1,5 +1,5 @@ /* Messages.java -- I18N related helper class - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -58,7 +58,8 @@ class Messages private static final Logger log = Logger.getLogger(Messages.class.getName()); private static final String BUNDLE_NAME = "gnu.classpath.tools.jarsigner.messages"; private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); - private static final Map CACHED_FORMATS = new HashMap(5); + private static final Map CACHED_FORMATS = + new HashMap(5); private Messages() { @@ -79,15 +80,15 @@ class Messages public static String getFormattedString(String key, Object args) { - MessageFormat mf = (MessageFormat) CACHED_FORMATS.get(key); + MessageFormat mf = CACHED_FORMATS.get(key); if (mf == null) { String formatString = getString(key); if (formatString.startsWith("!")) return constructMessage(key, args); - mf = new MessageFormat(formatString); - CACHED_FORMATS.put(key, mf); + mf = new MessageFormat(formatString); + CACHED_FORMATS.put(key, mf); } // if the argument is not an array, then build one consisting of the diff --git a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/SFHelper.java b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/SFHelper.java index 83e87b84385..dc0f1993789 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/SFHelper.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/SFHelper.java @@ -1,5 +1,5 @@ /* SFHelper -- A .SF file helper - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -90,9 +90,6 @@ import java.security.cert.X509Certificate; */ public class SFHelper { - // Constants and fields - // -------------------------------------------------------------------------- - private static final Logger log = Logger.getLogger(SFHelper.class.getName()); private static final int READY = 0; private static final int STARTED = 1; @@ -106,13 +103,10 @@ public class SFHelper private JarFile jar; private Manifest manifest; private Attributes sfMainAttributes; - private Map sfEntries; + private Map sfEntries; private byte[] sfBytes; private HashUtils util; - // Constructor(s) - // -------------------------------------------------------------------------- - /** * @param jar the JAR archive the .SF file belongs to. */ @@ -124,12 +118,6 @@ public class SFHelper this.state = READY; } - // Class methods - // -------------------------------------------------------------------------- - - // Instance methods - // -------------------------------------------------------------------------- - /** * Writes the contents of the .SF file to the designated JAR * output stream. Line-endings are platform-independent and consist of the @@ -250,8 +238,8 @@ public class SFHelper if (Configuration.DEBUG) log.fine("\n" + Util.dumpString(signedSFBytes, "+++ signedSFBytes ")); //$NON-NLS-1$ //$NON-NLS-2$ - Set digestAlgorithms = new HashSet(); - List digestAlgorithm = new ArrayList(2); + Set digestAlgorithms = new HashSet(); + List digestAlgorithm = new ArrayList(2); DERValue derDigestAlgorithmOID = new DERValue(DER.OBJECT_IDENTIFIER, hashAlgorithmIdentifierSHA1); DERValue derDigestAlgorithmParams = new DERValue(DER.NULL, null); @@ -266,7 +254,7 @@ public class SFHelper X509CRL[] crls = null; - Set signerInfos = new HashSet(); + Set signerInfos = new HashSet(); X509Certificate cert = (X509Certificate) certificates[0]; try { @@ -322,8 +310,6 @@ public class SFHelper return this.manifest; } - // own methods -------------------------------------------------------------- - void startSigning() throws IOException { if (this.state != READY) @@ -333,7 +319,7 @@ public class SFHelper this.manifest = oldManifest == null ? new Manifest() : new Manifest(oldManifest); this.sfMainAttributes = new Attributes(); - this.sfEntries = new HashMap(); + this.sfEntries = new HashMap(); util = new HashUtils(); this.state = STARTED; @@ -368,7 +354,7 @@ public class SFHelper // hash the newly added 2-header block and add it as an attribute to .SF String sfHash = util.hashManifestEntry(name, hash); - Attributes sfAttributes = (Attributes) sfEntries.get(name); + Attributes sfAttributes = sfEntries.get(name); if (sfAttributes == null) { sfAttributes = new Attributes(); diff --git a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/package.html b/libjava/classpath/tools/gnu/classpath/tools/jarsigner/package.html deleted file mode 100644 index 50574ddb794..00000000000 --- a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/package.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - GNU Classpath - gnu.classpath.tools.jarsigner - - - -This package contains the classes that provide an implementation of the -Security Tool: jarsigner. The behaviour of these classes should -match that of the same tool provided in the RI version 1.4.2, except for the -following: - -
    -
  • The RI tool accepts -Jjavaoption options which it then passes to - the underlying JVM. This is because the RI tool acts as a wrapper - around the JVM launcher. -

    - This implementation DOES NOT support these options. -

  • -
- - diff --git a/libjava/classpath/tools/gnu/classpath/tools/javah/PathOptionGroup.java b/libjava/classpath/tools/gnu/classpath/tools/javah/PathOptionGroup.java index efb5f7a70b2..ea61eece751 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/javah/PathOptionGroup.java +++ b/libjava/classpath/tools/gnu/classpath/tools/javah/PathOptionGroup.java @@ -101,6 +101,13 @@ public class PathOptionGroup setPath(classpath, path); } }); + add(new Option("cp", "Set the class path", "PATH") + { + public void parsed(String path) throws OptionException + { + setPath(classpath, path); + } + }); add(new Option('I', "Add directory to class path", "DIR", true) { public void parsed(String path) throws OptionException diff --git a/libjava/classpath/tools/gnu/classpath/tools/keytool/CertReqCmd.java b/libjava/classpath/tools/gnu/classpath/tools/keytool/CertReqCmd.java index bdf3aac8f9e..327320ad1ff 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/keytool/CertReqCmd.java +++ b/libjava/classpath/tools/gnu/classpath/tools/keytool/CertReqCmd.java @@ -1,5 +1,5 @@ /* CertReqCmd.java -- The certreq command handler of the keytool - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -50,7 +50,7 @@ import gnu.java.security.der.DER; import gnu.java.security.der.DERReader; import gnu.java.security.der.DERValue; import gnu.java.security.der.DERWriter; -import gnu.java.security.util.Base64; +import gnu.java.util.Base64; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -293,7 +293,7 @@ class CertReqCmd extends Command byte[] derBytes = getCSR(aliasName, publicKey, (PrivateKey) privateKey); // 4. encode it in base-64 and write it to outStream - String encoded = Base64.encode(derBytes, 0, derBytes.length, true); + String encoded = Base64.encode(derBytes, 72); PrintWriter writer = new PrintWriter(outStream, true); writer.println("-----BEGIN NEW CERTIFICATE REQUEST-----"); //$NON-NLS-1$ writer.println(encoded); diff --git a/libjava/classpath/tools/gnu/classpath/tools/keytool/ExportCmd.java b/libjava/classpath/tools/gnu/classpath/tools/keytool/ExportCmd.java index a07edc6316f..e0f16542561 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/keytool/ExportCmd.java +++ b/libjava/classpath/tools/gnu/classpath/tools/keytool/ExportCmd.java @@ -1,5 +1,5 @@ /* ExportCmd.java -- The export command handler of the keytool - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -44,7 +44,7 @@ import gnu.classpath.tools.getopt.Option; import gnu.classpath.tools.getopt.OptionException; import gnu.classpath.tools.getopt.OptionGroup; import gnu.classpath.tools.getopt.Parser; -import gnu.java.security.util.Base64; +import gnu.java.util.Base64; import java.io.IOException; import java.io.PrintWriter; @@ -226,7 +226,7 @@ class ExportCmd extends Command byte[] derBytes = certificate.getEncoded(); if (rfc) { - String encoded = Base64.encode(derBytes, 0, derBytes.length, true); + String encoded = Base64.encode(derBytes, 72); PrintWriter pw = new PrintWriter(outStream, true); pw.println("-----BEGIN CERTIFICATE-----"); //$NON-NLS-1$ pw.println(encoded); diff --git a/libjava/classpath/tools/gnu/classpath/tools/keytool/ListCmd.java b/libjava/classpath/tools/gnu/classpath/tools/keytool/ListCmd.java index 7579c3f85c0..9c9f871cddd 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/keytool/ListCmd.java +++ b/libjava/classpath/tools/gnu/classpath/tools/keytool/ListCmd.java @@ -1,5 +1,5 @@ /* ListCmd.java -- The list command handler of the keytool - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -44,7 +44,7 @@ import gnu.classpath.tools.getopt.Option; import gnu.classpath.tools.getopt.OptionException; import gnu.classpath.tools.getopt.OptionGroup; import gnu.classpath.tools.getopt.Parser; -import gnu.java.security.util.Base64; +import gnu.java.util.Base64; import java.io.IOException; import java.io.PrintWriter; @@ -416,7 +416,7 @@ class ListCmd extends Command throws CertificateEncodingException { byte[] derBytes = certificate.getEncoded(); - String encoded = Base64.encode(derBytes, 0, derBytes.length, true); + String encoded = Base64.encode(derBytes, 72); writer.println(Messages.getString("ListCmd.43")); //$NON-NLS-1$ writer.println(encoded); writer.println(Messages.getString("ListCmd.44")); //$NON-NLS-1$ diff --git a/libjava/classpath/tools/gnu/classpath/tools/keytool/package.html b/libjava/classpath/tools/gnu/classpath/tools/keytool/package.html deleted file mode 100644 index c447b8d0187..00000000000 --- a/libjava/classpath/tools/gnu/classpath/tools/keytool/package.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - -GNU Classpath - gnu.classpath.tools.keytool - - - -This package contains the classes that provide an implementation of the -Security Tool: keytool. The behaviour of these classes should -match that of the same tool provided in the RI version 1.4.2, except for the -following: - -
    -
  • The RI tool accepts -Jjavaoption options which it then passes to - the underlying JVM. This is because the RI tool acts as a wrapper - around the JVM launcher. -

    - This implementation DOES NOT support these options. -

  • - -
  • The RI tool is capable of importing JDK-1.1 style identities. -

    - This implementation does not offer this feature. -

  • -
- - diff --git a/libjava/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java b/libjava/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java index 622de6056ce..35e9f481f94 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java +++ b/libjava/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java @@ -1,5 +1,5 @@ /* Native2ASCII.java - native2ascii program - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -143,7 +143,7 @@ public class Native2ASCII { char c = s.charAt(i); if (reversed - && i + 6 < s.length() + && i + 6 <= s.length() && s.charAt(i) == '\\' && s.charAt(i + 1) == 'u') { @@ -180,6 +180,5 @@ public class Native2ASCII public static void main(String[] args) { new Native2ASCII().run(args); - String encoding = System.getProperty("file.encoding"); //$NON-NLS-1$ } } diff --git a/libjava/classpath/tools/gnu/classpath/tools/rmi/registry/package.html b/libjava/classpath/tools/gnu/classpath/tools/rmi/registry/package.html deleted file mode 100644 index 71df83b614a..00000000000 --- a/libjava/classpath/tools/gnu/classpath/tools/rmi/registry/package.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - -GNU Classpath - gnu.classpath.tools.rmi.registry - - -

- - - diff --git a/libjava/classpath/tools/gnu/classpath/tools/rmid/ActivationSystemImpl.java b/libjava/classpath/tools/gnu/classpath/tools/rmid/ActivationSystemImpl.java index 390117a0527..402727ff350 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/rmid/ActivationSystemImpl.java +++ b/libjava/classpath/tools/gnu/classpath/tools/rmid/ActivationSystemImpl.java @@ -238,6 +238,6 @@ public class ActivationSystemImpl extends ActivationSystemTransient implements ClassNotFoundException { // Write no fields. - }; + } } diff --git a/libjava/classpath/tools/gnu/classpath/tools/serialver/SerialVer.java b/libjava/classpath/tools/gnu/classpath/tools/serialver/SerialVer.java index 21e0a805a6f..a8c526c82ef 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/serialver/SerialVer.java +++ b/libjava/classpath/tools/gnu/classpath/tools/serialver/SerialVer.java @@ -45,12 +45,12 @@ import java.util.StringTokenizer; public class SerialVer { // List of classes to load. - ArrayList classes = new ArrayList(); + ArrayList classes = new ArrayList(); // The class path to use. String classpath; // FIXME: taken from ClassLoader, should share it. - private static void addFileURL(ArrayList list, String file) + private static void addFileURL(ArrayList list, String file) { try { @@ -72,7 +72,7 @@ public class SerialVer { StringTokenizer tok = new StringTokenizer(classpath, File.pathSeparator, true); - ArrayList list = new ArrayList(); + ArrayList list = new ArrayList(); while (tok.hasMoreTokens()) { String s = tok.nextToken(); -- cgit v1.2.3