You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Alasdair Nottingham (Created) (JIRA)" <ji...@apache.org> on 2012/02/04 23:23:53 UTC
[jira] [Created] (ARIES-823) Cope with badly written ObjectFactorys
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
[jira] [Resolved] (ARIES-823) Cope with badly written
ObjectFactorys
Posted by "Alasdair Nottingham (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ARIES-823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alasdair Nottingham resolved ARIES-823.
---------------------------------------
Resolution: Fixed
> 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
[jira] [Commented] (ARIES-823) Cope with badly written
ObjectFactorys
Posted by "Alasdair Nottingham (Commented) (JIRA)" <ji...@apache.org>.
[ 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