< prev index next >

modules/fxml/src/main/java/javafx/fxml/FXMLLoader.java

Print this page
rev 9717 : 8151320: Remove unnecessary addReads from JavaFX

@@ -75,11 +75,10 @@
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.util.StreamReaderDelegate;
 
 import com.sun.javafx.beans.IDProperty;
 import com.sun.javafx.fxml.BeanAdapter;
-import com.sun.javafx.fxml.ModuleHelper;
 import com.sun.javafx.fxml.ParseTraceElement;
 import com.sun.javafx.fxml.PropertyNotFoundException;
 import com.sun.javafx.fxml.expression.Expression;
 import com.sun.javafx.fxml.expression.ExpressionValue;
 import com.sun.javafx.fxml.expression.KeyPath;

@@ -923,12 +922,10 @@
                         }
 
                         try {
                             if (controllerFactory == null) {
                                 ReflectUtil.checkPackageAccess(type);
-                                Object thisModule = ModuleHelper.getModule(this.getClass());
-                                ModuleHelper.addReads(thisModule, ModuleHelper.getModule(type));
                                 setController(type.newInstance());
                             } else {
                                 setController(controllerFactory.call(type));
                             }
                         } catch (InstantiationException exception) {

@@ -1008,12 +1005,10 @@
                 }
 
                 if (value == null) {
                     try {
                         ReflectUtil.checkPackageAccess(type);
-                        Object thisModule = ModuleHelper.getModule(this.getClass());
-                        ModuleHelper.addReads(thisModule, ModuleHelper.getModule(type));
                         value = type.newInstance();
                     } catch (InstantiationException exception) {
                         throw constructLoadException(exception);
                     } catch (IllegalAccessException exception) {
                         throw constructLoadException(exception);

@@ -1258,12 +1253,10 @@
 
             Object value;
             if (constructor != null) {
                 try {
                     ReflectUtil.checkPackageAccess(sourceValueType);
-                    Object thisModule = ModuleHelper.getModule(this.getClass());
-                    ModuleHelper.addReads(thisModule, ModuleHelper.getModule(sourceValueType));
                     value = constructor.newInstance(sourceValue);
                 } catch (InstantiationException exception) {
                     throw constructLoadException(exception);
                 } catch (IllegalAccessException exception) {
                     throw constructLoadException(exception);

@@ -1322,12 +1315,10 @@
                     }
 
                     if (value == null) {
                         try {
                             ReflectUtil.checkPackageAccess(type);
-                            Object thisModule = ModuleHelper.getModule(this.getClass());
-                            ModuleHelper.addReads(thisModule, ModuleHelper.getModule(type));
                             value = type.newInstance();
                         } catch (InstantiationException exception) {
                             throw constructLoadException(exception);
                         } catch (IllegalAccessException exception) {
                             throw constructLoadException(exception);

@@ -3413,12 +3404,10 @@
                 // we are done
                 return;
             }
 
             ReflectUtil.checkPackageAccess(type);
-            Object thisModule = ModuleHelper.getModule(this.getClass());
-            ModuleHelper.addReads(thisModule, ModuleHelper.getModule(type));
 
             addAccessibleMembers(type.getSuperclass(),
                                  allowedClassAccess,
                                  allowedMemberAccess,
                                  membersType);
< prev index next >