rt/vm/src/main/java/org/apidesign/vm4brwsr/ClassPath.java
branchclosure
changeset 1576 3e9bfed0d88e
parent 1575 08c8821c962d
child 1581 cf0f746f1a7f
     1.1 --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/ClassPath.java	Wed May 14 15:57:52 2014 +0200
     1.2 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/ClassPath.java	Wed May 14 16:09:03 2014 +0200
     1.3 @@ -44,10 +44,7 @@
     1.4      private static boolean doingToZip;
     1.5      
     1.6      
     1.7 -    @Exported static byte[] loadBytes(Object loader, String name, Object[] arguments, int skip) throws Exception {
     1.8 -        return ClassPath.loadFromCp(arguments, name, skip);
     1.9 -    }
    1.10 -    static byte[] loadFromCp(Object classpath, String res, int skip) 
    1.11 +    @Exported static byte[] loadBytes(String resource, Object classpath, int skip) 
    1.12      throws IOException, ClassNotFoundException {
    1.13          for (int i = 0; i < length(classpath); i++) {
    1.14              Object c = at(classpath, i);
    1.15 @@ -71,15 +68,15 @@
    1.16                      doingToZip = false;
    1.17                  }
    1.18              }
    1.19 -            if (res != null) {
    1.20 +            if (resource != null) {
    1.21                  byte[] checkRes;
    1.22                  if (c instanceof Bck2Brwsr.Resources) {
    1.23 -                    checkRes = readBytes((Bck2Brwsr.Resources)c, res);
    1.24 +                    checkRes = readBytes((Bck2Brwsr.Resources)c, resource);
    1.25                      if (checkRes != null && --skip < 0) {
    1.26                          return checkRes;
    1.27                      }
    1.28                  } else {
    1.29 -                    checkRes = callFunction(c, res, skip);
    1.30 +                    checkRes = callFunction(c, resource, skip);
    1.31                      if (checkRes != null) {
    1.32                          return checkRes;
    1.33                      }