Consistent formatting
This commit is contained in:
@@ -130,7 +130,7 @@ public class GenericTypeResolverTests {
|
||||
Type t = null;
|
||||
Type x = null;
|
||||
for (Map.Entry<TypeVariable, Type> entry : map.entrySet()) {
|
||||
if(entry.getKey().toString().equals("T")) {
|
||||
if (entry.getKey().toString().equals("T")) {
|
||||
t = entry.getValue();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -111,7 +111,8 @@ public class PropertySourceTests {
|
||||
equalTo(String.format("%s [name='%s']",
|
||||
ps.getClass().getSimpleName(),
|
||||
name)));
|
||||
} finally {
|
||||
}
|
||||
finally {
|
||||
logger.setLevel(original);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,8 @@ public class ClassMetadataReadingVisitorMemberClassTests
|
||||
MetadataReader reader =
|
||||
new SimpleMetadataReaderFactory().getMetadataReader(clazz.getName());
|
||||
return reader.getAnnotationMetadata();
|
||||
} catch (IOException ex) {
|
||||
}
|
||||
catch (IOException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class Matchers {
|
||||
@Override
|
||||
public boolean matches(Object item) {
|
||||
Throwable cause = null;
|
||||
if(item != null && item instanceof Throwable) {
|
||||
if (item != null && item instanceof Throwable) {
|
||||
cause = ((Throwable)item).getCause();
|
||||
}
|
||||
return matcher.matches(cause);
|
||||
|
||||
@@ -93,7 +93,8 @@ public enum TestGroup {
|
||||
for (String group : value.split(",")) {
|
||||
try {
|
||||
groups.add(valueOf(group.trim().toUpperCase()));
|
||||
} catch (IllegalArgumentException e) {
|
||||
}
|
||||
catch (IllegalArgumentException ex) {
|
||||
throw new IllegalArgumentException(format(
|
||||
"Unable to find test group '%s' when parsing testGroups value: '%s'. " +
|
||||
"Available groups include: [%s]", group.trim(), value,
|
||||
|
||||
@@ -74,9 +74,9 @@ public class AutoPopulatingListTests {
|
||||
private void doTestWithElementFactory(AutoPopulatingList<Object> list) {
|
||||
doTestWithClass(list);
|
||||
|
||||
for(int x = 0; x < list.size(); x++) {
|
||||
for (int x = 0; x < list.size(); x++) {
|
||||
Object element = list.get(x);
|
||||
if(element instanceof TestObject) {
|
||||
if (element instanceof TestObject) {
|
||||
assertEquals(x, ((TestObject) element).getAge());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public class FastByteArrayOutputStreamTests {
|
||||
public void updateMessageDigestManyBuffers() throws Exception {
|
||||
StringBuilder builder = new StringBuilder("\"0");
|
||||
// filling at least one 256 buffer
|
||||
for( int i=0; i < 30; i++) {
|
||||
for ( int i = 0; i < 30; i++) {
|
||||
this.os.write(helloBytes);
|
||||
}
|
||||
InputStream inputStream = this.os.getInputStream();
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ResizableByteArrayOutputStreamTests {
|
||||
@Test
|
||||
public void autoGrow() {
|
||||
assertEquals(INITIAL_CAPACITY, this.baos.capacity());
|
||||
for(int i = 0; i < 129; i++) {
|
||||
for (int i = 0; i < 129; i++) {
|
||||
this.baos.write(0);
|
||||
}
|
||||
assertEquals(256, this.baos.capacity());
|
||||
|
||||
@@ -169,7 +169,8 @@ public class SettableListenableFutureTests {
|
||||
try {
|
||||
Thread.sleep(20L);
|
||||
settableListenableFuture.set(string);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
@@ -183,7 +184,8 @@ public class SettableListenableFutureTests {
|
||||
try {
|
||||
settableListenableFuture.get(1L, TimeUnit.MILLISECONDS);
|
||||
fail("Expected TimeoutException");
|
||||
} catch (TimeoutException ex) {
|
||||
}
|
||||
catch (TimeoutException ex) {
|
||||
// expected
|
||||
}
|
||||
}
|
||||
@@ -197,7 +199,8 @@ public class SettableListenableFutureTests {
|
||||
try {
|
||||
Thread.sleep(20L);
|
||||
settableListenableFuture.set(string);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
@@ -278,7 +281,8 @@ public class SettableListenableFutureTests {
|
||||
try {
|
||||
Thread.sleep(20L);
|
||||
settableListenableFuture.cancel(true);
|
||||
} catch (InterruptedException ex) {
|
||||
}
|
||||
catch (InterruptedException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
@@ -286,7 +290,8 @@ public class SettableListenableFutureTests {
|
||||
try {
|
||||
settableListenableFuture.get(100L, TimeUnit.MILLISECONDS);
|
||||
fail("Expected CancellationException");
|
||||
} catch (CancellationException ex) {
|
||||
}
|
||||
catch (CancellationException ex) {
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,8 +194,8 @@ public abstract class AbstractStaxXMLReaderTestCase {
|
||||
private static class SkipLocatorArgumentsAdapter implements InvocationArgumentsAdapter {
|
||||
@Override
|
||||
public Object[] adaptArguments(Object[] arguments) {
|
||||
for(int i=0; i<arguments.length; i++) {
|
||||
if(arguments[i] instanceof Locator) {
|
||||
for (int i = 0; i < arguments.length; i++) {
|
||||
if (arguments[i] instanceof Locator) {
|
||||
arguments[i] = null;
|
||||
}
|
||||
}
|
||||
@@ -206,7 +206,7 @@ public abstract class AbstractStaxXMLReaderTestCase {
|
||||
private static class CharArrayToStringAdapter implements InvocationArgumentsAdapter {
|
||||
@Override
|
||||
public Object[] adaptArguments(Object[] arguments) {
|
||||
if(arguments.length == 3 && arguments[0] instanceof char[]
|
||||
if (arguments.length == 3 && arguments[0] instanceof char[]
|
||||
&& arguments[1] instanceof Integer && arguments[2] instanceof Integer) {
|
||||
return new Object[] {new String((char[]) arguments[0], (Integer) arguments[1], (Integer) arguments[2])};
|
||||
}
|
||||
@@ -218,7 +218,7 @@ public abstract class AbstractStaxXMLReaderTestCase {
|
||||
@Override
|
||||
public Object[] adaptArguments(Object[] arguments) {
|
||||
for (int i = 0; i < arguments.length; i++) {
|
||||
if(arguments[i] instanceof Attributes) {
|
||||
if (arguments[i] instanceof Attributes) {
|
||||
arguments[i] = new PartialAttributes((Attributes) arguments[i]);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user