[
https://issues.apache.org/jira/browse/ARIES-823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200576#comment-13200576
]
Alasdair Nottingham commented on ARIES-823:
-------------------------------------------
Might help if I spelled reference correctly in the property name. I will use
"aries.object.factory.requires.reference"
> Cope with badly written ObjectFactorys
> --------------------------------------
>
> Key: ARIES-823
> URL: https://issues.apache.org/jira/browse/ARIES-823
> Project: Aries
> Issue Type: Improvement
> Components: JNDI
> Reporter: Alasdair Nottingham
> Assignee: Alasdair Nottingham
> Priority: Minor
>
> I keep coming across badly written ObjectFactory classes which assume that
> the first parameter is a Reference and therefore always cast to this without
> doing an instance of check first. These are badly behaved and crummy, but it
> seems quite pervasive in the world of JNDI, which might have something to do
> with the lack of understanding people have of JNDI given it is poorly
> documented.
> So far I've managed to get the poorly written ObjectFactories fixed, but this
> is such a common pattern I've raised a spec bug in the OSGi alliance to
> provide a way to "opt-out" of the phase that causes most problems. I'm
> raising this to prototype a fix.
> I'm proposing (well about to commit) a fix that means an ObjectFactory with a
> property called aries.object.factory.requires.refernece set to Boolean.TRUE
> will not be called if the first parameter is not a Reference.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira