Repository: commons-collections Updated Branches: refs/heads/master 864fda437 -> 2dd7c4ad8
Remove trailing white spaces on all lines. Project: http://git-wip-us.apache.org/repos/asf/commons-collections/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-collections/commit/2dd7c4ad Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/2dd7c4ad Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/2dd7c4ad Branch: refs/heads/master Commit: 2dd7c4ad8ee6a051fce8edb5f64dc904c9514217 Parents: 864fda4 Author: Gary Gregory <garydgreg...@gmail.com> Authored: Thu Feb 22 13:31:22 2018 -0700 Committer: Gary Gregory <garydgreg...@gmail.com> Committed: Thu Feb 22 13:31:22 2018 -0700 ---------------------------------------------------------------------- .../commons/collections4/map/AbstractReferenceMap.java | 6 +++--- .../commons/collections4/map/ReferenceMapTest.java | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-collections/blob/2dd7c4ad/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java index e0fa7e2..b180063 100644 --- a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java +++ b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java @@ -1046,14 +1046,14 @@ public abstract class AbstractReferenceMap<K, V> extends AbstractHashedMap<K, V> init(); data = new HashEntry[capacity]; - // COLLECTIONS-599: Calculate threshold before populating, otherwise it will be 0 - // when it hits AbstractHashedMap.checkCapacity() and so will unnecessarily + // COLLECTIONS-599: Calculate threshold before populating, otherwise it will be 0 + // when it hits AbstractHashedMap.checkCapacity() and so will unnecessarily // double up the size of the "data" array during population. // // NB: AbstractHashedMap.doReadObject() DOES calculate the threshold before populating. // threshold = calculateThreshold(data.length, loadFactor); - + while (true) { final K key = (K) in.readObject(); if (key == null) { http://git-wip-us.apache.org/repos/asf/commons-collections/blob/2dd7c4ad/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java b/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java index 3ea05e0..92118d7 100644 --- a/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java +++ b/src/test/java/org/apache/commons/collections4/map/ReferenceMapTest.java @@ -257,19 +257,19 @@ public class ReferenceMapTest<K, V> extends AbstractIterableMapTest<K, V> { /** * Test whether after serialization the "data" HashEntry array is the same size as the original.<p> - * + * * See <a href="https://issues.apache.org/jira/browse/COLLECTIONS-599">COLLECTIONS-599: HashEntry array object naming data initialized with double the size during deserialization</a> */ public void testDataSizeAfterSerialization() throws IOException, ClassNotFoundException { - + ReferenceMap<String,String> serialiseMap = new ReferenceMap<>(ReferenceStrength.WEAK, ReferenceStrength.WEAK, true); serialiseMap.put("KEY", "VALUE"); - + ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (ObjectOutputStream out = new ObjectOutputStream(baos)) { out.writeObject(serialiseMap); } - + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); try (ObjectInputStream in = new ObjectInputStream(bais)) { @SuppressWarnings("unchecked") @@ -277,9 +277,9 @@ public class ReferenceMapTest<K, V> extends AbstractIterableMapTest<K, V> { assertEquals(1, deserialisedMap.size()); assertEquals(serialiseMap.data.length, deserialisedMap.data.length); } - + } - + @SuppressWarnings("unused") private static void gc() { try {