harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r739695 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java
Date Sun, 01 Feb 2009 04:00:36 GMT
Author: ndbeyer
Date: Sun Feb  1 04:00:35 2009
New Revision: 739695

URL: http://svn.apache.org/viewvc?rev=739695&view=rev
Log:
add missing annotations and minor cleanup

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java?rev=739695&r1=739694&r2=739695&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/net/URLClassLoader.java
Sun Feb  1 04:00:35 2009
@@ -330,6 +330,7 @@
             return index;
         }
 
+        @Override
         void findResources(String name, ArrayList<URL> resources) {
             URL res = findResourceInOwn(name);
             if (res != null && !resources.contains(res)) {
@@ -353,6 +354,7 @@
 
         }
 
+        @Override
         Class<?> findClass(String packageName, String name, String origName) {
             String entryName = prefixName + name;
             JarEntry entry = jf.getJarEntry(entryName);
@@ -443,6 +445,7 @@
             return null;
         }
 
+        @Override
         URL findResource(String name) {
             URL res = findResourceInOwn(name);
             if (res != null) {
@@ -540,6 +543,7 @@
             prefix = buf.toString();
         }
 
+        @Override
         Class<?> findClass(String packageName, String name, String origName) {
             String filename = prefix + name;
             try {
@@ -561,13 +565,14 @@
             return null;
         }
 
+        @Override
         URL findResource(String name) {
             int idx = 0;
             String filename;
 
             // Do not create a UNC path, i.e. \\host
-            while (idx < name.length() && ((name.charAt(idx) == '/') //$NON-NLS-1$
-                    || (name.charAt(idx) == '\\'))) { //$NON-NLS-1$
+            while (idx < name.length() && 
+                   ((name.charAt(idx) == '/') || (name.charAt(idx) == '\\'))) {
                 idx++;
             }
 
@@ -580,13 +585,13 @@
 
                 if (new File(filename).exists()) {
                     return targetURL(url, name);
-                } else {
-                    return null;
                 }
+                return null;
             } catch (IllegalArgumentException e) {
                 return null;
             } catch (UnsupportedEncodingException e) {
-                return null;
+                // must not happen
+                throw new AssertionError(e);
             }
         }
 



Mime
View raw message