diff --git a/src/main/java/org/apache/commons/lang3/BooleanUtils.java b/src/main/java/org/apache/commons/lang3/BooleanUtils.java
index c7eae2d05..0ff61f4b1 100644
--- a/src/main/java/org/apache/commons/lang3/BooleanUtils.java
+++ b/src/main/java/org/apache/commons/lang3/BooleanUtils.java
@@ -570,13 +570,11 @@ public static Boolean toBooleanObject(String str) {
case 1: {
char ch0 = str.charAt(0);
if ((ch0 == 'y' || ch0 == 'Y') ||
- (ch0 == 't' || ch0 == 'T'))
- {
+ (ch0 == 't' || ch0 == 'T')) {
return Boolean.TRUE;
}
if ((ch0 == 'n' || ch0 == 'N') ||
- (ch0 == 'f' || ch0 == 'F'))
- {
+ (ch0 == 'f' || ch0 == 'F')) {
return Boolean.FALSE;
}
break;
@@ -585,13 +583,11 @@ public static Boolean toBooleanObject(String str) {
char ch0 = str.charAt(0);
char ch1 = str.charAt(1);
if ((ch0 == 'o' || ch0 == 'O') &&
- (ch1 == 'n' || ch1 == 'N') )
- {
+ (ch1 == 'n' || ch1 == 'N') ) {
return Boolean.TRUE;
}
if ((ch0 == 'n' || ch0 == 'N') &&
- (ch1 == 'o' || ch1 == 'O') )
- {
+ (ch1 == 'o' || ch1 == 'O') ) {
return Boolean.FALSE;
}
break;
@@ -602,14 +598,12 @@ public static Boolean toBooleanObject(String str) {
char ch2 = str.charAt(2);
if ((ch0 == 'y' || ch0 == 'Y') &&
(ch1 == 'e' || ch1 == 'E') &&
- (ch2 == 's' || ch2 == 'S') )
- {
+ (ch2 == 's' || ch2 == 'S') ) {
return Boolean.TRUE;
}
if ((ch0 == 'o' || ch0 == 'O') &&
(ch1 == 'f' || ch1 == 'F') &&
- (ch2 == 'f' || ch2 == 'F') )
- {
+ (ch2 == 'f' || ch2 == 'F') ) {
return Boolean.FALSE;
}
break;
@@ -622,8 +616,7 @@ public static Boolean toBooleanObject(String str) {
if ((ch0 == 't' || ch0 == 'T') &&
(ch1 == 'r' || ch1 == 'R') &&
(ch2 == 'u' || ch2 == 'U') &&
- (ch3 == 'e' || ch3 == 'E') )
- {
+ (ch3 == 'e' || ch3 == 'E') ) {
return Boolean.TRUE;
}
break;
@@ -638,8 +631,7 @@ public static Boolean toBooleanObject(String str) {
(ch1 == 'a' || ch1 == 'A') &&
(ch2 == 'l' || ch2 == 'L') &&
(ch3 == 's' || ch3 == 'S') &&
- (ch4 == 'e' || ch4 == 'E') )
- {
+ (ch4 == 'e' || ch4 == 'E') ) {
return Boolean.FALSE;
}
break;
diff --git a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java
index b6e156c95..b143002b4 100644
--- a/src/main/java/org/apache/commons/lang3/RandomStringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/RandomStringUtils.java
@@ -250,9 +250,8 @@ public static String random(int count, int start, int end, boolean letters, bool
ch = chars[random.nextInt(gap) + start];
}
if ((letters && Character.isLetter(ch))
- || (numbers && Character.isDigit(ch))
- || (!letters && !numbers))
- {
+ || (numbers && Character.isDigit(ch))
+ || (!letters && !numbers)) {
if(ch >= 56320 && ch <= 57343) {
if(count == 0) {
count++;
diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java
index e34d90d64..b8edc2e16 100644
--- a/src/main/java/org/apache/commons/lang3/StringUtils.java
+++ b/src/main/java/org/apache/commons/lang3/StringUtils.java
@@ -2725,9 +2725,8 @@ public static String[] splitByWholeSeparatorPreserveAllTokens(String str, String
* @return an array of parsed Strings, null
if null String input
* @since 2.4
*/
- private static String[] splitByWholeSeparatorWorker(String str, String separator, int max,
- boolean preserveAllTokens)
- {
+ private static String[] splitByWholeSeparatorWorker(
+ String str, String separator, int max, boolean preserveAllTokens) {
if (str == null) {
return null;
}
@@ -4035,16 +4034,14 @@ public static String replaceEachRepeatedly(String text, String[] searchList, Str
* and/or size 0)
* @since 2.4
*/
- private static String replaceEach(String text, String[] searchList, String[] replacementList,
- boolean repeat, int timeToLive)
- {
+ private static String replaceEach(
+ String text, String[] searchList, String[] replacementList, boolean repeat, int timeToLive) {
// mchyzer Performance note: This creates very few new objects (one major goal)
// let me know if there are performance requests, we can create a harness to measure
if (text == null || text.length() == 0 || searchList == null ||
- searchList.length == 0 || replacementList == null || replacementList.length == 0)
- {
+ searchList.length == 0 || replacementList == null || replacementList.length == 0) {
return text;
}
@@ -4076,8 +4073,7 @@ private static String replaceEach(String text, String[] searchList, String[] rep
// NOTE: logic duplicated below START
for (int i = 0; i < searchLength; i++) {
if (noMoreMatchesForReplIndex[i] || searchList[i] == null ||
- searchList[i].length() == 0 || replacementList[i] == null)
- {
+ searchList[i].length() == 0 || replacementList[i] == null) {
continue;
}
tempIndex = text.indexOf(searchList[i]);
@@ -4135,8 +4131,7 @@ private static String replaceEach(String text, String[] searchList, String[] rep
// NOTE: logic mostly duplicated above START
for (int i = 0; i < searchLength; i++) {
if (noMoreMatchesForReplIndex[i] || searchList[i] == null ||
- searchList[i].length() == 0 || replacementList[i] == null)
- {
+ searchList[i].length() == 0 || replacementList[i] == null) {
continue;
}
tempIndex = text.indexOf(searchList[i], start);
diff --git a/src/main/java/org/apache/commons/lang3/Validate.java b/src/main/java/org/apache/commons/lang3/Validate.java
index 6d98c42df..85695de15 100644
--- a/src/main/java/org/apache/commons/lang3/Validate.java
+++ b/src/main/java/org/apache/commons/lang3/Validate.java
@@ -802,10 +802,8 @@ public static void validState(boolean expression, String message, Object... valu
* @throws IllegalArgumentException if the character sequence does not match the pattern
* @see #matchesPattern(CharSequence, String, String, Object...)
*/
- public static void matchesPattern(CharSequence input, String pattern)
- {
- if (Pattern.matches(pattern, input) == false)
- {
+ public static void matchesPattern(CharSequence input, String pattern) {
+ if (Pattern.matches(pattern, input) == false) {
throw new IllegalArgumentException(String.format(DEFAULT_MATCHES_PATTERN_EX, input, pattern));
}
}
@@ -825,10 +823,8 @@ public static void matchesPattern(CharSequence input, String pattern)
* @throws IllegalArgumentException if the character sequence does not match the pattern
* @see #matchesPattern(CharSequence, String)
*/
- public static void matchesPattern(CharSequence input, String pattern, String message, Object... values)
- {
- if (Pattern.matches(pattern, input) == false)
- {
+ public static void matchesPattern(CharSequence input, String pattern, String message, Object... values) {
+ if (Pattern.matches(pattern, input) == false) {
throw new IllegalArgumentException(String.format(message, values));
}
}
@@ -845,10 +841,8 @@ public static void matchesPattern(CharSequence input, String pattern, String mes
* @throws IllegalArgumentException if the value falls out of the boundaries
* @see #inclusiveBetween(Object, Object, Comparable, String, Object...)
*/
- public static void inclusiveBetween(T start, T end, Comparable value)
- {
- if (value.compareTo(start) < 0 || value.compareTo(end) > 0)
- {
+ public static void inclusiveBetween(T start, T end, Comparable value) {
+ if (value.compareTo(start) < 0 || value.compareTo(end) > 0) {
throw new IllegalArgumentException(String.format(DEFAULT_INCLUSIVE_BETWEEN_EX_MESSAGE, value, start, end));
}
}
@@ -868,10 +862,8 @@ public static void inclusiveBetween(T start, T end, Comparable value)
* @throws IllegalArgumentException if the value falls out of the boundaries
* @see #inclusiveBetween(Object, Object, Comparable)
*/
- public static void inclusiveBetween(T start, T end, Comparable value, String message, Object... values)
- {
- if (value.compareTo(start) < 0 || value.compareTo(end) > 0)
- {
+ public static void inclusiveBetween(T start, T end, Comparable value, String message, Object... values) {
+ if (value.compareTo(start) < 0 || value.compareTo(end) > 0) {
throw new IllegalArgumentException(String.format(message, values));
}
}
@@ -888,10 +880,8 @@ public static void inclusiveBetween(T start, T end, Comparable value, Str
* @throws IllegalArgumentException if the value falls out of the boundaries
* @see #exclusiveBetween(Object, Object, Comparable, String, Object...)
*/
- public static void exclusiveBetween(T start, T end, Comparable value)
- {
- if (value.compareTo(start) <= 0 || value.compareTo(end) >= 0)
- {
+ public static void exclusiveBetween(T start, T end, Comparable value) {
+ if (value.compareTo(start) <= 0 || value.compareTo(end) >= 0) {
throw new IllegalArgumentException(String.format(DEFAULT_EXCLUSIVE_BETWEEN_EX_MESSAGE, value, start, end));
}
}
@@ -911,10 +901,8 @@ public static void exclusiveBetween(T start, T end, Comparable value)
* @throws IllegalArgumentException if the value falls out of the boundaries
* @see #exclusiveBetween(Object, Object, Comparable)
*/
- public static void exclusiveBetween(T start, T end, Comparable value, String message, Object... values)
- {
- if (value.compareTo(start) <= 0 || value.compareTo(end) >= 0)
- {
+ public static void exclusiveBetween(T start, T end, Comparable value, String message, Object... values) {
+ if (value.compareTo(start) <= 0 || value.compareTo(end) >= 0) {
throw new IllegalArgumentException(String.format(message, values));
}
}
@@ -934,10 +922,8 @@ public static void exclusiveBetween(T start, T end, Comparable value, Str
* @throws IllegalArgumentException if argument is not of specified class
* @see #isInstanceOf(Class, Object, String, Object...)
*/
- public static void isInstanceOf(Class> type, Object o)
- {
- if (type.isInstance(o) == false)
- {
+ public static void isInstanceOf(Class> type, Object o) {
+ if (type.isInstance(o) == false) {
throw new IllegalArgumentException(String.format(DEFAULT_IS_INSTANCE_OF_EX_MESSAGE, type.getName()));
}
}
@@ -956,10 +942,8 @@ public static void isInstanceOf(Class> type, Object o)
* @throws IllegalArgumentException if argument is not of specified class
* @see #isInstanceOf(Class, Object)
*/
- public static void isInstanceOf(Class> type, Object o, String message, Object... values)
- {
- if (type.isInstance(o) == false)
- {
+ public static void isInstanceOf(Class> type, Object o, String message, Object... values) {
+ if (type.isInstance(o) == false) {
throw new IllegalArgumentException(String.format(message, values));
}
}
@@ -979,10 +963,8 @@ public static void isInstanceOf(Class> type, Object o, String message, Object.
* @throws IllegalArgumentException if argument can not be converted to the specified class
* @see #isAssignableFrom(Class, Class, String, Object...)
*/
- public static void isAssignableFrom(Class> superType, Class> type)
- {
- if (superType.isAssignableFrom(type) == false)
- {
+ public static void isAssignableFrom(Class> superType, Class> type) {
+ if (superType.isAssignableFrom(type) == false) {
throw new IllegalArgumentException(String.format(DEFAULT_IS_ASSIGNABLE_EX_MESSAGE, superType.getName()));
}
}
@@ -1004,10 +986,8 @@ public static void isAssignableFrom(Class> superType, Class> type)
* @throws IllegalArgumentException if argument can not be converted to the specified class
* @see #isAssignableFrom(Class, Class)
*/
- public static void isAssignableFrom(Class> superType, Class> type, String message, Object... values)
- {
- if (superType.isAssignableFrom(type) == false)
- {
+ public static void isAssignableFrom(Class> superType, Class> type, String message, Object... values) {
+ if (superType.isAssignableFrom(type) == false) {
throw new IllegalArgumentException(String.format(message, values));
}
}
diff --git a/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java b/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java
index 02e2218e6..9f5acc0c0 100644
--- a/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/builder/CompareToBuilder.java
@@ -268,9 +268,8 @@ public static int reflectionCompare(Object lhs, Object rhs, String[] excludeFiel
* with lhs
* @since 2.0
*/
- public static int reflectionCompare(Object lhs, Object rhs, boolean compareTransients,
- Class> reflectUpToClass)
- {
+ public static int reflectionCompare(
+ Object lhs, Object rhs, boolean compareTransients, Class> reflectUpToClass) {
return reflectionCompare(lhs, rhs, compareTransients, reflectUpToClass, null);
}
diff --git a/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java b/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java
index e58eca29a..5d6a3ac3b 100644
--- a/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java
+++ b/src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java
@@ -63,8 +63,8 @@
* @since 3.0
* @version $Id$
*/
-public class EventListenerSupport implements Serializable
-{
+public class EventListenerSupport implements Serializable {
+
/** Serialization version */
private static final long serialVersionUID = 3593265990380473632L;
@@ -101,8 +101,7 @@ public class EventListenerSupport implements Serializable
* @throws IllegalArgumentException if listenerInterface
is
* not an interface.
*/
- public static EventListenerSupport create(Class listenerInterface)
- {
+ public static EventListenerSupport create(Class listenerInterface) {
return new EventListenerSupport(listenerInterface);
}
@@ -118,8 +117,7 @@ public static EventListenerSupport create(Class listenerInterface)
* @throws IllegalArgumentException if listenerInterface
is
* not an interface.
*/
- public EventListenerSupport(Class listenerInterface)
- {
+ public EventListenerSupport(Class listenerInterface) {
this(listenerInterface, Thread.currentThread().getContextClassLoader());
}
@@ -136,8 +134,7 @@ public EventListenerSupport(Class listenerInterface)
* @throws IllegalArgumentException if listenerInterface
is
* not an interface.
*/
- public EventListenerSupport(Class listenerInterface, ClassLoader classLoader)
- {
+ public EventListenerSupport(Class listenerInterface, ClassLoader classLoader) {
this();
Validate.notNull(listenerInterface, "Listener interface cannot be null.");
Validate.notNull(classLoader, "ClassLoader cannot be null.");
@@ -161,8 +158,7 @@ private EventListenerSupport() {
* @return a proxy object which can be used to call listener methods on all
* of the registered event listeners
*/
- public L fire()
- {
+ public L fire() {
return proxy;
}
@@ -178,8 +174,7 @@ public L fire()
* @throws NullPointerException if listener
is
* null
.
*/
- public void addListener(L listener)
- {
+ public void addListener(L listener) {
Validate.notNull(listener, "Listener object cannot be null.");
listeners.add(listener);
}
@@ -189,8 +184,7 @@ public void addListener(L listener)
*
* @return the number of registered listeners.
*/
- int getListenerCount()
- {
+ int getListenerCount() {
return listeners.size();
}
@@ -202,8 +196,7 @@ int getListenerCount()
* @throws NullPointerException if listener
is
* null
.
*/
- public void removeListener(L listener)
- {
+ public void removeListener(L listener) {
Validate.notNull(listener, "Listener object cannot be null.");
listeners.remove(listener);
}
@@ -296,8 +289,7 @@ protected InvocationHandler createInvocationHandler() {
/**
* An invocation handler used to dispatch the event(s) to all the listeners.
*/
- protected class ProxyInvocationHandler implements InvocationHandler
- {
+ protected class ProxyInvocationHandler implements InvocationHandler {
/** Serialization version */
private static final long serialVersionUID = 1L;
@@ -311,11 +303,8 @@ protected class ProxyInvocationHandler implements InvocationHandler
* listeners.
* @param args event arguments to propagate to the listeners.
*/
- public Object invoke(Object proxy, Method method, Object[] args)
- throws Throwable
- {
- for (L listener : listeners)
- {
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
+ for (L listener : listeners) {
method.invoke(listener, args);
}
return null;
diff --git a/src/main/java/org/apache/commons/lang3/event/EventUtils.java b/src/main/java/org/apache/commons/lang3/event/EventUtils.java
index 2e11e578c..bef84ca2c 100644
--- a/src/main/java/org/apache/commons/lang3/event/EventUtils.java
+++ b/src/main/java/org/apache/commons/lang3/event/EventUtils.java
@@ -33,8 +33,8 @@
* @since 3.0
* @version $Id$
*/
-public class EventUtils
-{
+public class EventUtils {
+
/**
* Adds an event listener to the specified source. This looks for an "add" method corresponding to the event
* type (addActionListener, for example).
@@ -45,22 +45,14 @@ public class EventUtils
*
* @throws IllegalArgumentException if the object doesn't support the listener type
*/
- public static void addEventListener(Object eventSource, Class listenerType, L listener)
- {
- try
- {
+ public static void addEventListener(Object eventSource, Class listenerType, L listener) {
+ try {
MethodUtils.invokeMethod(eventSource, "add" + listenerType.getSimpleName(), listener);
- }
- catch (NoSuchMethodException e)
- {
+ } catch (NoSuchMethodException e) {
throw new IllegalArgumentException("Class " + eventSource.getClass().getName() + " does not have a public add" + listenerType.getSimpleName() + " method which takes a parameter of type " + listenerType.getName() + ".");
- }
- catch (IllegalAccessException e)
- {
+ } catch (IllegalAccessException e) {
throw new IllegalArgumentException("Class " + eventSource.getClass().getName() + " does not have an accessible add" + listenerType.getSimpleName () + " method which takes a parameter of type " + listenerType.getName() + ".");
- }
- catch (InvocationTargetException e)
- {
+ } catch (InvocationTargetException e) {
throw new RuntimeException("Unable to add listener.", e.getCause());
}
}
@@ -76,43 +68,34 @@ public static void addEventListener(Object eventSource, Class listenerTyp
* @param eventTypes the event types (method names) from the listener interface (if none specified, all will be
* supported)
*/
- public static void bindEventsToMethod(Object target, String methodName, Object eventSource, Class listenerType, String... eventTypes)
- {
+ public static void bindEventsToMethod(Object target, String methodName, Object eventSource, Class listenerType, String... eventTypes) {
final L listener = listenerType.cast(Proxy.newProxyInstance(target.getClass().getClassLoader(), new Class[] { listenerType }, new EventBindingInvocationHandler(target, methodName, eventTypes)));
addEventListener(eventSource, listenerType, listener);
}
- private static class EventBindingInvocationHandler implements InvocationHandler
- {
+ private static class EventBindingInvocationHandler implements InvocationHandler {
private final Object target;
private final String methodName;
private final Set eventTypes;
- public EventBindingInvocationHandler(final Object target, final String methodName, String[] eventTypes)
- {
+ public EventBindingInvocationHandler(final Object target, final String methodName, String[] eventTypes) {
this.target = target;
this.methodName = methodName;
this.eventTypes = new HashSet(Arrays.asList(eventTypes));
}
- public Object invoke(final Object proxy, final Method method, final Object[] parameters) throws Throwable
- {
- if ( eventTypes.isEmpty() || eventTypes.contains(method.getName()))
- {
- if (hasMatchingParametersMethod(method))
- {
+ public Object invoke(final Object proxy, final Method method, final Object[] parameters) throws Throwable {
+ if ( eventTypes.isEmpty() || eventTypes.contains(method.getName())) {
+ if (hasMatchingParametersMethod(method)) {
return MethodUtils.invokeMethod(target, methodName, parameters);
- }
- else
- {
+ } else {
return MethodUtils.invokeMethod(target, methodName);
}
}
return null;
}
- private boolean hasMatchingParametersMethod(final Method method)
- {
+ private boolean hasMatchingParametersMethod(final Method method) {
return MethodUtils.getAccessibleMethod(target.getClass(), methodName, method.getParameterTypes()) != null;
}
}
diff --git a/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java b/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java
index b05489869..a88349f7c 100644
--- a/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java
+++ b/src/main/java/org/apache/commons/lang3/exception/DefaultExceptionContext.java
@@ -58,8 +58,7 @@ public ExceptionContext addValue(String label, Object value) {
while (contextValueMap.containsKey(key)) {
Object information = contextValueMap.get(key);
if ((value == null && information == null)
- || (value != null && value.equals(information)))
- {
+ || (value != null && value.equals(information))) {
return this;
}
key = label + "[" + ++i +"]";
@@ -132,12 +131,10 @@ public String getFormattedExceptionMessage(String baseMessage){
value = this.contextValueMap.get(label);
if (value == null) {
buffer.append("null");
- }
- else {
+ } else {
try {
valueStr = value.toString();
- }
- catch (Exception e) {
+ } catch (Exception e) {
valueStr = "Exception thrown on toString(): " + ExceptionUtils.getStackTrace(e);
}
buffer.append(valueStr);
diff --git a/src/main/java/org/apache/commons/lang3/mutable/MutableObject.java b/src/main/java/org/apache/commons/lang3/mutable/MutableObject.java
index dbb108d2e..6aeaa1240 100644
--- a/src/main/java/org/apache/commons/lang3/mutable/MutableObject.java
+++ b/src/main/java/org/apache/commons/lang3/mutable/MutableObject.java
@@ -98,8 +98,7 @@ public boolean equals(Object obj) {
if (this.getClass() == obj.getClass()) {
MutableObject> that = (MutableObject>) obj;
return this.value.equals(that.value);
- }
- else {
+ } else {
return false;
}
}
diff --git a/src/main/java/org/apache/commons/lang3/text/StrBuilder.java b/src/main/java/org/apache/commons/lang3/text/StrBuilder.java
index 6f2be0069..3318f100c 100644
--- a/src/main/java/org/apache/commons/lang3/text/StrBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/text/StrBuilder.java
@@ -1174,8 +1174,7 @@ public StrBuilder appendSeparator(char separator) {
public StrBuilder appendSeparator(char standard, char defaultIfEmpty) {
if (size() > 0) {
append(standard);
- }
- else {
+ } else {
append(defaultIfEmpty);
}
return this;
diff --git a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java
index b836c7df0..e741fd846 100644
--- a/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java
+++ b/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java
@@ -174,15 +174,13 @@ public static String replace(Object source, Map valueMap, String
* @param valueProperties the properties with values, may be null
* @return the result of the replace operation
*/
- public static String replace(Object source, Properties valueProperties)
- {
+ public static String replace(Object source, Properties valueProperties) {
if (valueProperties == null) {
return source.toString();
}
Map valueMap = new HashMap();
Enumeration> propNames = valueProperties.propertyNames();
- while (propNames.hasMoreElements())
- {
+ while (propNames.hasMoreElements()) {
String propName = (String)propNames.nextElement();
String propValue = valueProperties.getProperty(propName);
valueMap.put(propName, propValue);
diff --git a/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java b/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
index c453f16b2..a5822bb6f 100644
--- a/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
+++ b/src/main/java/org/apache/commons/lang3/text/StrTokenizer.java
@@ -726,8 +726,7 @@ private int readNextToken(char[] chars, int start, int len, StrBuilder workArea,
* then the length of string
*/
private int readWithQuotes(char[] chars, int start, int len, StrBuilder workArea,
- List tokens, int quoteStart, int quoteLen)
- {
+ List tokens, int quoteStart, int quoteLen) {
// Loop until we've found the end of the quoted
// string or the end of the input
workArea.clear();
diff --git a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
index 64e603126..1a2e50aea 100644
--- a/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
+++ b/src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
@@ -348,12 +348,10 @@ public static String formatPeriod(long startMillis, long endMillis, String forma
days += start.getActualMaximum(Calendar.DAY_OF_YEAR) - start.get(Calendar.DAY_OF_YEAR);
// Not sure I grok why this is needed, but the brutal tests show it is
- if(start instanceof GregorianCalendar) {
- if( (start.get(Calendar.MONTH) == Calendar.FEBRUARY) &&
- (start.get(Calendar.DAY_OF_MONTH) == 29 ) )
- {
- days += 1;
- }
+ if (start instanceof GregorianCalendar &&
+ start.get(Calendar.MONTH) == Calendar.FEBRUARY &&
+ start.get(Calendar.DAY_OF_MONTH) == 29) {
+ days += 1;
}
start.add(Calendar.YEAR, 1);