X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=datarouter-prov%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdatarouter%2Fprovisioning%2Futils%2FRLEBitSet.java;h=7914c81d08b9740a92068bb1dff780a87d0d502a;hb=refs%2Fchanges%2F22%2F92022%2F2;hp=bc1919f76d77805aff7875709b8320e4ace187de;hpb=b10c179229cea56e36a2fb9b6f2c17baf0d83f13;p=dmaap%2Fdatarouter.git diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/RLEBitSet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/RLEBitSet.java index bc1919f7..7914c81d 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/RLEBitSet.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/RLEBitSet.java @@ -144,7 +144,7 @@ public class RLEBitSet { * Creates a new bit set. All bits are initially false. */ public RLEBitSet() { - bitsets = new TreeSet(); + bitsets = new TreeSet<>(); } /** @@ -153,7 +153,7 @@ public class RLEBitSet { * @param s the initialization String */ public RLEBitSet(String s) { - bitsets = new TreeSet(); + bitsets = new TreeSet<>(); set(s); } @@ -196,7 +196,7 @@ public class RLEBitSet { * @throws NumberFormatException - if a number is incorrectly formatted * @throws IndexOutOfBoundsException - if an index is negative */ - public void set(String s) throws NumberFormatException { + public void set(String s) { s = s.trim(); if (!s.isEmpty()) { for (String s2 : s.split("[, \n]+")) { @@ -280,7 +280,7 @@ public class RLEBitSet { public void clear(long from, long to) { checkRange(from, to); RLE newbits = new RLE(from, to - from); - List newranges = new ArrayList(); + List newranges = new ArrayList<>(); synchronized (bitsets) { for (RLE bs : bitsets) { if (bs.intersects(newbits)) {