aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/jar/Manifest.java
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2002-06-18 15:40:16 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-06-18 15:40:16 +0000
commit3831381763ca5f41d6f7406d590e1e38a8531e1c (patch)
tree6b8dcd38b7dbb7c4c618080eb1958b6f042d581c /libjava/java/util/jar/Manifest.java
parent0fd534ed06e92a7232b2373321f113ee8dd482c4 (diff)
downloadgcc-3831381763ca5f41d6f7406d590e1e38a8531e1c.zip
gcc-3831381763ca5f41d6f7406d590e1e38a8531e1c.tar.gz
gcc-3831381763ca5f41d6f7406d590e1e38a8531e1c.tar.bz2
javaprims.h: Updated class declaration list.
* gcj/javaprims.h: Updated class declaration list. * Makefile.in: Rebuilt. * Makefile.am (core_java_source_files): Added PropertyPermissionCollection.java. * java/lang/Thread.java (group, name): Now package-private. * java/lang/ThreadGroup.java: Re-merge with Classpath. * java/util/AbstractList.java: Likewise. * java/util/AbstractMap.java: Likewise. * java/util/Calendar.java: Likewise. * java/util/Collections.java: Likewise. * java/util/HashMap.java: Likewise. * java/util/Hashtable.java: Likewise. * java/util/LinkedHashMap.java: Likewise. * java/util/LinkedList.java: Likewise. * java/util/List.java: Likewise. * java/util/ListResourceBundle.java: Likewise. * java/util/Map.java: Likewise. * java/util/Observable.java: Likewise. * java/util/Properties.java: Likewise. * java/util/PropertyPermission.java: Likewise. * java/util/PropertyPermissionCollection.java: Likewise. * java/util/PropertyResourceBundle.java: Likewise. * java/util/Random.java: Likewise. * java/util/SimpleTimeZone.java: Likewise. * java/util/StringTokenizer.java: Likewise. * java/util/TimerTask.java: Likewise. * java/util/TreeMap.java: Likewise. * java/util/WeakHashMap.java: Likewise. * java/util/jar/Attributes.java: Likewise. * java/util/jar/JarException.java: Likewise. * java/util/jar/Manifest.java: Likewise. From-SVN: r54743
Diffstat (limited to 'libjava/java/util/jar/Manifest.java')
-rw-r--r--libjava/java/util/jar/Manifest.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/libjava/java/util/jar/Manifest.java b/libjava/java/util/jar/Manifest.java
index 20220b1..9a15376 100644
--- a/libjava/java/util/jar/Manifest.java
+++ b/libjava/java/util/jar/Manifest.java
@@ -174,10 +174,19 @@ public class Manifest implements Cloneable
private static void read_main_section(Attributes attr,
BufferedReader br) throws IOException
{
- read_version_info(attr, br);
+ // According to the spec we should actually call read_version_info() here.
read_attributes(attr, br);
+ // Explicitly set Manifest-Version attribute if not set in Main
+ // attributes of Manifest.
+ if (attr.getValue(Attributes.Name.MANIFEST_VERSION) == null)
+ attr.putValue(Attributes.Name.MANIFEST_VERSION, "0.0");
}
+ /**
+ * Pedantic method that requires the next attribute in the Manifest to be
+ * the "Manifest-Version". This follows the Manifest spec closely but
+ * reject some jar Manifest files out in the wild.
+ */
private static void read_version_info(Attributes attr,
BufferedReader br) throws IOException
{
@@ -185,7 +194,7 @@ public class Manifest implements Cloneable
try
{
String value = expect_header(version_header, br);
- attr.putValue(version_header, value);
+ attr.putValue(Attributes.Name.MANIFEST_VERSION, value);
}
catch (IOException ioe)
{