Skip to content

Commit

Permalink
Fixed false positive from SpotBugs.
Browse files Browse the repository at this point in the history
These false positives correspond to regular object oriented design.
SpotBugs has just become too stringent (see
spotbugs/spotbugs#1601,
       spotbugs/spotbugs#1771,
spotbugs/spotbugs#2083,
       spotbugs/spotbugs#2344,
spotbugs/spotbugs#2356,
       spotbugs/spotbugs-gradle-plugin#731)
  • Loading branch information
maisonobe committed Apr 24, 2023
1 parent efa8f66 commit a4324e8
Show file tree
Hide file tree
Showing 8 changed files with 882 additions and 0 deletions.
34 changes: 34 additions & 0 deletions hipparchus-clustering/src/conf/spotbugs-exclude-filter.xml
Expand Up @@ -40,4 +40,38 @@
<Bug pattern="EI_EXPOSE_REP" />
</Match>

<!-- the following are considered false positive, they correspond to regular object oriented design
SpotBugs has just become too stringent (see https://github.com/spotbugs/spotbugs/issues/1601,
https://github.com/spotbugs/spotbugs/issues/1771, https://github.com/spotbugs/spotbugs/issues/2083,
https://github.com/spotbugs/spotbugs/issues/2344, https://github.com/spotbugs/spotbugs/issues/2356,
https://github.com/spotbugs/spotbugs-gradle-plugin/issues/731)
-->
<Match>
<Class name="org.hipparchus.clustering.Cluster"/>
<Method name="getPoints"/>
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.hipparchus.clustering.FuzzyKMeansClusterer"/>
<Or>
<Method name="cluster"/>
<Method name="getClusters"/>
<Method name="getRandomGenerator"/>
</Or>
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Class name="org.hipparchus.clustering.KMeansPlusPlusClusterer"/>
<Method name="getRandomGenerator"/>
<Bug pattern="EI_EXPOSE_REP" />
</Match>
<Match>
<Or>
<Class name="org.hipparchus.clustering.FuzzyKMeansClusterer"/>
<Class name="org.hipparchus.clustering.KMeansPlusPlusClusterer"/>
</Or>
<Method name="&lt;init>"/>
<Bug pattern="EI_EXPOSE_REP2" />
</Match>

</FindBugsFilter>

0 comments on commit a4324e8

Please sign in to comment.