Unnamed events in controller processor maps silently override each other
------------------------------------------------------------------------ Key: OFBIZ-3961 URL: https://issues.apache.org/jira/browse/OFBIZ-3961 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: Release Branch 09.04, Release Branch 10.04 Reporter: Wickersheimer Jeremy Fix For: Release Branch 09.04, Release Branch 10.04 Attachments: OFBIZ-3961.patch I found this issue while debugging our preprocessor events. Looks like a feature was introduced at some point to allow those events to override others with the same name (i guess in order to redefine the inherited events for a parent controller), but a side effect is that the previously defined events that worked without a name attribute are now overriding each other (as they are all events with the name Null). Worst thing is this happens kind of silently, so this is really not obvious. Instead i think the default should be to autogenerate a unique name if none is specified in the controller since overriding and event is something that should be done explicitly anyway. Attaching a patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wickersheimer Jeremy updated OFBIZ-3961: ---------------------------------------- Attachment: OFBIZ-3961.patch > Unnamed events in controller processor maps silently override each other > ------------------------------------------------------------------------ > > Key: OFBIZ-3961 > URL: https://issues.apache.org/jira/browse/OFBIZ-3961 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 09.04, Release Branch 10.04 > Reporter: Wickersheimer Jeremy > Fix For: Release Branch 09.04, Release Branch 10.04 > > Attachments: OFBIZ-3961.patch > > > I found this issue while debugging our preprocessor events. > Looks like a feature was introduced at some point to allow those events to override others with the same name (i guess in order to redefine the inherited events for a parent controller), but a side effect is that the previously defined events that worked without a name attribute are now overriding each other (as they are all events with the name Null). > Worst thing is this happens kind of silently, so this is really not obvious. Instead i think the default should be to autogenerate a unique name if none is specified in the controller since overriding and event is something that should be done explicitly anyway. > Attaching a patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916016#action_12916016 ] Scott Gray commented on OFBIZ-3961: ----------------------------------- Hi Jeremy, I thought I had already fixed this, have you checked in the trunk? > Unnamed events in controller processor maps silently override each other > ------------------------------------------------------------------------ > > Key: OFBIZ-3961 > URL: https://issues.apache.org/jira/browse/OFBIZ-3961 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 09.04, Release Branch 10.04 > Reporter: Wickersheimer Jeremy > Fix For: Release Branch 09.04, Release Branch 10.04 > > Attachments: OFBIZ-3961.patch > > > I found this issue while debugging our preprocessor events. > Looks like a feature was introduced at some point to allow those events to override others with the same name (i guess in order to redefine the inherited events for a parent controller), but a side effect is that the previously defined events that worked without a name attribute are now overriding each other (as they are all events with the name Null). > Worst thing is this happens kind of silently, so this is really not obvious. Instead i think the default should be to autogenerate a unique name if none is specified in the controller since overriding and event is something that should be done explicitly anyway. > Attaching a patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916047#action_12916047 ] Wickersheimer Jeremy commented on OFBIZ-3961: --------------------------------------------- I just saw you have a similar fix in 10.04, but not in 09.04 though. Perhaps you can backport your fix there ? > Unnamed events in controller processor maps silently override each other > ------------------------------------------------------------------------ > > Key: OFBIZ-3961 > URL: https://issues.apache.org/jira/browse/OFBIZ-3961 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: Release Branch 09.04, Release Branch 10.04 > Reporter: Wickersheimer Jeremy > Fix For: Release Branch 09.04, Release Branch 10.04 > > Attachments: OFBIZ-3961.patch > > > I found this issue while debugging our preprocessor events. > Looks like a feature was introduced at some point to allow those events to override others with the same name (i guess in order to redefine the inherited events for a parent controller), but a side effect is that the previously defined events that worked without a name attribute are now overriding each other (as they are all events with the name Null). > Worst thing is this happens kind of silently, so this is really not obvious. Instead i think the default should be to autogenerate a unique name if none is specified in the controller since overriding and event is something that should be done explicitly anyway. > Attaching a patch. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |