1.1 --- a/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java Sat Sep 13 15:37:01 2014 +0200
1.2 +++ b/rt/aot/src/main/java/org/apidesign/bck2brwsr/aot/Bck2BrwsrJars.java Sat Sep 13 16:11:42 2014 +0200
1.3 @@ -18,6 +18,7 @@
1.4 package org.apidesign.bck2brwsr.aot;
1.5
1.6 import java.io.BufferedReader;
1.7 +import java.io.ByteArrayInputStream;
1.8 import java.io.File;
1.9 import java.io.FileInputStream;
1.10 import java.io.IOException;
1.11 @@ -199,6 +200,11 @@
1.12
1.13 @Override
1.14 public InputStream get(String name) throws IOException {
1.15 + byte[] arr = converted.get(name);
1.16 + if (arr != null) {
1.17 + return new ByteArrayInputStream(arr);
1.18 + }
1.19 +
1.20 Enumeration<URL> en = Bck2BrwsrJars.class.getClassLoader().getResources(name);
1.21 URL u = null;
1.22 while (en.hasMoreElements()) {
1.23 @@ -227,7 +233,7 @@
1.24 if (res.equals(n)) {
1.25 found = true;
1.26 }
1.27 - assert res.endsWith(".class");
1.28 + assert res.endsWith(".class") : "Wrong resource: " + res;
1.29 converted.put(res, bytes);
1.30 classes.add(res.substring(0, res.length() - 6));
1.31 }