harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r415270 - /incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
Date Mon, 19 Jun 2006 09:42:14 GMT
Author: tellison
Date: Mon Jun 19 02:42:13 2006
New Revision: 415270

URL: http://svn.apache.org/viewvc?rev=415270&view=rev
Log:
Apply patch HARMONY-618 ([classlib][nio]java.nio.channels.nio.SelectorProvider should not
use thread's context classloader to load provider class defined in property file)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java?rev=415270&r1=415269&r2=415270&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/java/nio/channels/spi/SelectorProvider.java
Mon Jun 19 02:42:13 2006
@@ -93,7 +93,6 @@
             if (null == provider) {
                 provider = new SelectorProviderImpl();
             }
-            return provider;
         }
         return provider;
     }
@@ -146,7 +145,7 @@
                     }
                 }
             } catch (Exception e) {
-                throw new Error();
+                throw new Error(e);
             }
         }
         return null;
@@ -159,19 +158,18 @@
         return AccessController.doPrivileged(
                 new PrivilegedAction<SelectorProvider>() {
                     public SelectorProvider run() {
-                        // FIXME check if use this ClassLoader or system
-                        // ClassLoader
                         try {
                             final String className =
                                 System.getProperty(PROVIDER_IN_SYSTEM_PROPERTY);
                             if (null != className) {
-                                Class spClass = Thread.currentThread()
-                                        .getContextClassLoader().loadClass(className);
+                                Class spClass = ClassLoader
+                                        .getSystemClassLoader().loadClass(
+                                                className);
                                 return (SelectorProvider)spClass.newInstance();
                             }
                             return null;
                         } catch (Exception e) {
-                            throw new Error();
+                            throw new Error(e);
                         }
                     }
                 });



Mime
View raw message