rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java
changeset 1696 ce34fdc36fac
parent 1684 3238bffeaf12
child 1710 6db177c4f72c
     1.1 --- a/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java	Sat Sep 13 16:11:42 2014 +0200
     1.2 +++ b/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java	Sun Sep 14 22:33:35 2014 +0200
     1.3 @@ -81,7 +81,11 @@
     1.4              }
     1.5              @Override
     1.6              public InputStream get(String resource) throws IOException {
     1.7 -                InputStream is = jf.getInputStream(new ZipEntry(resource));
     1.8 +                InputStream is = getConverted(resource);
     1.9 +                if (is != null) {
    1.10 +                    return is;
    1.11 +                }
    1.12 +                is = jf.getInputStream(new ZipEntry(resource));
    1.13                  return is == null ? super.get(resource) : is;
    1.14              }
    1.15          }
    1.16 @@ -198,13 +202,20 @@
    1.17              this.proc = p;
    1.18          }
    1.19  
    1.20 -        @Override
    1.21 -        public InputStream get(String name) throws IOException {
    1.22 +        protected final InputStream getConverted(String name) throws IOException {
    1.23              byte[] arr = converted.get(name);
    1.24              if (arr != null) {
    1.25                  return new ByteArrayInputStream(arr);
    1.26              }
    1.27 -            
    1.28 +            return null;
    1.29 +        }
    1.30 +        
    1.31 +        @Override
    1.32 +        public InputStream get(String name) throws IOException {
    1.33 +            InputStream is = getConverted(name);
    1.34 +            if (is != null) {
    1.35 +                return is;
    1.36 +            }
    1.37              Enumeration<URL> en = Bck2BrwsrJars.class.getClassLoader().getResources(name);
    1.38              URL u = null;
    1.39              while (en.hasMoreElements()) {