Commit d9fdd0d6 by Mark Wielaard Committed by Mark Wielaard

URLClassLoader.java (JarURLLoader.JarURLLoader): Don't look aside for "GCJLIBS"…

URLClassLoader.java (JarURLLoader.JarURLLoader): Don't look aside for "GCJLIBS" in directory where jarfiles are loaded.

       * java/net/URLClassLoader.java (JarURLLoader.JarURLLoader): Don't look
       aside for "GCJLIBS" in directory where jarfiles are loaded.
       (JarURLLoader.getClass): Removed method.
       (JarURLLoader.toString): Removed method.
       (FileResource.toString): Removed method.

From-SVN: r95076
parent affa5a34
2005-02-15 Mark Wielaard <mark@klomp.org> 2005-02-15 Mark Wielaard <mark@klomp.org>
* java/net/URLClassLoader.java (JarURLLoader.JarURLLoader): Don't look
aside for "GCJLIBS" in directory where jarfiles are loaded.
(JarURLLoader.getClass): Removed method.
(JarURLLoader.toString): Removed method.
(FileResource.toString): Removed method.
2005-02-15 Mark Wielaard <mark@klomp.org>
* javax/net/ssl/SSLContext.java (getInstance): Add exception message * javax/net/ssl/SSLContext.java (getInstance): Add exception message
and/or cause before throwing. and/or cause before throwing.
......
...@@ -306,8 +306,6 @@ public class URLClassLoader extends SecureClassLoader ...@@ -306,8 +306,6 @@ public class URLClassLoader extends SecureClassLoader
Vector classPath; // The "Class-Path" attribute of this Jar's manifest Vector classPath; // The "Class-Path" attribute of this Jar's manifest
SoURLLoader soURLLoader;
public JarURLLoader(URLClassLoader classloader, URL baseURL) public JarURLLoader(URLClassLoader classloader, URL baseURL)
{ {
super(classloader, baseURL); super(classloader, baseURL);
...@@ -320,37 +318,16 @@ public class URLClassLoader extends SecureClassLoader ...@@ -320,37 +318,16 @@ public class URLClassLoader extends SecureClassLoader
sb.append("!/"); sb.append("!/");
String jarURL = sb.toString(); String jarURL = sb.toString();
this.soURLLoader = null;
this.classPath = null; this.classPath = null;
URL baseJarURL = null; URL baseJarURL = null;
JarFile jarfile = null; JarFile jarfile = null;
try try
{ {
baseJarURL baseJarURL =
= new URL(null, jarURL, classloader.getURLStreamHandler("jar")); new URL(null, jarURL, classloader.getURLStreamHandler("jar"));
jarfile
= ((JarURLConnection) baseJarURL.openConnection()).getJarFile();
if (jarfile != null) jarfile =
{ ((JarURLConnection) baseJarURL.openConnection()).getJarFile();
String fileName = baseURL.getFile();
if (fileName != null)
{
File f = new File(fileName);
String libDirName = f.getCanonicalFile().getParent()
+ File.separator + "GCJLIBS";
File libDir = new File(libDirName);
if (libDir != null && (libDir.isDirectory()))
{
File soFile = new File (libDirName
+ File.separator + f.getName()
+ ".so");
if (soFile != null && soFile.isFile())
this.soURLLoader
= new SoURLLoader (classloader, soFile.toURL(),
baseURL);
}
}
Manifest manifest; Manifest manifest;
Attributes attributes; Attributes attributes;
...@@ -384,7 +361,6 @@ public class URLClassLoader extends SecureClassLoader ...@@ -384,7 +361,6 @@ public class URLClassLoader extends SecureClassLoader
} }
} }
} }
}
catch (IOException ioe) catch (IOException ioe)
{ {
/* ignored */ /* ignored */
...@@ -394,13 +370,6 @@ public class URLClassLoader extends SecureClassLoader ...@@ -394,13 +370,6 @@ public class URLClassLoader extends SecureClassLoader
this.jarfile = jarfile; this.jarfile = jarfile;
} }
Class getClass(String className)
{
if (soURLLoader != null)
return soURLLoader.getClass(className);
return null;
}
/** get resource with the name "name" in the jar url */ /** get resource with the name "name" in the jar url */
Resource getResource(String name) Resource getResource(String name)
{ {
...@@ -417,11 +386,6 @@ public class URLClassLoader extends SecureClassLoader ...@@ -417,11 +386,6 @@ public class URLClassLoader extends SecureClassLoader
return null; return null;
} }
public String toString ()
{
return "jarfile " + jarfile.getName();
}
Manifest getManifest() Manifest getManifest()
{ {
try try
...@@ -672,11 +636,6 @@ public class URLClassLoader extends SecureClassLoader ...@@ -672,11 +636,6 @@ public class URLClassLoader extends SecureClassLoader
return (int) file.length(); return (int) file.length();
} }
public String toString ()
{
return "file " +file.getAbsolutePath();
}
public URL getURL() public URL getURL()
{ {
try try
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment