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