[ 
https://issues.apache.org/jira/browse/RIVER-7?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on RIVER-7 started by Mark Brouwer.

> com.sun.jini.tool.ClassDep should be smarter with outer classes
> ---------------------------------------------------------------
>
>                 Key: RIVER-7
>                 URL: https://issues.apache.org/jira/browse/RIVER-7
>             Project: River
>          Issue Type: Improvement
>            Reporter: Mark Brouwer
>         Assigned To: Mark Brouwer
>
> The javadoc for {{com.sun.jini.tool.ClassDep}} states the following "??By 
> default, if a static nested class is included in the dependency graph, all 
> references from that static nested class to its immediate lexically enclosing 
> class are ignored, to avoid inadvertent inclusion of the enclosing class. 
> (The default is chosen this way because the compiled class file of a static 
> nested class always contains a reference to the immediate lexically enclosing 
> class.) This option causes all such references to be considered rather than 
> ignored.  Note that this option is needed very infrequently.??".
> I agree with this default behavior, however I've been surpised a few times by 
> the following use case which always looked like a bug in {{ClassDep}}.
> {noformat:nopanel}
> class Proxy {
>     static final class ConstrainableProxy extends Proxy {
>     }
> }
> {noformat}
> During dependency checking I want to specify {{Proxy$ConstrainableProxy}} but 
> in most cases this causes {{Proxy}} to be missing from the download JAR file 
> (although often a trust verifier drags it in anyway) and changing the default 
> behavior is not what I want.
> Maybe it is possible to add a check to see whether the enclosing class is a 
> parent of the nested class, if so it could be including in the collection of 
> classes to be considered for dependency checking.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to