Author: peter_firmstone
Date: Sun Aug  5 08:57:04 2012
New Revision: 1369538

URL: http://svn.apache.org/viewvc?rev=1369538&view=rev
Log:
Work around sun bug ID6536522 NPE thrown instead of MalformedURLException

Modified:
    river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java

Modified: river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java
URL: 
http://svn.apache.org/viewvc/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java?rev=1369538&r1=1369537&r2=1369538&view=diff
==============================================================================
--- river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java 
(original)
+++ river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java Sun Aug 
 5 08:57:04 2012
@@ -604,7 +604,7 @@ public class PreferredClassLoader extend
                 // NullPointerException is thrown instead of 
MalformedURLException
                 // Case is the same as above, we have no definite answer on
                 // whether the JAR file and therefore the PREFERRED.LIST 
exists.
-                System.err.println("NPE thrown while trying to open 
connection:" +
+                System.err.println("NPE thrown while trying to open connection 
:" +
                         baseURL);
                 e.printStackTrace(System.err);
             }
@@ -713,7 +713,9 @@ public class PreferredClassLoader extend
                try {
                    closeConn.getInputStream().close();
                } catch (IOException e) {
-               }
+               } catch (NullPointerException e){
+                    // Sun Bug ID: 6536522
+                }
            }
        }
 


Reply via email to