Skip to content

Commit 8d2d1b8

Browse files
committed
Removed one exclusion as unnecessary in FindBugsExcludeFilter.xml
Documented in the code where the SpotBugs finds issues that we still suppress. (only 3 places.)
1 parent 159e61b commit 8d2d1b8

4 files changed

Lines changed: 5 additions & 9 deletions

File tree

src/main/java/org/apache/datasketches/kll/KllItemsSketch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public double[] getRanks(final T[] quantiles, final QuantileSearchCriteria searc
243243
public final KllItemsSketchSortedView<T> getSortedView() {
244244
if (isEmpty()) { throw new SketchesArgumentException(EMPTY_MSG); }
245245
refreshSortedView();
246-
return kllItemsSV;
246+
return kllItemsSV; //SpotBugs EI_EXPOSE_REP, Suppressed by FindBugsExcludeFilter
247247
}
248248

249249
@Override

src/main/java/org/apache/datasketches/quantilescommon/GenericSortedViewIterator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public class GenericSortedViewIterator<T> implements SortedViewIterator {
3535
private int index;
3636

3737
public GenericSortedViewIterator(final T[] quantiles, final long[] cumWeights) {
38-
this.quantiles = quantiles;
39-
this.cumWeights = cumWeights;
38+
this.quantiles = quantiles; //SpotBugs EI_EXPOSE_REP2 suppressed by FindBugsExcludeFilter
39+
this.cumWeights = cumWeights; //SpotBugs EI_EXPOSE_REP2 suppressed by FindBugsExcludeFilter
4040
this.totalN = (cumWeights.length > 0) ? cumWeights[cumWeights.length - 1] : 0;
4141
index = -1;
4242
}

src/test/java/org/apache/datasketches/req/ReqDebugImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public ReqDebugImpl(final int debugLevel, final String fmt) {
5353
@Override
5454
public void emitStart(final ReqSketch sk) {
5555
if (debugLevel == 0) { return; }
56-
this.sk = sk;
56+
this.sk = sk; //SpotBugs EI_EXPOSE_REP2 suppressed by FindBugsExcludeFilter
5757
println("START");
5858
}
5959

tools/FindBugsExcludeFilter.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,9 @@ under the License.
5555
<Class name="org.apache.datasketches.kll.KllItemsSketch"/>
5656
</Match>
5757

58-
<Match>
59-
<Bug pattern="EI_EXPOSE_REP2"/>
60-
<Class name="org.apache.datasketches.kll.KllItemsSketchSortedView"/>
61-
</Match>
62-
6358
<Match>
6459
<Bug pattern="EI_EXPOSE_REP2"/>
6560
<Class name="org.apache.datasketches.quantilescommon.GenericSortedViewIterator"/>
6661
</Match>
62+
6763
</FindBugsFilter>

0 commit comments

Comments
 (0)