[ 
https://jira.codehaus.org/browse/MOJO-1773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282958#comment-282958
 ] 

Ian Robertson commented on MOJO-1773:
-------------------------------------

>From an ideal standpoint, I agree with you. But then from an ideal standpoint, 
>there should be no need to have <ignoreClasses> clauses at all for the 
>BanDuplicateClasses rule. The ignores clause is useful for situations where 
>it's difficult to avoid duplication, but it is believed that the duplication 
>is "harmless". Duplication can be harmless if one knows that the duplicated 
>classes will never actually be referenced, or if either the two classes are 
>equally suitable. In many cases, the developer putting in an <ignorClasses> 
>tag does so assuming that the duplicate classes are in fact identical. If this 
>turns out not to be the case (possibly at some point in the future, as version 
>numbers change), it would be good to get notified about this.

That said, I can see merit in your point about this not simply being a boolean 
parameter. Perhaps in addition to <ignoreClasses>, adding a 
<ignoreIdenticalClasses> tag that would only allow the matching classes to 
duplicate in the event that they match byte-for-byte?

> BanDuplicateClasses should have option to allow identical duplicates
> --------------------------------------------------------------------
>
>                 Key: MOJO-1773
>                 URL: https://jira.codehaus.org/browse/MOJO-1773
>             Project: Mojo
>          Issue Type: Bug
>          Components: extra-enforcer-rules
>    Affects Versions: extra-enforcer-rules-1.0-alpha-2
>            Reporter: Ian Robertson
>
> An unfortunate trend in some projects is to have two versions of a module, 
> one marked -core, and one marked -all. The -all module is a strict superset 
> of the -core. I would like to add an option that would allow byte-for-byte 
> identical duplicates if none of the packages in questio are sealed. To 
> minimize overhead, sameness checks would be performed only after duplicates 
> were detected.
> I would propose that the property name be:
>  private boolean allowIdenticalyDuplicates

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

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to