Warning Fixes from LJC Hack Session (original) (raw)

Michael Barker mikeb01 at gmail.com
Sat Feb 4 07:50:15 UTC 2012


I see Rémi has suggested a slice & dice but I think that's a bit too much work for the changes involved. Instead I would suggest a simple split, send the AWT/Printing/Beans changes to awt-dev + 2d-dev, and everything else to core-libs-dev.

Attached is the patch that contains "everthing else" from LJC warning fixes hack session.

Mike. -------------- next part -------------- diff -r 55a82eba1986 src/share/classes/java/util/jar/Attributes.java --- a/src/share/classes/java/util/jar/Attributes.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/java/util/jar/Attributes.java Sat Feb 04 07:39:48 2012 +0000 @@ -71,7 +71,7 @@ * @param size the initial number of attributes */ public Attributes(int size) {

@@ -81,7 +81,7 @@ * @param attr the specified Attributes */ public Attributes(Attributes attr) {

@@ -296,9 +296,9 @@ * XXX Need to handle UTF8 values and break up lines longer than 72 bytes */ void write(DataOutputStream os) throws IOException {

@@ -340,9 +340,9 @@

     // write out all attributes except for the version
     // we wrote out earlier

@@ -499,7 +499,7 @@ */ public boolean equals(Object o) { if (o instanceof Name) {

diff -r 55a82eba1986 src/share/classes/java/util/jar/JarVerifier.java --- a/src/share/classes/java/util/jar/JarVerifier.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/java/util/jar/JarVerifier.java Sat Feb 04 07:39:48 2012 +0000 @@ -48,21 +48,21 @@

 /* a table mapping names to code signers, for jar entries that have
    had their actual hashes verified */

@@ -94,10 +94,10 @@

 public JarVerifier(byte rawBytes[]) {
     manifestRawBytes = rawBytes;

@@ -270,7 +269,7 @@ String key = uname.substring(0, uname.lastIndexOf("."));

             if (signerCache == null)

@@ -287,7 +286,7 @@

             if (sfv.needSignatureFileBytes()) {
                 // see if we have already parsed an external .SF file

@@ -343,7 +342,7 @@ */ public CodeSigner[] getCodeSigners(String name) {

@@ -376,15 +375,14 @@ CodeSigner[] signers) {

     if (signers != null) {

@@ -418,8 +416,8 @@ // MANIFEST.MF is always treated as signed and verified, // move its signers from sigFileSigners to verifiedSigners. if (sigFileSigners.containsKey(JarFile.MANIFEST_NAME)) {

@@ -493,10 +491,10 @@

 // Extended JavaUtilJarAccess CodeSource API Support

@@ -504,19 +502,19 @@ * and shared JAR file although in practice there will be a single URL in use. */ private synchronized CodeSource mapSignersToCodeSource(URL url, CodeSigner[] signers) {

@@ -524,16 +522,16 @@ return cs; }

@@ -553,7 +551,7 @@ * but this handles a CodeSource of any type, just in case. */ CodeSource[] sources = mapSignersToCodeSources(cs.getLocation(), getJarCodeSigners(), true);

@@ -574,6 +572,7 @@ * signing data that can be compared by object reference identity. */ private static class VerifierCodeSource extends CodeSource {

@@ -641,16 +640,16 @@ return vcerts; } }

@@ -658,15 +657,15 @@ }

 public synchronized Enumeration<String> entryNames(JarFile jar, final CodeSource[] cs) {

@@ -678,8 +677,8 @@ } }

@@ -691,14 +690,14 @@ }

             while (itor.hasNext()) {

@@ -719,13 +718,13 @@ * Like entries() but screens out internal JAR mechanism entries * and includes signed entries with no ZIP data. */

@@ -744,7 +743,7 @@ signers = Collections.enumeration(map.keySet()); } while (signers.hasMoreElements()) {

@@ -764,7 +763,7 @@ } }; }

@@ -797,8 +796,8 @@ }

 private Enumeration<String> unsignedEntryNames(JarFile jar) {

@@ -836,14 +835,14 @@ } }; }

@@ -858,7 +857,7 @@ public CodeSource getCodeSource(URL url, String name) { CodeSigner[] signers;

diff -r 55a82eba1986 src/share/classes/sun/tools/jar/CommandLine.java --- a/src/share/classes/sun/tools/jar/CommandLine.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/sun/tools/jar/CommandLine.java Sat Feb 04 07:39:48 2012 +0000 @@ -55,7 +55,7 @@ public static String[] parse(String[] args) throws IOException {

@@ -69,10 +69,10 @@ newArgs.add(arg); } }

@@ -83,7 +83,7 @@ st.commentChar('#'); st.quoteChar('"'); st.quoteChar(''');

diff -r 55a82eba1986 src/share/classes/sun/tools/jar/Manifest.java --- a/src/share/classes/sun/tools/jar/Manifest.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/classes/sun/tools/jar/Manifest.java Sat Feb 04 07:39:48 2012 +0000 @@ -47,10 +47,10 @@ /* list of headers that all pertain to a particular * file in the archive */

@@ -115,14 +115,14 @@ }

 public MessageHeader getEntry(String name) {

@@ -214,7 +214,7 @@ /* the first header in the file should be the global one. * It should say "Manifest-Version: x.x"; if not add it */

@@ -238,7 +238,7 @@ globals.print(ps);

     for (int i = 1; i < entries.size(); ++i) {

@@ -98,7 +98,7 @@ * character in length. */ private SignatureFile(String name) throws JarException {

@@ -142,9 +142,9 @@ this(name, true);

     this.manifest = manifest;

@@ -269,9 +269,9 @@ *the entry does not exist. */ public MessageHeader getEntry(String name) {

@@ -282,13 +282,13 @@ /** * Returns the n-th entry. The global header is a entry 0. */ public MessageHeader entryAt(int n) {

@@ -322,11 +322,11 @@ } }

@@ -344,7 +344,7 @@ /* the first header in the file should be the global one. * It should say "SignatureFile-Version: x.x"; barf if not */

@@ -354,7 +354,7 @@ globals.print(ps);

     for (int i = 1; i < entries.size(); ++i) {

@@ -224,7 +224,7 @@ int i = 0; for ( ; i < MemUsage ; i++) { mfRect.setRect(x1+5,(float) y1+ssH+i*blockHeight,

@@ -232,13 +232,13 @@ big.setColor(Color.green); for ( ; i < 10; i++) { muRect.setRect(x1+5,(float) y1 + ssH+i*blockHeight,

@@ -347,8 +347,8 @@ big = bimg.createGraphics(); big.setFont(font); FontMetrics fm = big.getFontMetrics(font);

diff -r 55a82eba1986 src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileStore.java --- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileStore.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileStore.java Sat Feb 04 07:39:48 2012 +0000 @@ -61,7 +61,7 @@ private final ZipFileSystem zfs;

 ZipFileStore(ZipPath zpath) {

diff -r 55a82eba1986 src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java --- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java Sat Feb 04 07:39:48 2012 +0000 @@ -1609,7 +1609,7 @@ synchronized (inflaters) { int size = inflaters.size(); if (size > 0) {

@@ -1638,7 +1638,7 @@ synchronized (deflaters) { int size = deflaters.size(); if (size > 0) {

diff -r 55a82eba1986 src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java --- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystemProvider.java Sat Feb 04 07:39:48 2012 +0000 @@ -211,7 +211,7 @@ public V getFileAttributeView(Path path, Class type, LinkOption... options) {

diff -r 55a82eba1986 src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipInfo.java --- a/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipInfo.java Wed Feb 01 16:00:39 2012 -0800 +++ b/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipInfo.java Sat Feb 04 07:39:48 2012 +0000 @@ -78,12 +78,12 @@ // twice long len = LOCHDR + CENNAM(cen, pos) + CENEXT(cen, pos) + CENHDR; if (zfs.readFullyAt(buf, 0, len, locoff(cen, pos)) != len)



More information about the core-libs-dev mailing list