[ColdBox BE] Railo handling of empty attributes in metadata

So today I was playing around running some code on Railo (DevBox) that I normally run on ACF.

I noticed a difference in the handling of cfproperty tags like so:

The issue seems to be that the metadata of the component gives inject a value of “” for ACF, but “true” for Railo. This means that on Railo WireBox converts that into a DSL of “ID:true” which obviously doesn’t work since “true” is not a valid mapping ID.

Changing the property to this makes it work since I’m giving an explicit value to inject:

Of course, that’s kind of annoying since the first syntax works in ACF and I’ve used it all over my app.

I modified mapping.cfc’s processDIMetadata() method and added the second half of this if statement:

// Get injection if it exists
if( len(md.properties[x].inject) && md.properties[x].inject != true){
params.inject = md.properties[x].inject;
}

That would create issues though if someone had a component actually called “true” or even used a mapping explicitly created with an id of “true”.

Is anyone aware of a Railo workaround to change how value-less attributes are handled, or for that matter, does anyone think that change to mapping.cfc is safe and no one will ever have a mapping ID actually called “true”?

Submitting this as a bug to Railo as a CF incompatibility is also a valid option, I guess.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com