Remove redundant initializer. (#800)
This commit is contained in:
parent
8407c6212c
commit
d094dd624e
|
@ -764,7 +764,7 @@ public class ArrayUtils {
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static <T> T[] add(final T[] array, final int index, final T element) {
|
public static <T> T[] add(final T[] array, final int index, final T element) {
|
||||||
Class<T> clss = null;
|
Class<T> clss;
|
||||||
if (array != null) {
|
if (array != null) {
|
||||||
clss = getComponentType(array);
|
clss = getComponentType(array);
|
||||||
} else if (element != null) {
|
} else if (element != null) {
|
||||||
|
|
|
@ -212,7 +212,7 @@ public class CharSetUtils {
|
||||||
final char[] chrs = str.toCharArray();
|
final char[] chrs = str.toCharArray();
|
||||||
final int sz = chrs.length;
|
final int sz = chrs.length;
|
||||||
char lastChar = chrs[0];
|
char lastChar = chrs[0];
|
||||||
char ch = ' ';
|
char ch;
|
||||||
Character inChars = null;
|
Character inChars = null;
|
||||||
Character notInChars = null;
|
Character notInChars = null;
|
||||||
buffer.append(lastChar);
|
buffer.append(lastChar);
|
||||||
|
|
|
@ -2816,7 +2816,7 @@ public class StringUtils {
|
||||||
// String's can't have a MAX_VALUEth index.
|
// String's can't have a MAX_VALUEth index.
|
||||||
int ret = Integer.MAX_VALUE;
|
int ret = Integer.MAX_VALUE;
|
||||||
|
|
||||||
int tmp = 0;
|
int tmp;
|
||||||
for (final CharSequence search : searchStrs) {
|
for (final CharSequence search : searchStrs) {
|
||||||
if (search == null) {
|
if (search == null) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -5079,7 +5079,7 @@ public class StringUtils {
|
||||||
return INDEX_NOT_FOUND;
|
return INDEX_NOT_FOUND;
|
||||||
}
|
}
|
||||||
int ret = INDEX_NOT_FOUND;
|
int ret = INDEX_NOT_FOUND;
|
||||||
int tmp = 0;
|
int tmp;
|
||||||
for (final CharSequence search : searchStrs) {
|
for (final CharSequence search : searchStrs) {
|
||||||
if (search == null) {
|
if (search == null) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -6766,7 +6766,7 @@ public class StringUtils {
|
||||||
// index on index that the match was found
|
// index on index that the match was found
|
||||||
int textIndex = -1;
|
int textIndex = -1;
|
||||||
int replaceIndex = -1;
|
int replaceIndex = -1;
|
||||||
int tempIndex = -1;
|
int tempIndex;
|
||||||
|
|
||||||
// index of replace array that will replace the search string found
|
// index of replace array that will replace the search string found
|
||||||
// NOTE: logic duplicated below START
|
// NOTE: logic duplicated below START
|
||||||
|
|
|
@ -257,14 +257,14 @@ public final class Fraction extends Number implements Comparable<Fraction> {
|
||||||
int denom0 = 1; // the pre-previous
|
int denom0 = 1; // the pre-previous
|
||||||
int numer1 = 1; // the previous
|
int numer1 = 1; // the previous
|
||||||
int denom1 = 0; // the previous
|
int denom1 = 0; // the previous
|
||||||
int numer2 = 0; // the current, setup in calculation
|
int numer2; // the current, setup in calculation
|
||||||
int denom2 = 0; // the current, setup in calculation
|
int denom2; // the current, setup in calculation
|
||||||
int a1 = (int) value;
|
int a1 = (int) value;
|
||||||
int a2 = 0;
|
int a2;
|
||||||
double x1 = 1;
|
double x1 = 1;
|
||||||
double x2 = 0;
|
double x2;
|
||||||
double y1 = value - a1;
|
double y1 = value - a1;
|
||||||
double y2 = 0;
|
double y2;
|
||||||
double delta1, delta2 = Double.MAX_VALUE;
|
double delta1, delta2 = Double.MAX_VALUE;
|
||||||
double fraction;
|
double fraction;
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
|
|
@ -209,7 +209,7 @@ public class MethodUtils {
|
||||||
args = ArrayUtils.nullToEmpty(args);
|
args = ArrayUtils.nullToEmpty(args);
|
||||||
|
|
||||||
final String messagePrefix;
|
final String messagePrefix;
|
||||||
Method method = null;
|
Method method;
|
||||||
|
|
||||||
if (forceAccess) {
|
if (forceAccess) {
|
||||||
messagePrefix = "No such method: ";
|
messagePrefix = "No such method: ";
|
||||||
|
|
|
@ -630,7 +630,7 @@ public class TypeUtils {
|
||||||
|
|
||||||
// find the interface closest to the super class
|
// find the interface closest to the super class
|
||||||
for (final Type midType : interfaceTypes) {
|
for (final Type midType : interfaceTypes) {
|
||||||
Class<?> midClass = null;
|
Class<?> midClass;
|
||||||
|
|
||||||
if (midType instanceof ParameterizedType) {
|
if (midType instanceof ParameterizedType) {
|
||||||
midClass = getRawType((ParameterizedType) midType);
|
midClass = getRawType((ParameterizedType) midType);
|
||||||
|
|
|
@ -445,7 +445,7 @@ public class ExtendedMessageFormat extends MessageFormat {
|
||||||
* @param pos current position
|
* @param pos current position
|
||||||
*/
|
*/
|
||||||
private void seekNonWs(final String pattern, final ParsePosition pos) {
|
private void seekNonWs(final String pattern, final ParsePosition pos) {
|
||||||
int len = 0;
|
int len;
|
||||||
final char[] buffer = pattern.toCharArray();
|
final char[] buffer = pattern.toCharArray();
|
||||||
do {
|
do {
|
||||||
len = StrMatcher.splitMatcher().isMatch(buffer, pos.getIndex());
|
len = StrMatcher.splitMatcher().isMatch(buffer, pos.getIndex());
|
||||||
|
|
|
@ -778,7 +778,7 @@ public class StrSubstitutor {
|
||||||
// find suffix
|
// find suffix
|
||||||
final int startPos = pos;
|
final int startPos = pos;
|
||||||
pos += startMatchLen;
|
pos += startMatchLen;
|
||||||
int endMatchLen = 0;
|
int endMatchLen;
|
||||||
int nestedVarCount = 0;
|
int nestedVarCount = 0;
|
||||||
while (pos < bufEnd) {
|
while (pos < bufEnd) {
|
||||||
if (substitutionInVariablesEnabled
|
if (substitutionInVariablesEnabled
|
||||||
|
@ -813,7 +813,7 @@ public class StrSubstitutor {
|
||||||
|
|
||||||
if (valueDelimMatcher != null) {
|
if (valueDelimMatcher != null) {
|
||||||
final char [] varNameExprChars = varNameExpr.toCharArray();
|
final char [] varNameExprChars = varNameExpr.toCharArray();
|
||||||
int valueDelimiterMatchLen = 0;
|
int valueDelimiterMatchLen;
|
||||||
for (int i = 0; i < varNameExprChars.length; i++) {
|
for (int i = 0; i < varNameExprChars.length; i++) {
|
||||||
// if there's any nested variable when nested variable substitution disabled, then stop resolving name and default value.
|
// if there's any nested variable when nested variable substitution disabled, then stop resolving name and default value.
|
||||||
if (!substitutionInVariablesEnabled
|
if (!substitutionInVariablesEnabled
|
||||||
|
|
|
@ -1129,8 +1129,8 @@ public class DateUtils {
|
||||||
if (focus == null) {
|
if (focus == null) {
|
||||||
throw nullDateIllegalArgumentException();
|
throw nullDateIllegalArgumentException();
|
||||||
}
|
}
|
||||||
Calendar start = null;
|
Calendar start;
|
||||||
Calendar end = null;
|
Calendar end;
|
||||||
int startCutoff = Calendar.SUNDAY;
|
int startCutoff = Calendar.SUNDAY;
|
||||||
int endCutoff = Calendar.SATURDAY;
|
int endCutoff = Calendar.SATURDAY;
|
||||||
switch (rangeStyle) {
|
switch (rangeStyle) {
|
||||||
|
|
Loading…
Reference in New Issue