Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Pat Wenke / Pat Wenke (prwenke)
Created: 09/08/2009
Components: Language, Functions
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: GMC / 250674
Priority/Frequency: Major / Unknown
Locale/System: English / Win All
Vote Count: 0
Problem:
For database CRUD operations, we use generated DAOs. They all extend a base DAO that houses common methods. One of those methods is named isNull().After installing the GMC, calls to isNull() from within a CFC broke with the following error:IsNull function takes only one argumentObviously, those calls were going to the new built-in isNull function instead of the CFC method, so I fixed that problem by simply changing the calls to this.isNull().Now I have another problem. The following code still breaks:<cfargument name="commitFlag" type="boolean" required="false" default="#!this.isNull()#"/>
Method:
Code for Test.cfc<cfcomponent><cffunction name="isNull" access="public" returntype="boolean" output="false"><cfreturn true/></cffunction> <cffunction name="brokenMethod" access="public" returntype="boolean" output="false"><cfargument name="arg1" type="boolean" required="false" default="#this.isNull()#"/><cfreturn arg1/></cffunction><cffunction name="workingMethod" access="public" returntype="boolean" output="false"><cfreturn this.isNull()/></cffunction></cfcomponent>Code for test.cfm<cfscript>test = createObject( "component", "com.Test" );</cfscript>Comment out the brokenMethod method in the CFC and everything will work fine.
Result:
Error casting an object of type java.lang.String cannot be cast to java.lang.reflect.Method to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3039938
External Customer Info:
External Company:
External Customer Name: Pat Wenke
External Customer Email: 643B69BD3CFFC136992001AC
External Test Config: 09/08/2009
Attachments:
Comments: