commit | 32fa081a797a97beaf77a4f2efca26c39168e72f | [log] [tgz] |
---|---|---|
author | David Ostrovsky <david@ostrovsky.org> | Fri Sep 29 10:30:37 2023 +0200 |
committer | David Ostrovsky <david@ostrovsky.org> | Fri Sep 29 10:48:28 2023 +0200 |
tree | 51a2e4f35f0d72cce88850b026bf17858bd2536e | |
parent | 8af621b7b99641eb803caa460009290a47fa3111 [diff] |
Fix BoxedPrimitiveEquality bug pattern flagged by error prone Details: https://errorprone.info/bugpattern/BoxedPrimitiveEquality Change-Id: I50c127363866ad654841e2238967a030cfb859b1
diff --git a/src/prettify/parser/CombinePrefixPattern.java b/src/prettify/parser/CombinePrefixPattern.java index 9b4da88..a1e9fe8 100644 --- a/src/prettify/parser/CombinePrefixPattern.java +++ b/src/prettify/parser/CombinePrefixPattern.java
@@ -161,7 +161,7 @@ @Override public int compare(List<Integer> a, List<Integer> b) { - return a.get(0) != b.get(0) ? (a.get(0) - b.get(0)) : (b.get(1) - a.get(1)); + return !a.get(0).equals(b.get(0)) ? (a.get(0) - b.get(0)) : (b.get(1) - a.get(1)); } }); List<List<Integer>> consolidatedRanges = new ArrayList<List<Integer>>();