Skip to content

Commit

Permalink
Merge 7c9f0a6 into 3972e83
Browse files Browse the repository at this point in the history
  • Loading branch information
arturobernalg committed Dec 21, 2020
2 parents 3972e83 + 7c9f0a6 commit 6fad5be
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public Collection<V> values() {

@Override
public MapIterator<K, V> mapIterator() {
MapIterator<K, V> it;
final MapIterator<K, V> it;
if (get instanceof IterableGet) {
it = ((IterableGet<K, V>) get).mapIterator();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ private Node<K, V> lookupValue(final Object value) {
* @return the specified node
*/
private Node<K, V> nextGreater(final Node<K, V> node, final DataElement dataElement) {
Node<K, V> rval;
final Node<K, V> rval;
if (node == null) {
rval = null;
} else if (node.getRight(dataElement) != null) {
Expand Down Expand Up @@ -658,7 +658,7 @@ private Node<K, V> nextGreater(final Node<K, V> node, final DataElement dataElem
* @return the specified node
*/
private Node<K, V> nextSmaller(final Node<K, V> node, final DataElement dataElement) {
Node<K, V> rval;
final Node<K, V> rval;
if (node == null) {
rval = null;
} else if (node.getLeft(dataElement) != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ private int opCardinality(final BloomFilter other, final LongBinaryOperator oper
verifyShape(other);
final long[] mine = getBits();
final long[] theirs = other.getBits();
long[] small;
long[] big;
final long[] small;
final long[] big;
if (mine.length > theirs.length) {
big = mine;
small = theirs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public MD5Cyclic() {
public long apply(final byte[] buffer, final int seed) {

if (seed == 0) {
byte[] hash;
final byte[] hash;
synchronized (messageDigest) {
messageDigest.update(buffer);
hash = messageDigest.digest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class FixedOrderComparator<T> implements Comparator<T>, Serializable {
* @since 4.0
*/
public enum UnknownObjectBehavior {
BEFORE, AFTER, EXCEPTION;
BEFORE, AFTER, EXCEPTION
}

/** Internal map of object to position */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private void readObject(final ObjectInputStream in) throws IOException, ClassNot
@Override
@SuppressWarnings("unchecked")
public V get(final Object key) {
V v;
final V v;
return (((v = map.get(key)) != null) || map.containsKey(key))
? v
: value.transform((K) key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public class LRUMap<K, V>
/** Maximum size */
private transient int maxSize;
/** Scan behavior */
private boolean scanUntilRemovable;
private final boolean scanUntilRemovable;

/**
* Constructs a new empty map with a maximum size of 100.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,7 @@ public K firstKey() {

@Override
public K lastKey() {
Map.Entry<K, V> e;
final Map.Entry<K, V> e;
if (toKey == null) {
e = lastEntry();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ void addBulk(final BulkTest bulk, final Method m) {
return;
}

BulkTest bulk2;
final BulkTest bulk2;
try {
bulk2 = (BulkTest) m.invoke(bulk, (Object[]) null);
if (bulk2 == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
public class CollectionUtilsTest extends MockTestCase {

// -----------------------------------------------------------------------
private static Predicate<Number> EQUALS_TWO = input -> input.intValue() == 2;
private static final Predicate<Number> EQUALS_TWO = input -> input.intValue() == 2;

/**
* Collection of {@link Integer}s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void setUp() {
emptyIterable = Collections.emptyList();
}

private static Predicate<Number> EVEN = input -> input.intValue() % 2 == 0;
private static final Predicate<Number> EVEN = input -> input.intValue() % 2 == 0;

// -----------------------------------------------------------------------
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ public void setUp() {
emptyIterable = Collections.emptyList();
}

private static Predicate<Number> EQUALS_TWO = input -> input.intValue() == 2;
private static final Predicate<Number> EQUALS_TWO = input -> input.intValue() == 2;

private static Predicate<Number> EVEN = input -> input.intValue() % 2 == 0;
private static final Predicate<Number> EVEN = input -> input.intValue() % 2 == 0;

// -----------------------------------------------------------------------
@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ public void testPartition() {
assertEquals(strings, partitionMax.get(0));
}

private static Predicate<Number> EQUALS_TWO = input -> input.intValue() == 2;
private static final Predicate<Number> EQUALS_TWO = input -> input.intValue() == 2;

@Test
@SuppressWarnings("boxing") // OK in test code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static List<Locale> getSortedDeclaredLocales() {
if (field.getType() == Locale.class && Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers)) {
try {
availableLocales.add((Locale) field.get(Locale.class));
} catch (IllegalArgumentException | IllegalAccessException e) {
} catch (final IllegalArgumentException | IllegalAccessException e) {
throw new IllegalStateException("Field " + field, e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void testGrowthSet2() {
*/
@Override
public void testListAddByIndexBoundsChecking() {
List<E> list;
final List<E> list;
final E element = getOtherElements()[0];
try {
list = makeObject();
Expand All @@ -125,7 +125,7 @@ public void testListAddByIndexBoundsChecking() {
*/
@Override
public void testListAddByIndexBoundsChecking2() {
List<E> list;
final List<E> list;
final E element = getOtherElements()[0];
try {
list = makeFullCollection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ public void testRemove8() {

public void testRemove9() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
final Object obj;

m.put(ONE, ONE);

Expand All @@ -631,7 +631,7 @@ public void testRemove9() {

public void testRemove10() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
final Object obj;

m.put(ONE, ONE);
m.put(TWO, TWO);
Expand All @@ -642,7 +642,7 @@ public void testRemove10() {

public void testRemove11() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
final Object obj;

m.put(ONE, ONE);
m.put(TWO, TWO);
Expand All @@ -654,7 +654,7 @@ public void testRemove11() {

public void testRemove12() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
final Object obj;

m.put(ONE, ONE);
m.put(TWO, TWO);
Expand All @@ -666,7 +666,7 @@ public void testRemove12() {

public void testRemove13() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
final Object obj;

m.put(ONE, ONE);
m.put(TWO, TWO);
Expand All @@ -688,7 +688,7 @@ public void testNewInstance1() {

public void testGet1() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
final Object obj;

m.put(null, ONE);
obj = m.get(null);
Expand All @@ -697,7 +697,7 @@ public void testGet1() {

public void testGet2() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
final Object obj;

m.put(ONE, ONE);
m.put(null, TWO);
Expand All @@ -707,7 +707,7 @@ public void testGet2() {

public void testGet3() {
final Flat3Map<Integer, Integer> m = new Flat3Map<>();
Object obj;
final Object obj;

m.put(ONE, ONE);
m.put(TWO, TWO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ public void testListValuedMapEqualsHashCodeContract() {
}

public void testArrayListValuedHashMap() {
ListValuedMap<K, V> listMap;
ListValuedMap<K, V> listMap1;
final ListValuedMap<K, V> listMap;
final ListValuedMap<K, V> listMap1;
final Map<K, V> map = new HashMap<>();
final Map<K, V> map1 = new HashMap<>();
map.put((K) "A", (V) "W");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ public void testHashSetValueHashMap() {

public void testHashSetValueHashMap_1() {
final MultiValuedMap<K, V> map = new ArrayListValuedHashMap<>();
SetValuedMap<K, V> map1;
final SetValuedMap<K, V> map1;
final SetValuedMap<K, V> map2 = makeObject();
SetValuedMap<K, V> map3;
final SetValuedMap<K, V> map3;

map.put((K) "A", (V) "W");
map.put((K) "A", (V) "X");
Expand All @@ -167,8 +167,8 @@ public void testHashSetValueHashMap_1() {

public void testHashSetValuedHashMap_2(){
final Map<K, V> map = new HashMap<>();
SetValuedMap<K, V> map1;
SetValuedMap<K, V> map2;
final SetValuedMap<K, V> map1;
final SetValuedMap<K, V> map2;

map.put((K) "A", (V) "W");
map.put((K) "B", (V) "X");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,12 @@ public BulkTest bulkTestNavigableSetTailSet() {

public class TestNavigableSetSubSet extends AbstractNavigableSetTest<E> {

private int m_Type;
private final int m_Type;
private int m_LowBound;
private int m_HighBound;
private E[] m_FullElements;
private E[] m_OtherElements;
private boolean m_Inclusive;
private final E[] m_FullElements;
private final E[] m_OtherElements;
private final boolean m_Inclusive;

@SuppressWarnings("unchecked")
public TestNavigableSetSubSet(final int bound, final boolean head, final boolean inclusive) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ public BulkTest bulkTestSortedSetTailSet() {

public class TestSortedSetSubSet extends AbstractSortedSetTest<E> {

private int m_Type;
private final int m_Type;
private int m_LowBound;
private int m_HighBound;
private E[] m_FullElements;
private E[] m_OtherElements;
private final E[] m_FullElements;
private final E[] m_OtherElements;

@SuppressWarnings("unchecked")
public TestSortedSetSubSet(final int bound, final boolean head) {
Expand Down

0 comments on commit 6fad5be

Please sign in to comment.