+2003-02-07 Mark Wielaard <mark@klomp.org>
+
+ * java/util/jar/JarFile.java (JarFile(String, boolean)): Read manifest
+ when verify is true.
+ (JarFile(File, boolean)): Likewise.
+ (manifestRead): Set manifestRead field correctly.
+
2003-02-07 Stephen Crawley <crawley@dstc.edu.au>
* java/math/BigDecimal(valueOf): fix DiagBigDecimal val008, val013
/* JarFile.java - Representation of a jar file
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
*/
private Manifest manifest;
- /** Wether to verify the manifest and all entries. */
+ /** Whether to verify the manifest and all entries. */
private boolean verify;
- /** Wether the has already been loaded. */
+ /** Whether the has already been loaded. */
private boolean manifestRead = false;
// Constructors
FileNotFoundException, IOException
{
super(fileName);
+ if (verify)
+ {
+ manifest = readManifest();
+ verify();
+ }
}
/**
IOException
{
super(file);
+ if (verify)
+ {
+ manifest = readManifest();
+ verify();
+ }
}
/**
FileNotFoundException, IOException, IllegalArgumentException
{
super(file, mode);
+ if (verify)
+ {
+ manifest = readManifest();
+ verify();
+ }
}
// Methods
if (manEntry != null)
{
InputStream in = super.getInputStream(manEntry);
+ manifestRead = true;
return new Manifest(in);
}
else
{
+ manifestRead = true;
return null;
}
}
catch (IOException ioe)
{
+ manifestRead = true;
return null;
}
}