tracker issue : CF-4202540

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] Bug for: standard attribute notation doesn't override JavaDoc notation

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Aaron Neff / ()

Created: 05/21/2018

Components: Language, CFSCRIPT

Versions: 2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2018.0.01.308605 (PreRelease) / 2018.0.0.309703

Priority/Frequency: Normal / Very few users will encounter

Locale/System: / Platforms All

Vote Count: 0

Issue: standard attribute notation doesn't override JavaDoc notation

Note: The "Defining components and functions in CFScript" doc says "Attribute values set in the element declaration take precedence over the values set in the comment section. Therefore, if you set an attribute, such as a hint in both locations, ColdFusion ignores the value in the comment section and uses only the one in the element declaration.".

Note: Lucee correctly behaves as per that doc, but CF throws coldfusion.compiler.DuplicateAttributeException.

Repro:
{code:java}
<cfscript>
  /**
  *@description original description
  *@displayname original displayname
  *@hint original hint
  *@output false
  *@roles original,roles
  */
  public function foo() description="overridden description" displayname="overridden displayname" hint="overridden hint" output=false roles="overridden,roles" {}
  writeDump(foo)
</cfscript>
{code}


Actual Result: coldfusion.compiler.DuplicateAttributeException

Expected Result (and actual behavior w/ Lucee):
-----------
function foo

Arguments: none 
ReturnType: Any 
Roles: overridden,roles 
Access: public 
Output: false 
DisplayName: overridden displayname 
Hint: overridden hint 
Description: overridden description
-----------

Related URL: https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/extending-coldfusion-pages-with-cfml-scripting/defining-components-and-functions-in-cfscript.html

Related post: http://blog.cfaether.com/2018/05/standard-attribute-notation-doesnt.html

Attachments:

Comments:

Hi Adobe, I realize my example code doesn't show the REST-related attributes, but those should also work the same way. Thanks!, -Aaron
Comment by Aaron N.
27911 | May 22, 2018 08:31:28 AM GMT