boot/src/main/java/org/apidesign/html/boot/impl/JsClassLoader.java
changeset 283 e90e281a06fc
parent 271 8e62255ff5f5
child 288 8c5b40231d26
     1.1 --- a/boot/src/main/java/org/apidesign/html/boot/impl/JsClassLoader.java	Sat Aug 31 00:39:39 2013 +0000
     1.2 +++ b/boot/src/main/java/org/apidesign/html/boot/impl/JsClassLoader.java	Thu Sep 05 18:36:44 2013 +0200
     1.3 @@ -92,7 +92,19 @@
     1.4                  }
     1.5                  is.close();
     1.6                  is = null;
     1.7 -                ClassReader cr = new ClassReader(arr);
     1.8 +                ClassReader cr = new ClassReader(arr) {
     1.9 +                    // to allow us to compile with -profile compact1 on 
    1.10 +                    // JDK8 while processing the class as JDK7, the highest
    1.11 +                    // class format asm 4.1 understands to
    1.12 +                    @Override
    1.13 +                    public short readShort(int index) {
    1.14 +                        short s = super.readShort(index);
    1.15 +                        if (index == 6 && s > Opcodes.V1_7) {
    1.16 +                            return Opcodes.V1_7;
    1.17 +                        }
    1.18 +                        return s;
    1.19 +                    }
    1.20 +                };
    1.21                  FindInClass tst = new FindInClass(null);
    1.22                  cr.accept(tst, 0);
    1.23                  if (tst.found > 0) {