Parsing issue with CFC property containing attribute with no value

Description

Forum Reference:https://groups.google.com/forum/?fromgroups=&hl=en#!topic/railo/FQTR3BwXvVs

This behavior affects the information returned by getMetaData() on a CFC.
In ACF, I can use the following line in a script-based CFC and the value of the "name" attribute is "myService" and the value of the "inject" attribute is "". (Excepted behavior)

In Lucee, the metadata shows a key called "name" with the value "inject" and there is no key called "inject". The string "myService" doesn't make it into the metadata at all. To get it to work, I have to use the following syntax:

In this case, it's not an issue of "inject" getting a default value, but instead the parser getting confused and trying to use the name of the "inject" attribute as the value of the "name" key.
The code samples are properties used by the WireBox DI/ioc framework which parses CFC metadata to perform mixin injection.

Attachments

1

relates to

Activity

Show:

Former user 8 February 2016 at 19:12
Edited

Is it necessary to break: property myProperty; ? I guess not.

Edit: Fixed in 4.5.3.004

John Berquist 4 January 2016 at 21:19

I was trying out 4.5.3.002, and I noticed that the syntax "property myProperty;" was no longer working in components. Instead Lucee throws a "missing name declaration for property" error. I suspect it is related to the fix for this issue.

Former user 2 September 2015 at 19:55

The above seems to work as you are expecting the below to. Will carry on looking into this to see if I can find the reason why

Brad Wood 22 July 2015 at 19:41

Comment from Brad

I'd love to see this get fixed. I just ran into this code again today where an app worked on Adobe CF, but errored on Railo.

Fixed

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Fix versions

Affects versions

Priority

Created 22 July 2015 at 19:40
Updated 8 February 2016 at 21:21
Resolved 7 December 2015 at 10:14