diff --git a/models/javaloader/JavaCompiler.cfc b/models/javaloader/JavaCompiler.cfc index b531e1d..e7c1001 100644 --- a/models/javaloader/JavaCompiler.cfc +++ b/models/javaloader/JavaCompiler.cfc @@ -142,7 +142,13 @@ - + diff --git a/models/javaloader/JavaLoader.cfc b/models/javaloader/JavaLoader.cfc index c2afe22..0cab539 100644 --- a/models/javaloader/JavaLoader.cfc +++ b/models/javaloader/JavaLoader.cfc @@ -207,7 +207,11 @@ - + func = arguments[ 1 ]; diff --git a/models/javaloader/JavaProxy.cfc b/models/javaloader/JavaProxy.cfc index aad9595..a006506 100644 --- a/models/javaloader/JavaProxy.cfc +++ b/models/javaloader/JavaProxy.cfc @@ -218,28 +218,28 @@ found = true; } else if ( param.isPrimitive() ) // if it's a primitive, it can be mapped to object primtive classes - { - if ( param.getName() eq "boolean" AND class.getName() eq "java.lang.Boolean" ) { - found = true; - } else if ( param.getName() eq "int" AND class.getName() eq "java.lang.Integer" ) { - found = true; - } else if ( param.getName() eq "long" AND class.getName() eq "java.lang.Long" ) { - found = true; - } else if ( param.getName() eq "float" AND class.getName() eq "java.lang.Float" ) { - found = true; - } else if ( param.getName() eq "double" AND class.getName() eq "java.lang.Double" ) { - found = true; - } else if ( param.getName() eq "char" AND class.getName() eq "java.lang.Character" ) { - found = true; - } else if ( param.getName() eq "byte" AND class.getName() eq "java.lang.Byte" ) { - found = true; - } else if ( param.getName() eq "short" AND class.getName() eq "java.lang.Short" ) { - found = true; - } else { - found = false; - } - } -else { + { + if ( param.getName() eq "boolean" AND class.getName() eq "java.lang.Boolean" ) { + found = true; + } else if ( param.getName() eq "int" AND class.getName() eq "java.lang.Integer" ) { + found = true; + } else if ( param.getName() eq "long" AND class.getName() eq "java.lang.Long" ) { + found = true; + } else if ( param.getName() eq "float" AND class.getName() eq "java.lang.Float" ) { + found = true; + } else if ( param.getName() eq "double" AND class.getName() eq "java.lang.Double" ) { + found = true; + } else if ( param.getName() eq "char" AND class.getName() eq "java.lang.Character" ) { + found = true; + } else if ( param.getName() eq "byte" AND class.getName() eq "java.lang.Byte" ) { + found = true; + } else if ( param.getName() eq "short" AND class.getName() eq "java.lang.Short" ) { + found = true; + } else { + found = false; + } + } + else { found = false; } } diff --git a/test-harness/config/Application.cfc b/test-harness/config/Application.cfc index 23c5ad0..66424cb 100644 --- a/test-harness/config/Application.cfc +++ b/test-harness/config/Application.cfc @@ -1,7 +1,9 @@ -/** -* This is a protection Application cfm for the config file. You do not -* need to modify this file -*/ -component{ +/** + * This is a protection Application cfm for the config file. You do not + * need to modify this file + */ +component { + abort; -} \ No newline at end of file + +} diff --git a/test-harness/config/WireBox.cfc b/test-harness/config/WireBox.cfc index 3aafc01..0a51718 100644 --- a/test-harness/config/WireBox.cfc +++ b/test-harness/config/WireBox.cfc @@ -1,46 +1,39 @@ -component extends="coldbox.system.ioc.config.Binder"{ - +component extends="coldbox.system.ioc.config.Binder" { + /** - * Configure WireBox, that's it! - */ + * Configure WireBox, that's it! + */ function configure(){ - // The WireBox configuration structure DSL wireBox = { // Scope registration, automatically register a wirebox injector instance on any CF scope // By default it registeres itself on application scope - scopeRegistration = { - enabled = true, - scope = "application", // server, cluster, session, application - key = "wireBox" + scopeRegistration : { + enabled : true, + scope : "application", // server, cluster, session, application + key : "wireBox" }, - // DSL Namespace registrations - customDSL = { - // namespace = "mapping name" + customDSL : { + // namespace = "mapping name" }, - // Custom Storage Scopes - customScopes = { - // annotationName = "mapping name" + customScopes : { + // annotationName = "mapping name" }, - // Package scan locations - scanLocations = [], - + scanLocations : [], // Stop Recursions - stopRecursions = [], - + stopRecursions : [], // Parent Injector to assign to the configured injector, this must be an object reference - parentInjector = "", - + parentInjector : "", // Register all event listeners here, they are created in the specified order - listeners = [ - // { class="", name="", properties={} } - ] + listeners : [ + // { class="", name="", properties={} } + ] }; - + // Map Bindings below - } + } -} \ No newline at end of file +} diff --git a/test-harness/tests/specs/LoaderTest.cfc b/test-harness/tests/specs/LoaderTest.cfc index bdd2fad..315a8ea 100644 --- a/test-harness/tests/specs/LoaderTest.cfc +++ b/test-harness/tests/specs/LoaderTest.cfc @@ -6,50 +6,50 @@ component extends="coldbox.system.testing.BaseTestCase" appMapping="/root" { /*********************************** LIFE CYCLE Methods ***********************************/ // executes before all suites+specs in the run() method - function beforeAll() { + function beforeAll(){ super.beforeAll(); } // executes after all suites+specs in the run() method - function afterAll() { + function afterAll(){ super.afterAll(); structDelete( server, getLoader().getStaticIDKey() ); } /*********************************** BDD SUITES ***********************************/ - function run() { + function run(){ // all your suites go here. - describe( "JavaLoader Module", function() { - beforeEach( function( currentSpec ) { + describe( "JavaLoader Module", function(){ + beforeEach( function( currentSpec ){ setup(); } ); - it( "should register loader proxy", function() { + it( "should register loader proxy", function(){ var loader = getLoader(); expect( loader ).toBeComponent(); } ); - it( "should class load jar files", function() { + it( "should class load jar files", function(){ var event = execute( "main.index" ); var prc = event.getCollection( private = true ); expect( prc.hello ).toBe( "Hello World" ); } ); - it( "should get loaded URLs", function() { + it( "should get loaded URLs", function(){ var loader = getLoader(); expect( loader.getLoadedURls() ).toBeArray(); expect( loader.getLoadedURLs() ).toHaveLength( 2 ); } ); - it( "should retrieve via custom DSL", function() { + it( "should retrieve via custom DSL", function(){ var hello = getWireBox().getInstance( dsl = "javaloader:HelloWorld" ); expect( isObject( hello ) ).toBeTrue(); } ); } ); } - private function getLoader() { + private function getLoader(){ return getWireBox().getInstance( "loader@cbjavaloader" ); }