Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B93EE159 for ; Mon, 7 Jan 2013 16:55:31 +0000 (UTC) Received: (qmail 91581 invoked by uid 500); 7 Jan 2013 16:55:31 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 91520 invoked by uid 500); 7 Jan 2013 16:55:31 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 91512 invoked by uid 99); 7 Jan 2013 16:55:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2013 16:55:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jan 2013 16:55:28 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AE787238899C; Mon, 7 Jan 2013 16:55:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1429895 - in /commons/proper/collections/trunk/src: main/java/org/apache/commons/collections/map/ test/java/org/apache/commons/collections/ test/java/org/apache/commons/collections/bag/ test/java/org/apache/commons/collections/bidimap/ tes... Date: Mon, 07 Jan 2013 16:55:07 -0000 To: commits@commons.apache.org From: ggregory@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130107165508.AE787238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ggregory Date: Mon Jan 7 16:55:07 2013 New Revision: 1429895 URL: http://svn.apache.org/viewvc?rev=1429895&view=rev Log: Convert control statement bodies to block. Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractLinkedListTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PriorityBufferTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractLinkedListTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/NodeCachingLinkedListTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractIterableMapTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractSortedMapTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LRUMapTest.java commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LinkedMapTest.java Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java (original) +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections/map/Flat3Map.java Mon Jan 7 16:55:07 2013 @@ -131,11 +131,17 @@ public class Flat3Map implements I switch (size) { // drop through case 3: - if (key3 == null) return value3; + if (key3 == null) { + return value3; + } case 2: - if (key2 == null) return value2; + if (key2 == null) { + return value2; + } case 1: - if (key1 == null) return value1; + if (key1 == null) { + return value1; + } } } else { if (size > 0) { @@ -143,11 +149,17 @@ public class Flat3Map implements I switch (size) { // drop through case 3: - if (hash3 == hashCode && key.equals(key3)) return value3; + if (hash3 == hashCode && key.equals(key3)) { + return value3; + } case 2: - if (hash2 == hashCode && key.equals(key2)) return value2; + if (hash2 == hashCode && key.equals(key2)) { + return value2; + } case 1: - if (hash1 == hashCode && key.equals(key1)) return value1; + if (hash1 == hashCode && key.equals(key1)) { + return value1; + } } } } @@ -189,22 +201,34 @@ public class Flat3Map implements I if (key == null) { switch (size) { // drop through case 3: - if (key3 == null) return true; + if (key3 == null) { + return true; + } case 2: - if (key2 == null) return true; + if (key2 == null) { + return true; + } case 1: - if (key1 == null) return true; + if (key1 == null) { + return true; + } } } else { if (size > 0) { int hashCode = key.hashCode(); switch (size) { // drop through case 3: - if (hash3 == hashCode && key.equals(key3)) return true; + if (hash3 == hashCode && key.equals(key3)) { + return true; + } case 2: - if (hash2 == hashCode && key.equals(key2)) return true; + if (hash2 == hashCode && key.equals(key2)) { + return true; + } case 1: - if (hash1 == hashCode && key.equals(key1)) return true; + if (hash1 == hashCode && key.equals(key1)) { + return true; + } } } } @@ -224,20 +248,32 @@ public class Flat3Map implements I if (value == null) { // drop through switch (size) { case 3: - if (value3 == null) return true; + if (value3 == null) { + return true; + } case 2: - if (value2 == null) return true; + if (value2 == null) { + return true; + } case 1: - if (value1 == null) return true; + if (value1 == null) { + return true; + } } } else { switch (size) { // drop through case 3: - if (value.equals(value3)) return true; + if (value.equals(value3)) { + return true; + } case 2: - if (value.equals(value2)) return true; + if (value.equals(value2)) { + return true; + } case 1: - if (value.equals(value1)) return true; + if (value.equals(value1)) { + return true; + } } } return false; Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractLinkedListTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractLinkedListTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractLinkedListTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/AbstractLinkedListTest.java Mon Jan 7 16:55:07 2013 @@ -71,7 +71,9 @@ public abstract class AbstractLinkedList */ @SuppressWarnings("unchecked") public void testLinkedListAddFirst() { - if (!isAddSupported()) return; + if (!isAddSupported()) { + return; + } T o = (T) "hello"; resetEmpty(); @@ -90,7 +92,9 @@ public abstract class AbstractLinkedList */ @SuppressWarnings("unchecked") public void testLinkedListAddLast() { - if (!isAddSupported()) return; + if (!isAddSupported()) { + return; + } T o = (T) "hello"; resetEmpty(); @@ -152,7 +156,9 @@ public abstract class AbstractLinkedList * Tests {@link LinkedList#removeFirst()}. */ public void testLinkedListRemoveFirst() { - if (!isRemoveSupported()) return; + if (!isRemoveSupported()) { + return; + } resetEmpty(); try { @@ -176,7 +182,9 @@ public abstract class AbstractLinkedList * Tests {@link LinkedList#removeLast()}. */ public void testLinkedListRemoveLast() { - if (!isRemoveSupported()) return; + if (!isRemoveSupported()) { + return; + } resetEmpty(); try { Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/BulkTest.java Mon Jan 7 16:55:07 2013 @@ -324,8 +324,12 @@ class BulkTestSuiteMaker { Class c = bulk.getClass(); Method[] all = c.getMethods(); for (Method element : all) { - if (isTest(element)) addTest(bulk, element); - if (isBulk(element)) addBulk(bulk, element); + if (isTest(element)) { + addTest(bulk, element); + } + if (isBulk(element)) { + addBulk(bulk, element); + } } } @@ -341,7 +345,9 @@ class BulkTestSuiteMaker { BulkTest bulk2 = (BulkTest)bulk.clone(); bulk2.setName(m.getName()); bulk2.verboseName = prefix + "." + m.getName(); - if (ignored.contains(bulk2.verboseName)) return; + if (ignored.contains(bulk2.verboseName)) { + return; + } result.addTest(bulk2); } @@ -356,12 +362,16 @@ class BulkTestSuiteMaker { */ void addBulk(BulkTest bulk, Method m) { String verboseName = prefix + "." + m.getName(); - if (ignored.contains(verboseName)) return; + if (ignored.contains(verboseName)) { + return; + } BulkTest bulk2; try { bulk2 = (BulkTest)m.invoke(bulk, (Object[]) null); - if (bulk2 == null) return; + if (bulk2 == null) { + return; + } } catch (InvocationTargetException ex) { ex.getTargetException().printStackTrace(); throw new Error(); // FIXME; @@ -432,7 +442,9 @@ class BulkTestSuiteMaker { private static BulkTest makeFirstTestCase(Class c) { Method[] all = c.getMethods(); for (Method element : all) { - if (isTest(element)) return makeTestCase(c, element); + if (isTest(element)) { + return makeTestCase(c, element); + } } throw new IllegalArgumentException(c.getName() + " must provide " + " at least one test method."); @@ -442,12 +454,22 @@ class BulkTestSuiteMaker { * Returns true if the given method is a simple test method. */ private static boolean isTest(Method m) { - if (!m.getName().startsWith("test")) return false; - if (m.getReturnType() != Void.TYPE) return false; - if (m.getParameterTypes().length != 0) return false; + if (!m.getName().startsWith("test")) { + return false; + } + if (m.getReturnType() != Void.TYPE) { + return false; + } + if (m.getParameterTypes().length != 0) { + return false; + } int mods = m.getModifiers(); - if (Modifier.isStatic(mods)) return false; - if (Modifier.isAbstract(mods)) return false; + if (Modifier.isStatic(mods)) { + return false; + } + if (Modifier.isAbstract(mods)) { + return false; + } return true; } @@ -455,12 +477,22 @@ class BulkTestSuiteMaker { * Returns true if the given method is a bulk test method. */ private static boolean isBulk(Method m) { - if (!m.getName().startsWith("bulkTest")) return false; - if (m.getReturnType() != BulkTest.class) return false; - if (m.getParameterTypes().length != 0) return false; + if (!m.getName().startsWith("bulkTest")) { + return false; + } + if (m.getReturnType() != BulkTest.class) { + return false; + } + if (m.getParameterTypes().length != 0) { + return false; + } int mods = m.getModifiers(); - if (Modifier.isStatic(mods)) return false; - if (Modifier.isAbstract(mods)) return false; + if (Modifier.isStatic(mods)) { + return false; + } + if (Modifier.isAbstract(mods)) { + return false; + } return true; } Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bag/AbstractBagTest.java Mon Jan 7 16:55:07 2013 @@ -454,7 +454,9 @@ public abstract class AbstractBagTest //----------------------------------------------------------------------- public void testEmptyBagSerialization() throws IOException, ClassNotFoundException { Bag bag = makeObject(); - if (!(bag instanceof Serializable && isTestSerialization())) return; + if (!(bag instanceof Serializable && isTestSerialization())) { + return; + } byte[] objekt = writeExternalFormToBytes((Serializable) bag); Bag bag2 = (Bag) readExternalFormFromBytes(objekt); @@ -472,7 +474,9 @@ public abstract class AbstractBagTest bag.add((T) "B"); bag.add((T) "C"); int size = bag.size(); - if (!(bag instanceof Serializable && isTestSerialization())) return; + if (!(bag instanceof Serializable && isTestSerialization())) { + return; + } byte[] objekt = writeExternalFormToBytes((Serializable) bag); Bag bag2 = (Bag) readExternalFormFromBytes(objekt); Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractBidiMapTest.java Mon Jan 7 16:55:07 2013 @@ -80,7 +80,9 @@ public abstract class AbstractBidiMapTes //----------------------------------------------------------------------- @SuppressWarnings("unchecked") public void testBidiPut() { - if (isPutAddSupported() == false || isPutChangeSupported() == false) return; + if (isPutAddSupported() == false || isPutChangeSupported() == false) { + return; + } BidiMap map = makeObject(); BidiMap inverse = map.inverseBidiMap(); @@ -179,7 +181,9 @@ public abstract class AbstractBidiMapTes //----------------------------------------------------------------------- public void testBidiModifyEntrySet() { - if (isSetValueSupported() == false) return; + if (isSetValueSupported() == false) { + return; + } modifyEntrySet(makeFullMap()); modifyEntrySet(makeFullMap().inverseBidiMap()); @@ -282,7 +286,9 @@ public abstract class AbstractBidiMapTes //----------------------------------------------------------------------- public void testBidiRemoveByKeySet() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } removeByKeySet(makeFullMap(), getSampleKeys()[0], getSampleValues()[0]); removeByKeySet(makeFullMap().inverseBidiMap(), getSampleValues()[0], getSampleKeys()[0]); @@ -304,7 +310,9 @@ public abstract class AbstractBidiMapTes //----------------------------------------------------------------------- public void testBidiRemoveByEntrySet() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } removeByEntrySet(makeFullMap(), getSampleKeys()[0], getSampleValues()[0]); removeByEntrySet(makeFullMap().inverseBidiMap(), getSampleValues()[0], getSampleKeys()[0]); Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/bidimap/AbstractSortedBidiMapTest.java Mon Jan 7 16:55:07 2013 @@ -129,7 +129,9 @@ public abstract class AbstractSortedBidi //----------------------------------------------------------------------- public void testBidiClearByHeadMap() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } // extra test as other tests get complex SortedBidiMap sm = makeFullMap(); @@ -174,7 +176,9 @@ public abstract class AbstractSortedBidi //----------------------------------------------------------------------- public void testBidiRemoveByHeadMap() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } // extra test as other tests get complex SortedBidiMap sm = makeFullMap(); @@ -216,7 +220,9 @@ public abstract class AbstractSortedBidi //----------------------------------------------------------------------- public void testBidiRemoveByHeadMapEntrySet() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } // extra test as other tests get complex SortedBidiMap sm = makeFullMap(); @@ -297,7 +303,9 @@ public abstract class AbstractSortedBidi //----------------------------------------------------------------------- public void testBidiClearByTailMap() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } // extra test as other tests get complex SortedBidiMap sm = makeFullMap(); @@ -344,7 +352,9 @@ public abstract class AbstractSortedBidi //----------------------------------------------------------------------- public void testBidiRemoveByTailMap() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } // extra test as other tests get complex SortedBidiMap sm = makeFullMap(); @@ -387,7 +397,9 @@ public abstract class AbstractSortedBidi //----------------------------------------------------------------------- public void testBidiRemoveByTailMapEntrySet() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } // extra test as other tests get complex SortedBidiMap sm = makeFullMap(); @@ -475,7 +487,9 @@ public abstract class AbstractSortedBidi //----------------------------------------------------------------------- public void testBidiClearBySubMap() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } // extra test as other tests get complex SortedBidiMap sm = makeFullMap(); @@ -530,7 +544,9 @@ public abstract class AbstractSortedBidi //----------------------------------------------------------------------- public void testBidiRemoveBySubMap() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } // extra test as other tests get complex SortedBidiMap sm = makeFullMap(); @@ -574,7 +590,9 @@ public abstract class AbstractSortedBidi //----------------------------------------------------------------------- public void testBidiRemoveBySubMapEntrySet() { - if (isRemoveSupported() == false) return; + if (isRemoveSupported() == false) { + return; + } // extra test as other tests get complex SortedBidiMap sm = makeFullMap(); Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PriorityBufferTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PriorityBufferTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PriorityBufferTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/buffer/PriorityBufferTest.java Mon Jan 7 16:55:07 2013 @@ -329,8 +329,9 @@ public class PriorityBufferTest exten StringBuilder buffer = new StringBuilder(); for (int offset = 1; count < h.size() + 1; offset *= 2) { for (int i = offset; i < offset * 2; i++) { - if (i < h.elements.length && h.elements[i] != null) + if (i < h.elements.length && h.elements[i] != null) { buffer.append(h.elements[i] + " "); + } count++; } buffer.append('\n'); Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/collection/AbstractCollectionTest.java Mon Jan 7 16:55:07 2013 @@ -497,7 +497,9 @@ public abstract class AbstractCollection * Tests {@link Collection#add(Object)}. */ public void testCollectionAdd() { - if (!isAddSupported()) return; + if (!isAddSupported()) { + return; + } E[] elements = getFullElements(); for (E element : elements) { @@ -515,7 +517,9 @@ public abstract class AbstractCollection boolean r = getCollection().add(element); getConfirmed().add(element); verify(); - if (r) size++; + if (r) { + size++; + } assertEquals("Collection size should grow after add", size, getCollection().size()); assertTrue("Collection should contain added element", getCollection().contains(element)); } @@ -525,7 +529,9 @@ public abstract class AbstractCollection * Tests {@link Collection#addAll(Collection)}. */ public void testCollectionAddAll() { - if (!isAddSupported()) return; + if (!isAddSupported()) { + return; + } resetEmpty(); E[] elements = getFullElements(); @@ -567,7 +573,9 @@ public abstract class AbstractCollection * raise UnsupportedOperationException. */ public void testUnsupportedAdd() { - if (isAddSupported()) return; + if (isAddSupported()) { + return; + } resetEmpty(); try { @@ -616,7 +624,9 @@ public abstract class AbstractCollection * Test {@link Collection#clear()}. */ public void testCollectionClear() { - if (!isRemoveSupported()) return; + if (!isRemoveSupported()) { + return; + } resetEmpty(); getCollection().clear(); // just to make sure it doesn't raise anything @@ -776,7 +786,9 @@ public abstract class AbstractCollection */ @SuppressWarnings("unchecked") public void testCollectionIteratorRemove() { - if (!isRemoveSupported()) return; + if (!isRemoveSupported()) { + return; + } resetEmpty(); try { @@ -844,7 +856,9 @@ public abstract class AbstractCollection * Tests {@link Collection#remove(Object)}. */ public void testCollectionRemove() { - if (!isRemoveSupported()) return; + if (!isRemoveSupported()) { + return; + } resetEmpty(); E[] elements = getFullElements(); @@ -888,7 +902,9 @@ public abstract class AbstractCollection * Tests {@link Collection#removeAll(Collection)}. */ public void testCollectionRemoveAll() { - if (!isRemoveSupported()) return; + if (!isRemoveSupported()) { + return; + } resetEmpty(); assertTrue("Empty collection removeAll should return false for empty input", @@ -935,7 +951,9 @@ public abstract class AbstractCollection * Tests {@link Collection#retainAll(Collection)}. */ public void testCollectionRetainAll() { - if (!isRemoveSupported()) return; + if (!isRemoveSupported()) { + return; + } resetEmpty(); List elements = Arrays.asList(getFullElements()); @@ -1029,8 +1047,9 @@ public abstract class AbstractCollection // find a match in the confirmed array for (int j = 0; j < array.length; j++) { // skip already matched - if (matched[j]) + if (matched[j]) { continue; + } if (array[i] == confirmedArray[j] || (array[i] != null && array[i].equals(confirmedArray[j]))) { matched[j] = true; @@ -1088,7 +1107,9 @@ public abstract class AbstractCollection for (Object element : array) { classes.add((element == null) ? null : element.getClass()); } - if (classes.size() > 1) return; + if (classes.size() > 1) { + return; + } Class cl = classes.iterator().next(); if (Map.Entry.class.isAssignableFrom(cl)) { // check needed for protective cases like Predicated/Unmod map entrySet @@ -1120,7 +1141,9 @@ public abstract class AbstractCollection * operations raise an UnsupportedOperationException. */ public void testUnsupportedRemove() { - if (isRemoveSupported()) return; + if (isRemoveSupported()) { + return; + } resetEmpty(); try { @@ -1172,7 +1195,9 @@ public abstract class AbstractCollection * Tests that the collection's iterator is fail-fast. */ public void testCollectionIteratorFailFast() { - if (!isFailFastSupported()) return; + if (!isFailFastSupported()) { + return; + } if (isAddSupported()) { resetFull(); @@ -1201,7 +1226,9 @@ public abstract class AbstractCollection verify(); } - if (!isRemoveSupported()) return; + if (!isRemoveSupported()) { + return; + } resetFull(); try { Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractLinkedListTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractLinkedListTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractLinkedListTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractLinkedListTest.java Mon Jan 7 16:55:07 2013 @@ -115,7 +115,9 @@ public abstract class AbstractLinkedList @SuppressWarnings("unchecked") public void testRemoveNode() { resetEmpty(); - if (isAddSupported() == false || isRemoveSupported() == false) return; + if (isAddSupported() == false || isRemoveSupported() == false) { + return; + } AbstractLinkedList list = getCollection(); list.addAll(Arrays.asList((E[]) new String[] { "value1", "value2" })); Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/AbstractListTest.java Mon Jan 7 16:55:07 2013 @@ -572,7 +572,9 @@ public abstract class AbstractListTest list = makeFullCollection(); E element = getOtherElements()[0]; @@ -613,7 +615,9 @@ public abstract class AbstractListTestUnsupportedOperationException. */ public void testUnsupportedSet() { - if (isSetSupported()) return; + if (isSetSupported()) { + return; + } resetFull(); try { @@ -652,7 +658,9 @@ public abstract class AbstractListTest list = makeObject(); @@ -697,7 +705,9 @@ public abstract class AbstractListTest list = makeFullCollection(); @@ -737,7 +747,9 @@ public abstract class AbstractListTest it = getCollection().listIterator(); E zero = it.next(); E one = it.next(); @@ -814,9 +830,13 @@ public abstract class AbstractListTest it = getCollection().listIterator(); E zero = it.next(); E one = it.next(); @@ -842,9 +862,13 @@ public abstract class AbstractListTest it = getCollection().listIterator(); E zero = it.next(); E one = it.next(); @@ -867,9 +891,13 @@ public abstract class AbstractListTest it = getCollection().listIterator(); E zero = it.next(); E one = it.next(); @@ -964,7 +992,9 @@ public abstract class AbstractListTest list1 = getCollection(); @@ -997,7 +1027,9 @@ public abstract class AbstractListTest list = makeObject(); - if (!(list instanceof Serializable && isTestSerialization())) return; + if (!(list instanceof Serializable && isTestSerialization())) { + return; + } byte[] objekt = writeExternalFormToBytes((Serializable) list); List list2 = (List) readExternalFormFromBytes(objekt); @@ -1029,7 +1063,9 @@ public abstract class AbstractListTest list = makeFullCollection(); int size = getFullElements().length; - if (!(list instanceof Serializable && isTestSerialization())) return; + if (!(list instanceof Serializable && isTestSerialization())) { + return; + } byte[] objekt = writeExternalFormToBytes((Serializable) list); List list2 = (List) readExternalFormFromBytes(objekt); @@ -1113,7 +1149,9 @@ public abstract class AbstractListTest(this); } @@ -1196,8 +1234,12 @@ public abstract class AbstractListTest list, Method m) { - if (m.getName().equals("equals")) return; + if (m.getName().equals("equals")) { + return; + } E element = getOtherElements()[0]; Collection c = Collections.singleton(element); @@ -1288,10 +1336,15 @@ public abstract class AbstractListTest[] types = m.getParameterTypes(); Object[] params = new Object[types.length]; for (int i = 0; i < params.length; i++) { - if (types[i] == Integer.TYPE) params[i] = new Integer(0); - else if (types[i] == Collection.class) params[i] = c; - else if (types[i] == Object.class) params[i] = element; - else if (types[i] == Object[].class) params[i] = new Object[0]; + if (types[i] == Integer.TYPE) { + params[i] = new Integer(0); + } else if (types[i] == Collection.class) { + params[i] = c; + } else if (types[i] == Object.class) { + params[i] = element; + } else if (types[i] == Object[].class) { + params[i] = new Object[0]; + } } try { Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/NodeCachingLinkedListTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/NodeCachingLinkedListTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/NodeCachingLinkedListTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/list/NodeCachingLinkedListTest.java Mon Jan 7 16:55:07 2013 @@ -55,7 +55,9 @@ public class NodeCachingLinkedListTest list = getCollection(); Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractIterableMapTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractIterableMapTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractIterableMapTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractIterableMapTest.java Mon Jan 7 16:55:07 2013 @@ -59,8 +59,12 @@ public abstract class AbstractIterableMa //----------------------------------------------------------------------- public void testFailFastEntrySet() { - if (isRemoveSupported() == false) return; - if (isFailFastExpected() == false) return; + if (isRemoveSupported() == false) { + return; + } + if (isFailFastExpected() == false) { + return; + } resetFull(); Iterator> it = getMap().entrySet().iterator(); Map.Entry val = it.next(); @@ -81,8 +85,12 @@ public abstract class AbstractIterableMa } public void testFailFastKeySet() { - if (isRemoveSupported() == false) return; - if (isFailFastExpected() == false) return; + if (isRemoveSupported() == false) { + return; + } + if (isFailFastExpected() == false) { + return; + } resetFull(); Iterator it = getMap().keySet().iterator(); K val = it.next(); @@ -103,8 +111,12 @@ public abstract class AbstractIterableMa } public void testFailFastValues() { - if (isRemoveSupported() == false) return; - if (isFailFastExpected() == false) return; + if (isRemoveSupported() == false) { + return; + } + if (isFailFastExpected() == false) { + return; + } resetFull(); Iterator it = getMap().values().iterator(); it.next(); Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/AbstractMapTest.java Mon Jan 7 16:55:07 2013 @@ -1028,7 +1028,9 @@ public abstract class AbstractMapTest> entrySet = getMap().entrySet(); @@ -1142,7 +1150,9 @@ public abstract class AbstractMapTest> entrySet = getMap().entrySet(); @@ -1157,7 +1167,9 @@ public abstract class AbstractMapTest> entrySet = getMap().entrySet(); @@ -1684,7 +1696,9 @@ public abstract class AbstractMapTest) main.makeFullMap()).headMap(toKey); } public void testHeadMapOutOfRange() { - if (isPutAddSupported() == false) return; + if (isPutAddSupported() == false) { + return; + } resetEmpty(); try { getMap().put(toKey, subSortedValues.get(0)); @@ -291,7 +293,9 @@ public abstract class AbstractSortedMapT return ((SortedMap) main.makeFullMap()).tailMap(fromKey); } public void testTailMapOutOfRange() { - if (isPutAddSupported() == false) return; + if (isPutAddSupported() == false) { + return; + } resetEmpty(); try { getMap().put(invalidKey, subSortedValues.get(0)); @@ -351,7 +355,9 @@ public abstract class AbstractSortedMapT return ((SortedMap) main.makeFullMap()).subMap(fromKey, toKey); } public void testSubMapOutOfRange() { - if (isPutAddSupported() == false) return; + if (isPutAddSupported() == false) { + return; + } resetEmpty(); try { getMap().put(toKey, subSortedValues.get(0)); Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LRUMapTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LRUMapTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LRUMapTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LRUMapTest.java Mon Jan 7 16:55:07 2013 @@ -70,7 +70,9 @@ public class LRUMapTest extends Ab //----------------------------------------------------------------------- public void testLRU() { - if (isPutAddSupported() == false || isPutChangeSupported() == false) return; + if (isPutAddSupported() == false || isPutChangeSupported() == false) { + return; + } K[] keys = getSampleKeys(); V[] values = getSampleValues(); Iterator kit; @@ -150,7 +152,9 @@ public class LRUMapTest extends Ab //----------------------------------------------------------------------- public void testAccessOrder() { - if (isPutAddSupported() == false || isPutChangeSupported() == false) return; + if (isPutAddSupported() == false || isPutChangeSupported() == false) { + return; + } K[] keys = getSampleKeys(); V[] values = getSampleValues(); Iterator kit = null; @@ -364,7 +368,9 @@ public class LRUMapTest extends Ab @SuppressWarnings("unchecked") public void testInternalState_Buckets() { - if (isPutAddSupported() == false || isPutChangeSupported() == false) return; + if (isPutAddSupported() == false || isPutChangeSupported() == false) { + return; + } SingleHashCode one = new SingleHashCode("1"); SingleHashCode two = new SingleHashCode("2"); SingleHashCode three = new SingleHashCode("3"); @@ -452,7 +458,9 @@ public class LRUMapTest extends Ab @SuppressWarnings("unchecked") public void testInternalState_getEntry_int() { - if (isPutAddSupported() == false || isPutChangeSupported() == false) return; + if (isPutAddSupported() == false || isPutChangeSupported() == false) { + return; + } SingleHashCode one = new SingleHashCode("1"); SingleHashCode two = new SingleHashCode("2"); SingleHashCode three = new SingleHashCode("3"); Modified: commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LinkedMapTest.java URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LinkedMapTest.java?rev=1429895&r1=1429894&r2=1429895&view=diff ============================================================================== --- commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LinkedMapTest.java (original) +++ commons/proper/collections/trunk/src/test/java/org/apache/commons/collections/map/LinkedMapTest.java Mon Jan 7 16:55:07 2013 @@ -82,7 +82,9 @@ public class LinkedMapTest extends //----------------------------------------------------------------------- public void testInsertionOrder() { - if (isPutAddSupported() == false || isPutChangeSupported() == false) return; + if (isPutAddSupported() == false || isPutChangeSupported() == false) { + return; + } K[] keys = getSampleKeys(); V[] values = getSampleValues(); Iterator keyIter;