Skip to content

Commit ebcb724

Browse files
committed
Suppress false positives from Infer
#131
1 parent 5fa6964 commit ebcb724

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/org/cicirello/sequences/distance/KendallTauSequenceDistance.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
* Industrial Networks and Intelligent Systems, 7(23), Article e1, April 2020.</p>
7878
*
7979
* @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>, <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
80-
* @version 4.2.2021
80+
* @version 5.13.2021
8181
*/
8282
public final class KendallTauSequenceDistance implements SequenceDistanceMeasurer {
8383

@@ -333,6 +333,7 @@ private Bucket[][] bucketSortElements(int[][] relabeling, int numLabels) {
333333
}
334334

335335
private int relabelElementsWithHash(Object[] s1, Object[] s2, int[][] relabeling) {
336+
@SuppressWarnings("NULL_DEREFERENCE")
336337
HashMap<Object,Integer> labelMap = new HashMap<Object,Integer>((int)(1.334 * relabeling.length)+2);
337338
int current = -1;
338339
for (int i = 0; i < relabeling.length; i++) {
@@ -352,6 +353,7 @@ private int relabelElementsWithHash(Object[] s1, Object[] s2, int[][] relabeling
352353
}
353354

354355
private <T> int relabelElementsWithHash(List<T> s1, List<T> s2, int[][] relabeling) {
356+
@SuppressWarnings("NULL_DEREFERENCE")
355357
HashMap<T,Integer> labelMap = new HashMap<T,Integer>((int)(1.334 * relabeling.length)+2);
356358
int current = -1;
357359
for (T e : s1) {

0 commit comments

Comments
 (0)