Get ready for running in a restricted environment where full reflection information is not available
authorJaroslav Tulach <jaroslav.tulach@netbeans.org>
Mon, 06 Jan 2014 13:44:34 +0100
changeset 42070de86018481
parent 419 5da8f4cfbdcb
child 421 66d823ed2f87
child 422 b0e1a10c2f42
Get ready for running in a restricted environment where full reflection information is not available
json/src/main/java/org/apidesign/html/json/spi/Proto.java
     1.1 --- a/json/src/main/java/org/apidesign/html/json/spi/Proto.java	Mon Jan 06 11:07:19 2014 +0100
     1.2 +++ b/json/src/main/java/org/apidesign/html/json/spi/Proto.java	Mon Jan 06 13:44:34 2014 +0100
     1.3 @@ -388,7 +388,11 @@
     1.4              Class<Model> clazz, Class<?> modelFor, int properties, int functions
     1.5          ) {
     1.6              assert getClass().getName().endsWith("$Html4JavaType");
     1.7 -            assert getClass().getDeclaringClass() == clazz;
     1.8 +            try {
     1.9 +                assert getClass().getDeclaringClass() == clazz;
    1.10 +            } catch (SecurityException ex) {
    1.11 +                // OK, no check
    1.12 +            }
    1.13              this.clazz = clazz;
    1.14              this.propertyNames = new String[properties];
    1.15              this.propertyReadOnly = new boolean[properties];