Uploaded image for project: 'Lucee Development'
  1. LDEV-476

built in function names reserved in cfinterface

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.5.2.001
    • Fix Version/s: 5.0.0.60, 4.5.2.008
    • Labels:
      None

      Description

      Using a function name that exists as built in function within <cfinterface> will throw a "The name [...] is already used by a built in Function" exception.

      Test.cfc

      <cfcomponent implements="ITest">
      
      	<cffunction name="find" access="public" output="false" returnType="any">
      	</cffunction>
      
      </cfcomponent>
      

      ITest.cfc

      <cfinterface>
      
      	<cffunction name="find" access="public" output="false" returnType="any">
      	</cffunction>
      
      </cfinterface>
      
      <cfset new Test()>
      // throws exception in Lucee
      // works in Adobe ColdFusion
      

      Stacktrace
      The name [find] is already used by a built in Functionat lucee.transformer.cfml.evaluator.impl.Function.checkFunctionName(Function.java:151):151
      at lucee.transformer.cfml.evaluator.impl.Function.evaluate(Function.java:71):71
      at lucee.transformer.cfml.evaluator.EvaluatorPool.run(EvaluatorPool.java:71):71
      at lucee.transformer.cfml.tag.CFMLTransformer.transform(CFMLTransformer.java:298):298
      at lucee.transformer.cfml.tag.CFMLTransformer.transform(CFMLTransformer.java:142):142
      at lucee.runtime.compiler.CFMLCompilerImpl.compile(CFMLCompilerImpl.java:71):71
      at lucee.runtime.PageSourceImpl._compile(PageSourceImpl.java:335):335
      at lucee.runtime.PageSourceImpl.compile(PageSourceImpl.java:309):309
      at lucee.runtime.PageSourceImpl.loadPhysical(PageSourceImpl.java:253):253
      at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:192):192
      at lucee.runtime.config.ConfigImpl.getCachedPage(ConfigImpl.java:2990):2990
      at lucee.runtime.component.ComponentLoader.load(ComponentLoader.java:119):119
      at lucee.runtime.component.ComponentLoader.loadInterface(ComponentLoader.java:63):63
      at lucee.runtime.InterfaceImpl.loadImplements(InterfaceImpl.java:129):129
      at lucee.runtime.InterfaceImpl.loadImplements(InterfaceImpl.java:115):115
      at lucee.runtime.component.InterfaceCollection.<init>(InterfaceCollection.java:38):38
      at lucee.runtime.ComponentImpl.init(ComponentImpl.java:413):413
      ...

        Attachments

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              AKwaschny Alexander Kwaschny
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: