harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r823120 - in /harmony/enhanced/classlib/trunk/modules/archive/src/main/java: java/util/jar/JarFile.java org/apache/harmony/archive/internal/nls/messages.properties
Date Thu, 08 Oct 2009 10:44:39 GMT
Author: tellison
Date: Thu Oct  8 10:44:38 2009
New Revision: 823120

URL: http://svn.apache.org/viewvc?rev=823120&view=rev
Log:
Externalize exception message.

Modified:
    harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java
    harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/messages.properties

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java?rev=823120&r1=823119&r2=823120&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java
Thu Oct  8 10:44:38 2009
@@ -28,6 +28,7 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 
+import org.apache.harmony.archive.internal.nls.Messages;
 import org.apache.harmony.archive.util.Util;
 
 /**
@@ -308,7 +309,7 @@
      */
     public Manifest getManifest() throws IOException {
         if (closed) {
-            throw new IllegalStateException("JarFile has been closed.");
+            throw new IllegalStateException(Messages.getString("archive.35")); //$NON-NLS-1$
         }
         if (manifest != null) {
             return manifest;
@@ -438,7 +439,8 @@
         Enumeration<? extends ZipEntry> allEntries = entries();
         while (allEntries.hasMoreElements()) {
             ZipEntry ze = allEntries.nextElement();
-            if (ze.getName().startsWith("META-INF/") && ze.getName().length() >
9) {
+            if (ze.getName().startsWith("META-INF/") && //$NON-NLS-1$
+                    ze.getName().length() > 9) {
                 list.add(ze);
             }
         }

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/messages.properties?rev=823120&r1=823119&r2=823120&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/messages.properties
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/org/apache/harmony/archive/internal/nls/messages.properties
Thu Oct  8 10:44:38 2009
@@ -67,4 +67,5 @@
 archive.31={0} failed verification of {1}
 archive.32={0} has invalid digest for {1} in {2}
 archive.33=A length of the encoded header name "{1}" exceeded maximum length {2}
-archive.34=A jar verifier does not support more than one entry with the same name  
+archive.34=A jar verifier does not support more than one entry with the same name
+archive.35=JarFile has been closed



Mime
View raw message