aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/tools/gnu
diff options
context:
space:
mode:
authorMatthias Klose <doko@gcc.gnu.org>2007-06-03 23:18:43 +0000
committerMatthias Klose <doko@gcc.gnu.org>2007-06-03 23:18:43 +0000
commite1bea0c0687c5f4551b3a6058ec37ce3705fa6cc (patch)
treea9c9e7d91c484d53fe154f9285fc57325572ce50 /libjava/classpath/tools/gnu
parentaf333b9a7f9e1cc1029bec56d48f2de63acdf686 (diff)
downloadgcc-e1bea0c0687c5f4551b3a6058ec37ce3705fa6cc.zip
gcc-e1bea0c0687c5f4551b3a6058ec37ce3705fa6cc.tar.gz
gcc-e1bea0c0687c5f4551b3a6058ec37ce3705fa6cc.tar.bz2
libjava/classpath/ChangeLog.gcj:
2007-05-31 Matthias Klose <doko@ubuntu.com> * 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 <doko@ubuntu.com> * java/io/natFileWin32.cc (setFilePermissions): New (stub only). _access: Handle EXEC query, stub only. 2007-06-03 Matthias Klose <doko@ubuntu.com> 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 <doko@ubuntu.com> * 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 <doko@ubuntu.com> 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. From-SVN: r125302
Diffstat (limited to 'libjava/classpath/tools/gnu')
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java2
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/getopt/package.html49
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java14
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jar/Indexer.java2
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jar/Main.java2
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jar/WorkSet.java4
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jarsigner/HashUtils.java4
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jarsigner/JarVerifier.java29
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jarsigner/Main.java8
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jarsigner/Messages.java11
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jarsigner/SFHelper.java28
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/jarsigner/package.html60
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/javah/PathOptionGroup.java7
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/keytool/CertReqCmd.java6
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/keytool/ExportCmd.java6
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/keytool/ListCmd.java6
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/keytool/package.html65
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java5
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/rmi/registry/package.html46
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/rmid/ActivationSystemImpl.java2
-rw-r--r--libjava/classpath/tools/gnu/classpath/tools/serialver/SerialVer.java6
21 files changed, 64 insertions, 298 deletions
diff --git a/libjava/classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java b/libjava/classpath/tools/gnu/classpath/tools/appletviewer/TagParser.java
index b5bdca7..56bb1bb 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 ce6d34a..0000000
--- a/libjava/classpath/tools/gnu/classpath/tools/getopt/package.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- package.html - describes classes in java.util package.
- Copyright (C) 2006 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. -->
-
-<html>
-<head><title>GNU Classpath - gnu.classpath.tools.getopt</title></head>
-
-<body>
-<p>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 <code>--help</code> output. </p>
-
-</body>
-</html>
diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java b/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java
index 2945493..c1660b7 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<String> writtenItems = new HashSet<String>();
// 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<Entry> result, Entry entry)
{
if (entry.file.isDirectory())
{
@@ -176,10 +176,10 @@ public class Creator
result.add(entry);
}
- private ArrayList getAllEntries(Main parameters)
+ private ArrayList<Entry> getAllEntries(Main parameters)
{
Iterator it = parameters.entries.iterator();
- ArrayList allEntries = new ArrayList();
+ ArrayList<Entry> allEntries = new ArrayList<Entry>();
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 aae25f8..401c6fb 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<String> entries = new LinkedHashSet<String>();
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 c3575bd..d52028f 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<Entry> entries = new ArrayList<Entry>();
/** 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 ff0b487..c085516 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<String> allItems;
private void initSet(ArrayList entries)
{
if (entries == null || entries.isEmpty())
return;
- allItems = new HashSet();
+ allItems = new HashSet<String>();
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 a085ca0..c9921dd 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 663f690..8847441 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<String, String> entryHashes = new HashMap<String, String>();
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<String> sfFiles = new ArrayList<String>();
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<String, Attributes> entries = new HashMap<String, Attributes>();
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<String, Attributes> 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 0cff2fd..cea521c 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<String> fileAndAlias = new ArrayList<String>();
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 d5b8760..f27f79e 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<String, MessageFormat> CACHED_FORMATS =
+ new HashMap<String, MessageFormat>(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 83e87b8..dc0f199 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<String, Attributes> 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 <code>.SF</code> 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<DERValue> digestAlgorithms = new HashSet<DERValue>();
+ List<DERValue> digestAlgorithm = new ArrayList<DERValue>(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<SignerInfo> signerInfos = new HashSet<SignerInfo>();
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<String, Attributes>();
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 50574dd..0000000
--- a/libjava/classpath/tools/gnu/classpath/tools/jarsigner/package.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- package.html - describes classes in gnu.classpath.tools.jarsigner
-
-Copyright (C) 2006 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. -->
-
-<html>
-<head>
- <title>GNU Classpath - gnu.classpath.tools.jarsigner</title>
-</head>
-
-<body>
-This package contains the classes that provide an implementation of the
-Security Tool: <code>jarsigner</code>. The behaviour of these classes should
-match that of the same tool provided in the RI version 1.4.2, except for the
-following:
-
-<ul>
- <li>The RI tool accepts -J<i>javaoption</i> options which it then passes to
- the underlying JVM. This is because the RI tool acts as a <i>wrapper</i>
- around the JVM launcher.
- <p>
- This implementation DOES NOT support these options.
- </li>
-</ul>
-</body>
-</html>
diff --git a/libjava/classpath/tools/gnu/classpath/tools/javah/PathOptionGroup.java b/libjava/classpath/tools/gnu/classpath/tools/javah/PathOptionGroup.java
index efb5f7a..ea61eec 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 bdf3aac..327320a 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 a07edc6..e0f1654 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 7579c3f..9c9f871 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 c447b8d0..0000000
--- a/libjava/classpath/tools/gnu/classpath/tools/keytool/package.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- package.html - describes classes in gnu.classpath.tools.keytool
-
-Copyright (C) 2006 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. -->
-
-<html>
-<head>
-<title>GNU Classpath - gnu.classpath.tools.keytool</title>
-</head>
-
-<body>
-This package contains the classes that provide an implementation of the
-Security Tool: <code>keytool</code>. The behaviour of these classes should
-match that of the same tool provided in the RI version 1.4.2, except for the
-following:
-
-<ul>
- <li>The RI tool accepts -J<i>javaoption</i> options which it then passes to
- the underlying JVM. This is because the RI tool acts as a <i>wrapper</i>
- around the JVM launcher.
- <p>
- This implementation DOES NOT support these options.
- </li>
-
- <li>The RI tool is capable of importing JDK-1.1 style <i>identities</i>.
- <p>
- This implementation does not offer this feature.
- </li>
-</ul>
-</body>
-</html>
diff --git a/libjava/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java b/libjava/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java
index 622de60..35e9f48 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 71df83b..0000000
--- a/libjava/classpath/tools/gnu/classpath/tools/rmi/registry/package.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<!-- package.html - describes classes in gnu.java.rmi.registry package.
- Copyright (C) 2005 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. -->
-
-<html>
-<head><title>GNU Classpath - gnu.classpath.tools.rmi.registry</title></head>
-
-<body>
-<p></p>
-
-</body>
-</html>
diff --git a/libjava/classpath/tools/gnu/classpath/tools/rmid/ActivationSystemImpl.java b/libjava/classpath/tools/gnu/classpath/tools/rmid/ActivationSystemImpl.java
index 390117a..402727f 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 21e0a805..a8c526c 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<String> classes = new ArrayList<String>();
// 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<URL> list, String file)
{
try
{
@@ -72,7 +72,7 @@ public class SerialVer
{
StringTokenizer tok = new StringTokenizer(classpath,
File.pathSeparator, true);
- ArrayList list = new ArrayList();
+ ArrayList<URL> list = new ArrayList<URL>();
while (tok.hasMoreTokens())
{
String s = tok.nextToken();