Title:
Bug 75806:(Watson Migration Closure)Component metadata omits attributes when the user omits them but it would be more useful if the metadata always contains the attributes, with the default values, as this would make it easier for metad
| View in TrackerStatus/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): Sean Corfield / Sean Corfield (Sean Corfield)
Created: 03/06/2009
Components: Language, CF Component
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Platforms All
Vote Count: 5
Problem:
Component metadata omits attributes when the user omits them but it would be more useful if the metadata always contains the attributes, with the default values, as this would make it easier for metadata-driven tools.
Currently, such tools always have to test for the presence of the attribute and explicitly contain logic for the defaults defined in the CFML language reference. This is unnecessary complication - and it forces duplication of the "defaulting" behavior of the language itself.
Any attribute that has a default value should always be present in the metadata (with the language default value if the user omits the attribute). This should be true for cfcomponent, cffunction and cfargument.
Furthermore, array elements in the metadata should always be present and be empty (zero elements). Right now, metadata-driven programs have to test structKeyExists(metadata,"functions") instead of just simply being able to loop over the functions. The same is true for properties and arguments and so on.
This is a small change that would greatly simplify the task of framework developers!
I suspect it would have a small performance overhead on metadata creation tho?
Method:
Result:
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3037762
External Customer Info:
External Company:
External Customer Name: Sean Corfield
External Customer Email: 479B4EDC43F3A88B992016B6
External Test Config: 03/06/2009
Attachments:
Comments: