harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r465279 - in /incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java: java/util/jar/ java/util/zip/ org/apache/harmony/archive/internal/nls/
Date Wed, 18 Oct 2006 15:51:37 GMT
Author: pyang
Date: Wed Oct 18 08:51:35 2006
New Revision: 465279

URL: http://svn.apache.org/viewvc?view=rev&rev=465279
Log:
Tidy up, fix compiler warnings

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarOutputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/InflaterInputStream.java
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java?view=diff&rev=465279&r1=465278&r2=465279
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Attributes.java
Wed Oct 18 08:51:35 2006
@@ -36,52 +36,50 @@
 
         private int hashCode;
 
-        public static final Name CLASS_PATH = new Name("Class-Path", false); //$NON-NLS-1$
+        public static final Name CLASS_PATH = new Name("Class-Path"); //$NON-NLS-1$
 
         public static final Name MANIFEST_VERSION = new Name(
-                "Manifest-Version", false); //$NON-NLS-1$
+                "Manifest-Version"); //$NON-NLS-1$
 
-        public static final Name MAIN_CLASS = new Name("Main-Class", false); //$NON-NLS-1$
+        public static final Name MAIN_CLASS = new Name("Main-Class"); //$NON-NLS-1$
 
         public static final Name SIGNATURE_VERSION = new Name(
-                "Signature-Version", false); //$NON-NLS-1$
+                "Signature-Version"); //$NON-NLS-1$
 
-        public static final Name CONTENT_TYPE = new Name("Content-Type", false); //$NON-NLS-1$
+        public static final Name CONTENT_TYPE = new Name("Content-Type"); //$NON-NLS-1$
 
-        public static final Name SEALED = new Name("Sealed", false); //$NON-NLS-1$
+        public static final Name SEALED = new Name("Sealed"); //$NON-NLS-1$
 
         public static final Name IMPLEMENTATION_TITLE = new Name(
-                "Implementation-Title", false); //$NON-NLS-1$
+                "Implementation-Title"); //$NON-NLS-1$
 
         public static final Name IMPLEMENTATION_VERSION = new Name(
-                "Implementation-Version", false); //$NON-NLS-1$
+                "Implementation-Version"); //$NON-NLS-1$
 
         public static final Name IMPLEMENTATION_VENDOR = new Name(
-                "Implementation-Vendor", false); //$NON-NLS-1$
+                "Implementation-Vendor"); //$NON-NLS-1$
 
         public static final Name SPECIFICATION_TITLE = new Name(
-                "Specification-Title", false); //$NON-NLS-1$
+                "Specification-Title"); //$NON-NLS-1$
 
         public static final Name SPECIFICATION_VERSION = new Name(
-                "Specification-Version", false); //$NON-NLS-1$
+                "Specification-Version"); //$NON-NLS-1$
 
         public static final Name SPECIFICATION_VENDOR = new Name(
-                "Specification-Vendor", false); //$NON-NLS-1$
+                "Specification-Vendor"); //$NON-NLS-1$
 
-        public static final Name EXTENSION_LIST = new Name("Extension-List", //$NON-NLS-1$
-                false);
+        public static final Name EXTENSION_LIST = new Name("Extension-List"); //$NON-NLS-1$
 
-        public static final Name EXTENSION_NAME = new Name("Extension-Name", //$NON-NLS-1$
-                false);
+        public static final Name EXTENSION_NAME = new Name("Extension-Name"); //$NON-NLS-1$
 
         public static final Name EXTENSION_INSTALLATION = new Name(
-                "Extension-Installation", false); //$NON-NLS-1$
+                "Extension-Installation"); //$NON-NLS-1$
 
         public static final Name IMPLEMENTATION_VENDOR_ID = new Name(
-                "Implementation-Vendor-Id", false); //$NON-NLS-1$
+                "Implementation-Vendor-Id"); //$NON-NLS-1$
 
         public static final Name IMPLEMENTATION_URL = new Name(
-                "Implementation-URL", false); //$NON-NLS-1$
+                "Implementation-URL"); //$NON-NLS-1$
 
         public Name(String s) {
             int i = s.length();
@@ -95,10 +93,6 @@
                     throw new IllegalArgumentException(s);
                 }
             }
-            name = s;
-        }
-
-        Name(String s, boolean ignored) {
             name = s;
         }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarOutputStream.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarOutputStream.java?view=diff&rev=465279&r1=465278&r2=465279
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarOutputStream.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarOutputStream.java
Wed Oct 18 08:51:35 2006
@@ -61,6 +61,7 @@
      * @exception IOException
      *                If an error occurs creating the JarOutputStream
      */
+    @SuppressWarnings("unused")
     public JarOutputStream(OutputStream os) throws IOException {
         super(os);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java?view=diff&rev=465279&r1=465278&r2=465279
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java
Wed Oct 18 08:51:35 2006
@@ -36,9 +36,9 @@
  * 
  */
 public class Manifest implements Cloneable {
-	private Attributes mainAttributes = new Attributes();
+	Attributes mainAttributes = new Attributes();
 
-	private HashMap<String, Attributes> entryAttributes = new HashMap<String, Attributes>();
+	HashMap<String, Attributes> entryAttributes = new HashMap<String, Attributes>();
 
 	private HashMap<String, byte[]> chunks;
 
@@ -141,7 +141,7 @@
 		private static final byte[] sepBuf = new byte[] { '\r', '\n' };
 
 		private static final Attributes.Name nameAttribute = new Attributes.Name(
-				"Name", false); //$NON-NLS-1$
+				"Name"); //$NON-NLS-1$
 
 		byte[] oneByte = new byte[1];
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/InflaterInputStream.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/InflaterInputStream.java?view=diff&rev=465279&r1=465278&r2=465279
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/InflaterInputStream.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/InflaterInputStream.java
Wed Oct 18 08:51:35 2006
@@ -258,7 +258,8 @@
 	 *            of no use
 	 */
 	@Override
-    public void mark(int readlimit) {
+    public void mark(@SuppressWarnings("unused")
+    int readlimit) {
 		// do nothing
 	}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java?view=diff&rev=465279&r1=465278&r2=465279
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/zip/ZipFile.java
Wed Oct 18 08:51:35 2006
@@ -39,7 +39,7 @@
 
 public class ZipFile implements ZipConstants {
 
-	private String fileName;
+	String fileName;
 
 	long descriptor = -1;
 
@@ -47,6 +47,7 @@
 
 	private int mode;
 	static {
+        System.loadLibrary("hyarchive"); //$NON-NLS-1$
 		ntvinit();
 	}
 
@@ -90,7 +91,7 @@
 				}
 			}
 			this.mode = mode;
-			openZip(fileName);
+			openZip();
 		} else {
             throw new IllegalArgumentException();
         }
@@ -108,10 +109,10 @@
 			security.checkRead(filename);
 		}
 		fileName = filename;
-		openZip(fileName);
+		openZip();
 	}
 
-	private void openZip(String filename) throws IOException {
+	private void openZip() throws IOException {
 		int result = openZipImpl(Util.getBytes(fileName));
 		if (result != 0) {
 			switch (result) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java?view=diff&rev=465279&r1=465278&r2=465279
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java
Wed Oct 18 08:51:35 2006
@@ -138,6 +138,7 @@
             try {
                 format = bundle.getString(msg);
             } catch (MissingResourceException e) {
+                //ignore
             }
         }
 
@@ -227,6 +228,7 @@
                         }
                     });
         } catch (MissingResourceException e) {
+            //ignore
         }
         return null;
     }



Mime
View raw message