8027020: [regression] java.lang.VerifyError: Bad type on operand stack

Tue, 22 Oct 2013 22:04:46 +0530

author
sundar
date
Tue, 22 Oct 2013 22:04:46 +0530
changeset 646
eae4e4c1f613
parent 645
6f19eb443a47
child 647
734f71f8a2c3
child 648
5df55690fd5b

8027020: [regression] java.lang.VerifyError: Bad type on operand stack
Reviewed-by: jlaskey, attila

src/jdk/nashorn/internal/runtime/ScriptLoader.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/jdk/nashorn/internal/runtime/ScriptLoader.java	Tue Oct 22 17:52:37 2013 +0200
     1.2 +++ b/src/jdk/nashorn/internal/runtime/ScriptLoader.java	Tue Oct 22 22:04:46 2013 +0530
     1.3 @@ -52,24 +52,10 @@
     1.4      @Override
     1.5      protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
     1.6          checkPackageAccess(name);
     1.7 -        try {
     1.8 -            return super.loadClass(name, resolve);
     1.9 -        } catch (final ClassNotFoundException | SecurityException e) {
    1.10 -            // We'll get ClassNotFoundException for Nashorn 'struct' classes.
    1.11 -            // Also, we'll get SecurityException for jdk.nashorn.internal.*
    1.12 -            // classes. So, load these using to context's 'shared' loader.
    1.13 -            // All these classes start with "jdk.nashorn.internal." prefix.
    1.14 -            try {
    1.15 -                if (name.startsWith(NASHORN_PKG_PREFIX)) {
    1.16 -                    return context.getSharedLoader().loadClass(name);
    1.17 -                }
    1.18 -            } catch (final ClassNotFoundException ignored) {
    1.19 -                //ignored
    1.20 -            }
    1.21 -
    1.22 -            // throw the original exception from here
    1.23 -            throw e;
    1.24 +        if (name.startsWith(NASHORN_PKG_PREFIX)) {
    1.25 +            return context.getSharedLoader().loadClass(name);
    1.26          }
    1.27 +        return super.loadClass(name, resolve);
    1.28      }
    1.29  
    1.30      // package-private and private stuff below this point

mercurial