Consistent formatting

This commit is contained in:
Juergen Hoeller
2016-03-24 19:54:28 +01:00
parent 2ea7fcde3e
commit 0891fbaf97
14 changed files with 40 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -127,7 +127,7 @@ public abstract class DigestUtils {
((UpdateMessageDigestInputStream) inputStream).updateMessageDigest(messageDigest);
return messageDigest.digest();
}
else{
else {
return messageDigest.digest(StreamUtils.copyToByteArray(inputStream));
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -180,7 +180,7 @@ public class MimeType implements Comparable<MimeType>, Serializable {
* @see <a href="http://tools.ietf.org/html/rfc2616#section-2.2">HTTP 1.1, section 2.2</a>
*/
private void checkToken(String token) {
for (int i=0; i < token.length(); i++ ) {
for (int i = 0; i < token.length(); i++ ) {
char ch = token.charAt(i);
if (!TOKEN.get(ch)) {
throw new IllegalArgumentException("Invalid token character '" + ch + "' in token \"" + token + "\"");

View File

@@ -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);

View File

@@ -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,