[shrinkwrap-issues] [JBoss JIRA] Commented: (SHRINKWRAP-260) Anti-pattern use of getPackage

Andrew Rubinger (JIRA) jira-events at lists.jboss.org
Tue Mar 15 15:11:52 EDT 2011


    [ https://issues.jboss.org/browse/SHRINKWRAP-260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588104#comment-12588104 ] 

Andrew Rubinger commented on SHRINKWRAP-260:
--------------------------------------------

IMO the limitations of passing around packages should be known by or clearly communicated to the user via JavaDoc.  I think the only other option is to kill "addPackage*" entirely (to force things to be consistent), but that's not going to fly.  Would be happy seeing documentation added to correct this issue and keep expectations clear with the end-user.

> Anti-pattern use of getPackage
> ------------------------------
>
>                 Key: SHRINKWRAP-260
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-260
>             Project: ShrinkWrap
>          Issue Type: Bug
>            Reporter: Carlo de Wolf
>
> ClassContainer.addPackage suffers from an anti-pattern, because Package.getPackage returns null if no classes have been loaded from that package yet.
> As an example see org.jboss.jsfunit.arquillian.JSFUnitApplicationArchiveProcessor.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the shrinkwrap-issues mailing list