rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java
changeset 1886 c4d37f95adf2
parent 1829 729dc3c25fd8
child 1979 0f100539ce6c
     1.1 --- a/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java	Sun May 17 10:16:42 2015 +0200
     1.2 +++ b/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java	Sat Mar 05 10:28:10 2016 +0100
     1.3 @@ -299,6 +299,10 @@
     1.4              if (is != null) {
     1.5                  return is;
     1.6              }
     1.7 +            return getFromCp(name);
     1.8 +        }
     1.9 +
    1.10 +        private InputStream getFromCp(String name) throws IOException {
    1.11              Enumeration<URL> en = cp.getResources(name);
    1.12              URL u = null;
    1.13              while (en.hasMoreElements()) {
    1.14 @@ -315,10 +319,17 @@
    1.15              return u.openStream();
    1.16          }
    1.17  
    1.18 +        private final class NoConvRes implements Bck2Brwsr.Resources {
    1.19 +            @Override
    1.20 +            public InputStream get(String resource) throws IOException {
    1.21 +                return getFromCp(resource);
    1.22 +            }
    1.23 +        }
    1.24 +
    1.25          private void addClassResource(String n) throws IOException {
    1.26              if (proc != null) {
    1.27                  try (InputStream is = this.get(n)) {
    1.28 -                    Map<String, byte[]> conv = proc.process(n, readFrom(is), this);
    1.29 +                    Map<String, byte[]> conv = proc.process(n, readFrom(is), new NoConvRes());
    1.30                      if (conv != null) {
    1.31                          boolean found = false;
    1.32                          for (Map.Entry<String, byte[]> entrySet : conv.entrySet()) {