Photo from Chile

You Cannot Use ColdFusion's Internal Java Class Method Names Either

We all know that you cannot create a method in a cfc that has the same name as a built-in ColdFusion function. For example, this:

    <cffunction name="DateFormat" access="Public" returntype="any">
        <cfargument name="aDate" type="any" required="true" />
        <cfreturn DateFormat(arguments.aDate) />

Throws this error:

But what I didn't know was that this:

    <cffunction name="EvaluateCondition" access="Public" returntype="any">
        <cfargument name="Condition" type="any" required="true" />
        <cfreturn Evaluate(arguments.Condition) />

Would throw this error:

It appears as if EvaluateCondition is a method of the coldfusion.runtime.CFPage internal java class, and I guess that's what's upsetting it.

File this under the "You Learn Something New Every Day" category, or under the "Bob Learns Something New Every Day" category if you already knew it ;-)