Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ jobs:
box server start serverConfigFile="server-${{ matrix.cfengine }}.json" --noSaveSettings --debug
curl http://127.0.0.1:8599/test-harness

- name: Run Adobe Full Null Regression
if: ${{ matrix.cfengine == 'adobe@2025' }}
run: |
curl --fail-with-body http://127.0.0.1:8599/tests/full-null/index.cfm

- name: Run Tests
run: |
box run-script tests
Expand Down
4 changes: 2 additions & 2 deletions system/FrameworkSupertype.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ component serializable="false" accessors="true" {
* @return coldbox.system.async.AsyncManager
*/
any function async() cbMethod{
if ( isNull( variables.asyncManager ) ) {
if ( !structKeyExists( variables, "asyncManager" ) || isNull( variables.asyncManager ) ) {
variables.asyncManager = variables.wirebox.getInstance( "asyncManager@coldbox" );
}
return variables.asyncManager;
Expand Down Expand Up @@ -752,7 +752,7 @@ component serializable="false" accessors="true" {
* @return coldbox.system.async.time.DateTimeHelper
*/
DateTimeHelper function getDateTimeHelper(){
if ( isNull( variables.cbDateTimeHelper ) ) {
if ( !structKeyExists( variables, "cbDateTimeHelper" ) || isNull( variables.cbDateTimeHelper ) ) {
variables.cbDateTimeHelper = variables.wirebox.getInstance(
"coldbox.system.async.time.DateTimeHelper"
);
Expand Down
14 changes: 7 additions & 7 deletions system/RestHandler.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ component extends="EventHandler" {
};
structAppend( actionArgs, arguments.eventArguments );
// Incoming Format Detection
if ( !isNull( arguments.rc.format ) ) {
if ( structKeyExists( arguments.rc, "format" ) ) {
arguments.prc.response.setFormat( arguments.rc.format );
}
// Execute action
Expand Down Expand Up @@ -119,15 +119,15 @@ component extends="EventHandler" {
// marshalling below and the header flush further down would be write-after-commit
// against either, so bail out entirely.
if ( arguments.event.isSSE() || arguments.event.isNoExecution() ) {
if ( !isNull( local.actionResults ) ) {
if ( structKeyExists( local, "actionResults" ) && !isNull( local.actionResults ) ) {
return local.actionResults;
}
return;
}

// Did the controllers set a view to be rendered? If not use renderdata, else just delegate to view.
if (
isNull( local.actionResults )
( !structKeyExists( local, "actionResults" ) || isNull( local.actionResults ) )
AND
!arguments.event.getCurrentView().len()
AND
Expand Down Expand Up @@ -161,7 +161,7 @@ component extends="EventHandler" {
}

// If results detected, just return them, controllers requesting to return results
if ( !isNull( local.actionResults ) ) {
if ( structKeyExists( local, "actionResults" ) && !isNull( local.actionResults ) ) {
return local.actionResults;
}
}
Expand All @@ -186,7 +186,7 @@ component extends="EventHandler" {
){
// Try to discover exception, if not, hard error
if (
!isNull( arguments.prc.exception ) && (
structKeyExists( arguments.prc, "exception" ) && (
isNull( arguments.exception ) || structIsEmpty( arguments.exception )
)
) {
Expand Down Expand Up @@ -415,7 +415,7 @@ component extends="EventHandler" {

// case when the a jwt token was valid, but expired
if (
!isNull( arguments.prc.cbSecurity_validatorResults ) &&
structKeyExists( arguments.prc, "cbSecurity_validatorResults" ) &&
arguments.prc.cbSecurity_validatorResults.messages CONTAINS "expired"
) {
arguments.event
Expand Down Expand Up @@ -480,7 +480,7 @@ component extends="EventHandler" {
.addMessage( "You are not allowed to access this resource" );

// Check for validator results
if ( !isNull( arguments.prc.cbSecurity_validatorResults ) ) {
if ( structKeyExists( arguments.prc, "cbSecurity_validatorResults" ) ) {
arguments.prc.response.addMessage( arguments.prc.cbSecurity_validatorResults.messages );
}

Expand Down
6 changes: 3 additions & 3 deletions system/async/tasks/FutureTask.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ component accessors="true" {
* @native The native Future class we are wrapping
*/
FutureTask function init( native ){
if ( isNull( arguments.native ) ) {
if ( !structKeyExists( arguments, "native" ) || isNull( arguments.native ) ) {
arguments.native = createObject( "java", "java.util.concurrent.FutureTask" );
}
variables.native = arguments.native;
Expand Down Expand Up @@ -70,12 +70,12 @@ component accessors="true" {
}

// If we have results, return them
if ( !isNull( local.results ) ) {
if ( structKeyExists( local, "results" ) && !isNull( local.results ) ) {
return local.results;
}

// If we didn't, do we have a default value
if ( !isNull( arguments.defaultValue ) ) {
if ( structKeyExists( arguments, "defaultValue" ) && !isNull( arguments.defaultValue ) ) {
return arguments.defaultValue;
}
// Else return null
Expand Down
6 changes: 3 additions & 3 deletions system/cache/AbstractCacheBoxProvider.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ component
* @return coldbox.system.core.util.Util
*/
function getUtility(){
if ( isNull( variables.utility ) ) {
if ( !structKeyExists( variables, "utility" ) || isNull( variables.utility ) ) {
variables.utility = new coldbox.system.core.util.Util();
}
return variables.utility;
Expand Down Expand Up @@ -722,7 +722,7 @@ component
*/
function randomUUID(){
// our UUID creation helper
if ( isNull( variables.uuidHelper ) ) {
if ( !structKeyExists( variables, "uuidHelper" ) || isNull( variables.uuidHelper ) ) {
variables.uuidHelper = createObject( "java", "java.util.UUID" );
}
return variables.uuidHelper.randomUUID();
Expand Down Expand Up @@ -776,7 +776,7 @@ component

// Validate configuration values, if they don't exist, then default them to DEFAULTS
for ( var key in variables.DEFAULTS ) {
if ( NOT len( variables.configuration[ key ] ) ) {
if ( isNull( variables.configuration[ key ] ) || NOT len( variables.configuration[ key ] ) ) {
variables.configuration[ key ] = variables.DEFAULTS[ key ];
}
}
Expand Down
10 changes: 5 additions & 5 deletions system/cache/CacheFactory.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ component accessors=true serializable=false {
*/
CacheFactory function shutdown(){
// Log startup
if ( !isNull( variables.log ) ) {
if ( isObject( variables.log ) ) {
if ( variables.log.canDebug() ) {
variables.log.debug( "Shutdown of cache factory: #getFactoryID()# requested and started." );
}
Expand All @@ -376,7 +376,7 @@ component accessors=true serializable=false {
var cache = getCache( item );

// Log it
if ( !isNull( variables.log ) ) {
if ( isObject( variables.log ) ) {
if ( variables.log.canDebug() ) {
variables.log.debug( "Shutting down cache: #item# on factoryID: #getFactoryID()#." );
}
Expand All @@ -392,7 +392,7 @@ component accessors=true serializable=false {
variables.eventManager.announce( "afterCacheShutdown", { cache : cache } );

// log
if ( !isNull( variables.log ) ) {
if ( isObject( variables.log ) ) {
if ( variables.log.canDebug() ) {
variables.log.debug( "Cache: #item# was shut down on factoryID: #getFactoryID()#." );
}
Expand Down Expand Up @@ -423,7 +423,7 @@ component accessors=true serializable=false {
}

// Log shutdown complete
if ( !isNull( variables.log ) ) {
if ( isObject( variables.log ) ) {
if ( variables.log.canDebug() ) {
variables.log.debug( "Shutdown of cache factory: #getFactoryID()# completed." );
}
Expand Down Expand Up @@ -490,7 +490,7 @@ component accessors=true serializable=false {
* Remove the cache factory from scope registration if enabled, else does nothing
*/
CacheFactory function removeFromScope(){
if ( isNull( variables.config ) ) {
if ( !structKeyExists( variables, "config" ) || isNull( variables.config ) ) {
return this;
}

Expand Down
10 changes: 5 additions & 5 deletions system/cache/config/CacheBoxConfig.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ component accessors="true" {
var cacheBoxDSL = arguments.rawDSL;

// Is default configuration defined
if ( isNull( cacheBoxDSL.defaultCache ) ) {
if ( !structKeyExists( cacheBoxDSL, "defaultCache" ) || isNull( cacheBoxDSL.defaultCache ) ) {
throw(
"No default cache defined",
"Please define the 'defaultCache'",
Expand All @@ -104,25 +104,25 @@ component accessors="true" {

// Register LogBox Configuration
this.logBoxConfig( variables.DEFAULTS.logBoxConfig );
if ( !isNull( cacheBoxDSL.logBoxConfig ) ) {
if ( structKeyExists( cacheBoxDSL, "logBoxConfig" ) && !isNull( cacheBoxDSL.logBoxConfig ) ) {
this.logBoxConfig( cacheBoxDSL.logBoxConfig );
}

// Register Server Scope Registration
if ( !isNull( cacheBoxDSL.scopeRegistration ) ) {
if ( structKeyExists( cacheBoxDSL, "scopeRegistration" ) && !isNull( cacheBoxDSL.scopeRegistration ) ) {
this.scopeRegistration( argumentCollection = cacheBoxDSL.scopeRegistration );
}

// Register Caches
if ( !isNull( cacheBoxDSL.caches ) ) {
if ( structKeyExists( cacheBoxDSL, "caches" ) && !isNull( cacheBoxDSL.caches ) ) {
for ( var key in cacheBoxDSL.caches ) {
cacheBoxDSL.caches[ key ].name = key;
this.cache( argumentCollection = cacheBoxDSL.caches[ key ] );
}
}

// Register listeners
if ( !isNull( cacheBoxDSL.listeners ) ) {
if ( structKeyExists( cacheBoxDSL, "listeners" ) && !isNull( cacheBoxDSL.listeners ) ) {
for ( var key in cacheBoxDSL.listeners ) {
this.listener( argumentCollection = key );
}
Expand Down
2 changes: 1 addition & 1 deletion system/cache/store/ConcurrentStore.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ component implements="coldbox.system.cache.store.IObjectStore" accessors="true"
* @return java.util.Collections
*/
private function getJavaCollections(){
if ( isNull( variables.collections ) ) {
if ( !structKeyExists( variables, "collections" ) || isNull( variables.collections ) ) {
variables.collections = createObject( "java", "java.util.Collections" );
}
return variables.collections;
Expand Down
4 changes: 2 additions & 2 deletions system/cache/store/DiskStore.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ component implements="coldbox.system.cache.store.IObjectStore" accessors="true"

// Get extra configuration details from cacheProvider's configuration for this diskstore
// Auto Expand
if ( isNull( config.autoExpandPath ) ) {
if ( !structKeyExists( config, "autoExpandPath" ) || isNull( config.autoExpandPath ) ) {
config.autoExpandPath = true;
}

// Check directory path
if ( isNull( config.directoryPath ) ) {
if ( !structKeyExists( config, "directoryPath" ) || isNull( config.directoryPath ) ) {
throw(
message = "The 'directoryPath' configuration property was not found in the cache configuration",
detail = "Please check the cache configuration and add the 'directoryPath' property. Current Configuration: #config.toString()#",
Expand Down
2 changes: 1 addition & 1 deletion system/core/delegates/Env.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ component singleton {
* Retrieve an instance of Java System
*/
function getJavaSystem(){
if ( isNull( variables.javaSystem ) ) {
if ( !structKeyExists( variables, "javaSystem" ) || isNull( variables.javaSystem ) ) {
variables.javaSystem = createObject( "java", "java.lang.System" );
}
return variables.javaSystem;
Expand Down
2 changes: 1 addition & 1 deletion system/core/delegates/Flow.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ component accessors=true {
* Pivots if used in delegate or normal mode.
*/
private function getParent(){
return isNull( $parent ) ? this : $parent;
return structKeyExists( variables, "$parent" ) && !isNull( variables.$parent ) ? variables.$parent : this;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions system/core/util/Util.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ component {

private function getClassMappingHelper(){
// Lazy load the helper
if ( isNull( variables.classMappingHelper ) ) {
if ( !structKeyExists( variables, "classMappingHelper" ) || isNull( variables.classMappingHelper ) ) {
if ( server.keyExists( "boxlang" ) ) {
variables.classMappingHelper = new BoxLangMappingHelper();
} else if ( listFindNoCase( "Lucee", server.coldfusion.productname ) ) {
Expand Down Expand Up @@ -121,7 +121,7 @@ component {
* @return java.net.InetAddress
*/
private function getInetAddress(){
if ( isNull( variables.inetAddress ) ) {
if ( !structKeyExists( variables, "inetAddress" ) || isNull( variables.inetAddress ) ) {
variables.inetAddress = createObject( "java", "java.net.InetAddress" );
}
return variables.inetAddress;
Expand Down Expand Up @@ -297,7 +297,7 @@ component {
* @return coldbox.system.core.dynamic.MixerUtil
*/
function getMixerUtil(){
if ( isNull( variables.mixerUtil ) ) {
if ( !structKeyExists( variables, "mixerUtil" ) || isNull( variables.mixerUtil ) ) {
variables.mixerUtil = new coldbox.system.core.dynamic.MixerUtil();
}
return variables.mixerUtil;
Expand Down
6 changes: 3 additions & 3 deletions system/ioc/Builder.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ component serializable="false" accessors="true" {
* @return coldbox.system.ioc.dsl.ColdBoxDSL
*/
function getColdBoxDSL(){
if ( isNull( variables.coldboxDSL ) ) {
if ( !structKeyExists( variables, "coldboxDSL" ) || isNull( variables.coldboxDSL ) ) {
variables.coldboxDSL = new coldbox.system.ioc.dsl.ColdBoxDSL( variables.injector );
}
return variables.coldboxDSL;
Expand All @@ -91,7 +91,7 @@ component serializable="false" accessors="true" {
* @return coldbox.system.ioc.dsl.CacheBoxDSL
*/
function getCacheBoxDSL(){
if ( isNull( variables.cacheBoxDSL ) ) {
if ( !structKeyExists( variables, "cacheBoxDSL" ) || isNull( variables.cacheBoxDSL ) ) {
variables.cacheBoxDSL = new coldbox.system.ioc.dsl.CacheBoxDSL( variables.injector );
}
return variables.cacheBoxDSL;
Expand All @@ -103,7 +103,7 @@ component serializable="false" accessors="true" {
* @return coldbox.system.ioc.dsl.LogBoxDSL
*/
function getLogBoxDSL(){
if ( isNull( variables.logBoxDSL ) ) {
if ( !structKeyExists( variables, "logBoxDSL" ) || isNull( variables.logBoxDSL ) ) {
variables.logBoxDSL = new coldbox.system.ioc.dsl.LogBoxDSL( variables.injector );
}
return variables.logBoxDSL;
Expand Down
4 changes: 2 additions & 2 deletions system/logging/LogEvent.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ component accessors="true" {
}

function getXmlConverter(){
if ( isNull( variables.xmlConverter ) ) {
if ( !structKeyExists( variables, "xmlConverter" ) || isNull( variables.xmlConverter ) ) {
variables.xmlConverter = new coldbox.system.core.conversion.XMLConverter();
}
return variables.xmlConverter;
}

function getUtil(){
if ( isNull( variables.util ) ) {
if ( !structKeyExists( variables, "util" ) || isNull( variables.util ) ) {
variables.util = new coldbox.system.core.util.Util();
}
return variables.util;
Expand Down
2 changes: 1 addition & 1 deletion system/logging/Logger.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ component accessors="true" {
thisAppender.logMessage( thread.logEvent );
}
} else {
if ( isNull( local.logEvent ) ) {
if ( !structKeyExists( local, "logEvent" ) || isNull( local.logEvent ) ) {
var logEvent = new coldbox.system.logging.LogEvent( argumentCollection = arguments );
}
thisAppender.logMessage( local.logEvent );
Expand Down
Loading
Loading