Replace tab characters with spaces

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@901804 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Niall Pemberton 2010-01-21 17:59:51 +00:00
parent 4240de53b3
commit d918999ddd
3 changed files with 9 additions and 9 deletions

View File

@ -6091,14 +6091,14 @@ public static String truncateMiddle(String str, String middle, int length) {
}
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();
}
}

View File

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

View File

@ -308,7 +308,7 @@ public static Date parseDateStrictly(String str, String[] parsePatterns) throws
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");
}