You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by pe...@apache.org on 2012/08/05 15:22:20 UTC
svn commit: r1369578 -
/river/jtsk/trunk/src/net/jini/loader/pref/PreferredClassLoader.java
Author: peter_firmstone
Date: Sun Aug 5 13:22:20 2012
New Revision: 1369578
URL: http://svn.apache.org/viewvc?rev=1369578&view=rev
Log:
Work around sun bug ID 6536522 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=1369578&r1=1369577&r2=1369578&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 13:22:20 2012
@@ -707,10 +707,13 @@ public class PreferredClassLoader extend
hconn.getResponseMessage());
}
}
- } catch (NullPointerException e){
- // Sun Bug ID: 6536522
- e.fillInStackTrace();
- throw new IOException(url.toString(), e);
+ } catch (RuntimeException e){
+ if ( e instanceof NullPointerException || e.getCause() instanceof NullPointerException) {
+ // Sun Bug ID: 6536522
+ throw new IOException(url.toString(), e);
+ } else {
+ throw e;
+ }
} finally {
if (closeAfter && (closeConn != null)) {
/* clean up after... */