Get ready for running in a restricted environment where full reflection information is not available
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];