diff options
Diffstat (limited to 'external/beanshell/bsh-2.0b1-src.patch')
-rw-r--r-- | external/beanshell/bsh-2.0b1-src.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/external/beanshell/bsh-2.0b1-src.patch b/external/beanshell/bsh-2.0b1-src.patch index a1358d391168..a67e3ee2e491 100644 --- a/external/beanshell/bsh-2.0b1-src.patch +++ b/external/beanshell/bsh-2.0b1-src.patch @@ -42,3 +42,44 @@ import java.util.ArrayList; import java.util.List; +--- misc/BeanShell/src/bsh/classpath/BshClassPath.java 2003-12-19 17:14:28.000000000 +0100 ++++ misc/build/BeanShell/src/bsh/classpath/BshClassPath.java 2014-07-22 21:02:52.000000000 +0200 +@@ -42,6 +42,7 @@ + import bsh.StringUtil; + import bsh.ClassPathException; + import java.lang.ref.WeakReference; ++import java.lang.SecurityException; + import bsh.NameSource; + + /** +@@ -569,7 +570,7 @@ + // Java deals with relative paths for it's bootstrap loader + // but JARClassLoader doesn't. + urls[i] = new File( +- new File(paths[i]).getCanonicalPath() ).toURL(); ++ new File(paths[i]).getCanonicalPath() ).toURI().toURL(); + } catch ( IOException e ) { + throw new ClassPathException("can't parse class path: "+e); + } +@@ -641,9 +642,11 @@ + { + //String rtjar = System.getProperty("java.home")+"/lib/rt.jar"; + String rtjar = getRTJarPath(); +- URL url = new File( rtjar ).toURL(); ++ URL url = new File( rtjar ).toURI().toURL(); + bootClassPath = new BshClassPath( + "Boot Class Path", new URL[] { url } ); ++ } catch ( SecurityException e ) { ++ throw new ClassPathException(" can't access to boot jar: "+e); + } catch ( MalformedURLException e ) { + throw new ClassPathException(" can't find boot jar: "+e); + } +@@ -686,7 +689,7 @@ + public static void main( String [] args ) throws Exception { + URL [] urls = new URL [ args.length ]; + for(int i=0; i< args.length; i++) +- urls[i] = new File(args[i]).toURL(); ++ urls[i] = new File(args[i]).toURI().toURL(); + BshClassPath bcp = new BshClassPath( "Test", urls ); + } + |