harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r909480 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal: net/www/protocol/file/ net/www/protocol/ftp/ net/www/protocol/http/ net/www/protocol/https/ net/www/protocol/jar/ nls/
Date Fri, 12 Feb 2010 16:19:09 GMT
Author: hindessm
Date: Fri Feb 12 16:19:08 2010
New Revision: 909480

URL: http://svn.apache.org/viewvc?rev=909480&view=rev
Log:
Refactor a few more nls messages.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/Handler.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Handler.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/Handler.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/Handler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/Handler.java?rev=909480&r1=909479&r2=909480&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/Handler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/file/Handler.java
Fri Feb 12 16:19:08 2010
@@ -23,7 +23,7 @@
 import java.net.URLConnection;
 import java.net.URLStreamHandler;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * This is the handler that is responsible for reading files from the file
@@ -66,8 +66,8 @@
     public URLConnection openConnection(URL url, Proxy proxy)
             throws IOException {
         if (null == url) {
-            // K034b=url and proxy can not be null
-            throw new IllegalArgumentException(Msg.getString("K034b")); //$NON-NLS-1$
+            // luni.1B=url and proxy can not be null
+            throw new IllegalArgumentException(Messages.getString("luni.1B")); //$NON-NLS-1$
         }
 
         String host = url.getHost();

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java?rev=909480&r1=909479&r2=909480&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/FtpURLConnection.java
Fri Feb 12 16:19:08 2010
@@ -42,7 +42,7 @@
 
 import org.apache.harmony.luni.internal.net.www.MimeTable;
 import org.apache.harmony.luni.net.NetUtil;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 public class FtpURLConnection extends URLConnection {
 
@@ -153,7 +153,7 @@
                 reply = getReply();
             }
             if (reply != FTP_FILEOK) {
-                throw new IOException(Msg.getString("K0094")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.1C")); //$NON-NLS-1$
             }
         }
     }
@@ -200,8 +200,8 @@
                 }
             }
             if (!connectOK) {
-                // K0097=Unable to connect to server\: {0}
-                throw new IOException(Msg.getString("K0097", failureReason)); //$NON-NLS-1$
+                // luni.1D=Unable to connect to server\: {0}
+                throw new IOException(Messages.getString("luni.1D", failureReason)); //$NON-NLS-1$
             }
         }
     }
@@ -247,7 +247,7 @@
             dataSocket.setSoTimeout(getReadTimeout());
             acceptSocket.close();
         } catch (InterruptedIOException e) {
-            throw new IOException(Msg.getString("K0095")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.1E")); //$NON-NLS-1$
         }
         if (getDoInput()) {
             inputStream = new FtpURLInputStream(new BufferedInputStream(
@@ -279,7 +279,7 @@
             reply = getReply();
         }
         if (!(reply == FTP_OPENDATA || reply == FTP_TRANSFEROK)) {
-            throw new FileNotFoundException(Msg.getString("K0096", reply)); //$NON-NLS-1$
+            throw new FileNotFoundException(Messages.getString("luni.1F", reply)); //$NON-NLS-1$
         }
     }
 
@@ -376,19 +376,19 @@
         reply = getReply();
         if (reply == FTP_USERREADY) {
         } else {
-            throw new IOException(Msg.getString("K0097", url.getHost())); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.1D", url.getHost())); //$NON-NLS-1$
         }
         write("USER " + username + "\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
         reply = getReply();
         if (reply == FTP_PASWD || reply == FTP_LOGGEDIN) {
         } else {
-            throw new IOException(Msg.getString("K0098", url.getHost())); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.20", url.getHost())); //$NON-NLS-1$
         }
         if (reply == FTP_PASWD) {
             write("PASS " + password + "\r\n"); //$NON-NLS-1$ //$NON-NLS-2$
             reply = getReply();
             if (!(reply == FTP_OK || reply == FTP_USERREADY || reply == FTP_LOGGEDIN)) {
-                throw new IOException(Msg.getString("K0098", url.getHost())); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.20", url.getHost())); //$NON-NLS-1$
             }
         }
     }
@@ -400,7 +400,7 @@
                 + (dataPort & 255)
                 + "\r\n"); //$NON-NLS-1$
         if (getReply() != FTP_OK) {
-            throw new IOException(Msg.getString("K0099")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.21")); //$NON-NLS-1$
         }
     }
 
@@ -438,7 +438,7 @@
                         url.getFile().length()) + "\r\n"); //$NON-NLS-1$
         reply = getReply();
         if (!(reply == FTP_OPENDATA || reply == FTP_OK || reply == FTP_DATAOPEN)) {
-            throw new IOException(Msg.getString("K009a")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.22")); //$NON-NLS-1$
         }
     }
 
@@ -494,7 +494,7 @@
     private void setType() throws IOException {
         write("TYPE I\r\n"); //$NON-NLS-1$
         if (getReply() != FTP_OK) {
-            throw new IOException(Msg.getString("K009b")); //$NON-NLS-1$
+            throw new IOException(Messages.getString("luni.23")); //$NON-NLS-1$
         }
     }
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/Handler.java?rev=909480&r1=909479&r2=909480&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/ftp/Handler.java
Fri Feb 12 16:19:08 2010
@@ -23,7 +23,7 @@
 import java.net.URLConnection;
 import java.net.URLStreamHandler;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 public class Handler extends URLStreamHandler {
     /**
@@ -57,7 +57,7 @@
     protected URLConnection openConnection(URL u, Proxy proxy)
             throws IOException {
         if (null == u || null == proxy) {
-            throw new IllegalArgumentException(Msg.getString("K034b")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.1B")); //$NON-NLS-1$
         }
         return new FtpURLConnection(u, proxy);
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Handler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Handler.java?rev=909480&r1=909479&r2=909480&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Handler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/Handler.java
Fri Feb 12 16:19:08 2010
@@ -23,7 +23,7 @@
 import java.net.URLConnection;
 import java.net.URLStreamHandler;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * This is the handler that manages all transactions between the client and a
@@ -70,7 +70,7 @@
     protected URLConnection openConnection(URL u, Proxy proxy)
             throws IOException {
         if (null == u || null == proxy) {
-            throw new IllegalArgumentException(Msg.getString("K034b")); //$NON-NLS-1$
+            throw new IllegalArgumentException(Messages.getString("luni.1B")); //$NON-NLS-1$
         }
         return new HttpURLConnectionImpl(u, getDefaultPort(), proxy);
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java?rev=909480&r1=909479&r2=909480&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/HttpURLConnectionImpl.java
Fri Feb 12 16:19:08 2010
@@ -50,7 +50,7 @@
 import java.util.TimeZone;
 
 import org.apache.harmony.luni.util.Base64;
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.PriviAction;
 
 /**
@@ -175,12 +175,12 @@
         public int read(byte[] buf, int offset, int length) throws IOException {
             // Force buf null check first, and avoid int overflow
             if (offset < 0 || offset > buf.length) {
-                // K002e=Offset out of bounds \: {0}
-                throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
//$NON-NLS-1$
+                // luni.12=Offset out of bounds \: {0}
+                throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset));
//$NON-NLS-1$
             }
             if (length < 0 || buf.length - offset < length) {
-                // K0031=Length out of bounds \: {0}
-                throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
//$NON-NLS-1$
+                // luni.18=Length out of bounds \: {0}
+                throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length));
//$NON-NLS-1$
             }
             if (bytesRemaining <= 0) {
                 disconnect(false);
@@ -296,12 +296,12 @@
         public int read(byte[] buf, int offset, int length) throws IOException {
             // Force buf null check first, and avoid int overflow
             if (offset > buf.length || offset < 0) {
-                // K002e=Offset out of bounds \: {0}
-                throw new ArrayIndexOutOfBoundsException(Msg.getString("K002e", offset));
//$NON-NLS-1$
+                // luni.12=Offset out of bounds \: {0}
+                throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.12", offset));
//$NON-NLS-1$
             }
             if (length < 0 || buf.length - offset < length) {
-                // K0031=Length out of bounds \: {0}
-                throw new ArrayIndexOutOfBoundsException(Msg.getString("K0031", length));
//$NON-NLS-1$
+                // luni.18=Length out of bounds \: {0}
+                throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.18", length));
//$NON-NLS-1$
             }
             if (bytesRemaining <= 0) {
                 readChunkSize();
@@ -431,7 +431,7 @@
         @Override
         public synchronized void flush() throws IOException {
             if (closed) {
-                throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
             }
             if (writeToSocket) {
                 sendCache(false);
@@ -447,7 +447,7 @@
             closed = true;
             if (writeToSocket) {
                 if (limit > 0) {
-                    throw new IOException(Msg.getString("K00a4")); //$NON-NLS-1$
+                    throw new IOException(Messages.getString("luni.25")); //$NON-NLS-1$
                 }
                 sendCache(closed);
             }
@@ -457,11 +457,11 @@
         @Override
         public synchronized void write(int data) throws IOException {
             if (closed) {
-                throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
             }
             if (limit >= 0) {
                 if (limit == 0) {
-                    throw new IOException(Msg.getString("K00b2")); //$NON-NLS-1$
+                    throw new IOException(Messages.getString("luni.26")); //$NON-NLS-1$
                 }
                 limit--;
             }
@@ -475,7 +475,7 @@
         public synchronized void write(byte[] buffer, int offset, int count)
                 throws IOException {
             if (closed) {
-                throw new IOException(Msg.getString("K0059")); //$NON-NLS-1$
+                throw new IOException(Messages.getString("luni.24")); //$NON-NLS-1$
             }
             if (buffer == null) {
                 throw new NullPointerException();
@@ -483,12 +483,12 @@
             // avoid int overflow
             if (offset < 0 || count < 0 || offset > buffer.length
                     || buffer.length - offset < count) {
-                throw new ArrayIndexOutOfBoundsException(Msg.getString("K002f")); //$NON-NLS-1$
+                throw new ArrayIndexOutOfBoundsException(Messages.getString("luni.13"));
//$NON-NLS-1$
             }
 
             if (limit >= 0) {
                 if (count > limit) {
-                    throw new IOException(Msg.getString("K00b2")); //$NON-NLS-1$
+                    throw new IOException(Messages.getString("luni.26")); //$NON-NLS-1$
                 }
                 limit -= count;
                 cache.write(buffer, offset, count);
@@ -859,7 +859,7 @@
     @Override
     public Map<String, List<String>> getRequestProperties() {
         if (connected) {
-            throw new IllegalStateException(Msg.getString("K0091")); //$NON-NLS-1$
+            throw new IllegalStateException(Messages.getString("luni.27")); //$NON-NLS-1$
         }
         return reqHeader.getFieldMap();
     }
@@ -867,7 +867,7 @@
     @Override
     public InputStream getInputStream() throws IOException {
         if (!doInput) {
-            throw new ProtocolException(Msg.getString("K008d")); //$NON-NLS-1$
+            throw new ProtocolException(Messages.getString("luni.28")); //$NON-NLS-1$
         }
 
         // connect before sending requests
@@ -911,12 +911,12 @@
     @Override
     public OutputStream getOutputStream() throws IOException {
         if (!doOutput) {
-            throw new ProtocolException(Msg.getString("K008e")); //$NON-NLS-1$
+            throw new ProtocolException(Messages.getString("luni.29")); //$NON-NLS-1$
         }
 
         // you can't write after you read
         if (sentRequest) {
-            throw new ProtocolException(Msg.getString("K0090")); //$NON-NLS-1$
+            throw new ProtocolException(Messages.getString("luni.2A")); //$NON-NLS-1$
         }
 
         if (os != null) {
@@ -930,7 +930,7 @@
 
         // If the request method is neither PUT or POST, then you're not writing
         if (method != PUT && method != POST) {
-            throw new ProtocolException(Msg.getString("K008f", method)); //$NON-NLS-1$
+            throw new ProtocolException(Messages.getString("luni.2B", method)); //$NON-NLS-1$
         }
 
         int limit = -1;
@@ -1266,7 +1266,7 @@
     @Override
     public void setRequestProperty(String field, String newValue) {
         if (connected) {
-            throw new IllegalStateException(Msg.getString("K0092")); //$NON-NLS-1$
+            throw new IllegalStateException(Messages.getString("luni.2C")); //$NON-NLS-1$
         }
         if (field == null) {
             throw new NullPointerException();
@@ -1277,7 +1277,7 @@
     @Override
     public void addRequestProperty(String field, String value) {
         if (connected) {
-            throw new IllegalAccessError(Msg.getString("K0092")); //$NON-NLS-1$
+            throw new IllegalAccessError(Messages.getString("luni.2C")); //$NON-NLS-1$
         }
         if (field == null) {
             throw new NullPointerException();
@@ -1374,16 +1374,16 @@
             // proxy authorization failed ?
             if (responseCode == HTTP_PROXY_AUTH) {
                 if (!usingProxy()) {
-                    // KA017=Received HTTP_PROXY_AUTH (407) code while not using
-                    // proxy
-                    throw new IOException(Msg.getString("KA017")); //$NON-NLS-1$
+                    // luni.2D=Received HTTP_PROXY_AUTH (407) code while not
+                    // using proxy
+                    throw new IOException(Messages.getString("luni.2D")); //$NON-NLS-1$
                 }
                 // username/password
                 // until authorized
                 String challenge = resHeader.get("Proxy-Authenticate"); //$NON-NLS-1$
                 if (challenge == null) {
-                    // KA016=Received authentication challenge is null.
-                    throw new IOException(Msg.getString("KA016")); //$NON-NLS-1$
+                    // luni.2E=Received authentication challenge is null.
+                    throw new IOException(Messages.getString("luni.2E")); //$NON-NLS-1$
                 }
                 // drop everything and reconnect, might not be required for
                 // HTTP/1.1
@@ -1405,8 +1405,8 @@
                 // keep asking for username/password until authorized
                 String challenge = resHeader.get("WWW-Authenticate"); //$NON-NLS-1$
                 if (challenge == null) {
-                    // KA018=Received authentication challenge is null
-                    throw new IOException(Msg.getString("KA018")); //$NON-NLS-1$
+                    // luni.2E=Received authentication challenge is null
+                    throw new IOException(Messages.getString("luni.2E")); //$NON-NLS-1$
                 }
                 // drop everything and reconnect, might not be required for
                 // HTTP/1.1
@@ -1436,7 +1436,7 @@
                         && os == null) {
 
                     if (++redirect > 4) {
-                        throw new ProtocolException(Msg.getString("K0093")); //$NON-NLS-1$
+                        throw new ProtocolException(Messages.getString("luni.2F")); //$NON-NLS-1$
                     }
                     String location = getHeaderField("Location"); //$NON-NLS-1$
                     if (location != null) {
@@ -1517,11 +1517,11 @@
             try {
                 hostPort = Integer.parseInt(port);
             } catch (NumberFormatException e) {
-                throw new IllegalArgumentException(Msg.getString("K00af", port)); //$NON-NLS-1$
+                throw new IllegalArgumentException(Messages.getString("luni.30", port));
//$NON-NLS-1$
             }
             if (hostPort < 0 || hostPort > 65535) {
-                throw new IllegalArgumentException(Msg.getString("K00b0")); //$NON-NLS-1$
+                throw new IllegalArgumentException(Messages.getString("luni.31")); //$NON-NLS-1$
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/Handler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/Handler.java?rev=909480&r1=909479&r2=909480&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/Handler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/Handler.java
Fri Feb 12 16:19:08 2010
@@ -23,7 +23,7 @@
 import java.net.URLConnection;
 import java.net.URLStreamHandler;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 
 /**
  * Handler for HttpsURLConnection implementation.
@@ -39,8 +39,8 @@
     protected URLConnection openConnection(URL url, Proxy proxy)
             throws IOException {
         if ((url == null) || (proxy == null)) {
-            // K034b=url and proxy can not be null
-            throw new IllegalArgumentException(Msg.getString("K034b")); //$NON-NLS-1$
+            // luni.1B=url and proxy can not be null
+            throw new IllegalArgumentException(Messages.getString("luni.1B")); //$NON-NLS-1$
         }
         return new HttpsURLConnectionImpl(url, getDefaultPort(), proxy);
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java?rev=909480&r1=909479&r2=909480&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/Handler.java
Fri Feb 12 16:19:08 2010
@@ -23,7 +23,7 @@
 import java.net.URLConnection;
 import java.net.URLStreamHandler;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.URLUtil;
 
 public class Handler extends URLStreamHandler {
@@ -68,7 +68,7 @@
             spec = ""; //$NON-NLS-1$
         }
         if (spec.indexOf("!/") == -1 && (file.indexOf("!/") == -1)) { //$NON-NLS-1$
//$NON-NLS-2$
-            throw new NullPointerException(Msg.getString("K01b6")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("luni.32")); //$NON-NLS-1$
         }
         if (file.equals("")) {
             file = spec;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java?rev=909480&r1=909479&r2=909480&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/jar/JarURLConnectionImpl.java
Fri Feb 12 16:19:08 2010
@@ -39,7 +39,7 @@
 import java.util.jar.JarFile;
 import java.util.zip.ZipFile;
 
-import org.apache.harmony.luni.util.Msg;
+import org.apache.harmony.luni.internal.nls.Messages;
 import org.apache.harmony.luni.util.Util;
 
 /**
@@ -221,16 +221,16 @@
     @Override
     public InputStream getInputStream() throws IOException {
         if (closed) {
-            // KA027=Inputstream of the JarURLConnection has been closed
-            throw new IllegalStateException(Msg.getString("KA027")); //$NON-NLS-1$
+            // luni.33=Inputstream of the JarURLConnection has been closed
+            throw new IllegalStateException(Messages.getString("luni.33")); //$NON-NLS-1$
         }
         connect();
         if (jarInput != null) {
             return jarInput;
         }
         if (jarEntry == null) {
-            // K00fc=Jar entry not specified
-            throw new IOException(Msg.getString("K00fc")); //$NON-NLS-1$
+            // luni.34=Jar entry not specified
+            throw new IOException(Messages.getString("luni.34")); //$NON-NLS-1$
         }
         return jarInput = new JarURLConnectionInputStream(jarFile
                 .getInputStream(jarEntry), jarFile);

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties?rev=909480&r1=909479&r2=909480&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties
Fri Feb 12 16:19:08 2010
@@ -41,3 +41,29 @@
 luni.18=Length out of bounds \: {0}
 luni.19=the methods named {0} must have the same return type
 luni.1A=Host is unresolved\: {0}
+luni.1B=url and proxy can not be null
+luni.1C=Unable to change directories
+luni.1D=Unable to connect to server\: {0}
+luni.1E=Could not establish data connection
+luni.1F=Unable to retrieve file\: {0}
+luni.20=Unable to log into server\: {0}
+luni.21=Unable to configure data port
+luni.22=Unable to store file
+luni.23=Unable to set transfer type
+luni.24=Stream is closed
+luni.25=Content-Length underflow
+luni.26=Content-Length exceeded
+luni.27=Cannot access request header fields after connection is set
+luni.28=This protocol does not support input
+luni.29=Does not support output
+luni.2A=can't open OutputStream after reading from an inputStream
+luni.2B=This method does not support writing\: {0}
+luni.2C=Cannot set method after connection is made
+luni.2D=Received HTTP_PROXY_AUTH (407) code while not using proxy
+luni.2E=Received authentication challenge is null
+luni.2F=Too many redirects
+luni.30=Invalid proxy port\: {0}
+luni.31=Proxy port out of range
+luni.32=Cannot find \!/
+luni.33=Inputstream of the JarURLConnection has been closed
+luni.34=Jar entry not specified



Mime
View raw message