classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] ClassLoader.getExtClassLoaderUrls() nullpointer fix


From: Christian Thalinger
Subject: [cp-patches] ClassLoader.getExtClassLoaderUrls() nullpointer fix
Date: Sun, 16 Jan 2005 13:57:46 +0100

--- java/lang/ClassLoader.java  12 Jan 2005 12:45:14 -0000      1.5
+++ java/lang/ClassLoader.java  16 Jan 2005 12:55:15 -0000
@@ -998,10 +998,13 @@ public abstract class ClassLoader
          {
            File f = new File(tok.nextToken());
            File[] files = f.listFiles();
-           for (int i = 0; i < files.length; i++)
-             {
-               list.add(files[i].toURL());
-             }
+            if (files != null)
+              {
+                for (int i = 0; i < files.length; i++)
+                  {
+                    list.add(files[i].toURL());
+                  }
+              }
          }
        catch(Exception x)
          {






reply via email to

[Prev in Thread] Current Thread [Next in Thread]