AdobeStock_455007340

Don't Name CFC Arguments "T"

This one was found by a ColdFusion user at Lockheed Martin who sent me a CFC that could not be invoked via SOAP, on every call it threw “Duplicate declaration of local variable t” errors. The problem? “t” is kind of reserved, the CFC to Java conversion code defines “t” as java.lang.Throwable. This is a bug, and has been filed as such, for now, just don’t name CFC arguments “t”.

2 responses to “Don't Name CFC Arguments "T"”

  1. Nathan Dintenfass Avatar
    Nathan Dintenfass

    Yet another reason to use descriptive naming rather than trying to save a few keystrokes, I suppose.

  2. edwin Avatar
    edwin

    Another samelike prob is that I passed a structure as a property… I have 2 datasources… 1 for selecting and one for updating and I passed it as dsn.select and dsn.execute…
    In the properties I had put both of them with as name "dns.select" and this to give a description for each key in the struct…
    This was not accepted when using it as webservice…

Leave a Reply