File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 114114 < cfargument name = " className" hint = " The name of the class to create" type = " string" required = " Yes" >
115115 < cfscript >
116116 try {
117- // do this in one line just for speed.
118- return createJavaProxy ( getURLClassLoader ().loadClass ( arguments .className ) );
117+ if ( server .keyExists ( " boxlang" ) ) {
118+ // Boxlang's Dynamic object class handles all of our needs - we just need to retrieve the class through the module classloader
119+ return createObject ( " java" , " ortus.boxlang.runtime.interop.DynamicObject" ).of (
120+ getURLClassLoader ().loadClass ( arguments .className )
121+ );
122+ } else {
123+ // do this in one line just for speed.
124+ return createJavaProxy ( getURLClassLoader ().loadClass ( arguments .className ) );
125+ }
119126 } catch ( java .lang .ClassNotFoundException exc ) {
120127 throwException (
121128 " javaloader.ClassNotFoundException" ,
You can’t perform that action at this time.
0 commit comments