diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index 16d57b98f..82016aa23 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -6091,14 +6091,14 @@ public class StringUtils { } int targetSting = length-middle.length(); - int startOffset = targetSting/2+targetSting%2; + int startOffset = targetSting/2+targetSting%2; int endOffset = str.length()-targetSting/2; - - StringBuilder builder = new StringBuilder(length); - builder.append(str.substring(0,startOffset)); - builder.append(middle); - builder.append(str.substring(endOffset)); - + + StringBuilder builder = new StringBuilder(length); + builder.append(str.substring(0,startOffset)); + builder.append(middle); + builder.append(str.substring(endOffset)); + return builder.toString(); } } diff --git a/src/main/java/org/apache/commons/lang3/Validate.java b/src/main/java/org/apache/commons/lang3/Validate.java index 5e83b7075..4c867a5fc 100644 --- a/src/main/java/org/apache/commons/lang3/Validate.java +++ b/src/main/java/org/apache/commons/lang3/Validate.java @@ -60,7 +60,7 @@ public class Validate { private static final String DEFAULT_VALID_INDEX_ARRAY_EX_MESSAGE = "The validated array index is invalid: %d"; private static final String DEFAULT_VALID_INDEX_CHAR_SEQUENCE_EX_MESSAGE = "The validated character sequence index is invalid: %d"; private static final String DEFAULT_VALID_INDEX_COLLECTION_EX_MESSAGE = "The validated collection index is invalid: %d"; - private static final String DEFAULT_VALID_STATE_EX_MESSAGE = "The validated state is false"; + private static final String DEFAULT_VALID_STATE_EX_MESSAGE = "The validated state is false"; /** * Constructor. This class should not normally be instantiated. diff --git a/src/main/java/org/apache/commons/lang3/time/DateUtils.java b/src/main/java/org/apache/commons/lang3/time/DateUtils.java index 0f4e2a4f4..e39975163 100644 --- a/src/main/java/org/apache/commons/lang3/time/DateUtils.java +++ b/src/main/java/org/apache/commons/lang3/time/DateUtils.java @@ -308,7 +308,7 @@ public class DateUtils { return parseDateWithLeniency(str, parsePatterns, false); } private static Date parseDateWithLeniency(String str, String[] parsePatterns, - boolean lenient) throws ParseException { + boolean lenient) throws ParseException { if (str == null || parsePatterns == null) { throw new IllegalArgumentException("Date and Patterns must not be null"); }