Removed extra C style parens in return statements (as discussed on commons-dev).

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@161229 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2005-04-13 22:36:48 +00:00
parent 887d935024
commit b0053ca691
29 changed files with 90 additions and 90 deletions

View File

@ -1302,7 +1302,7 @@ public static int lastIndexOf(Object[] array, Object objectToFind, int startInde
* @return <code>true</code> if the array contains the object
*/
public static boolean contains(Object[] array, Object objectToFind) {
return (indexOf(array, objectToFind) != -1);
return indexOf(array, objectToFind) != -1;
}
// long IndexOf
@ -1405,7 +1405,7 @@ public static int lastIndexOf(long[] array, long valueToFind, int startIndex) {
* @return <code>true</code> if the array contains the object
*/
public static boolean contains(long[] array, long valueToFind) {
return (indexOf(array, valueToFind) != -1);
return indexOf(array, valueToFind) != -1;
}
// int IndexOf
@ -1508,7 +1508,7 @@ public static int lastIndexOf(int[] array, int valueToFind, int startIndex) {
* @return <code>true</code> if the array contains the object
*/
public static boolean contains(int[] array, int valueToFind) {
return (indexOf(array, valueToFind) != -1);
return indexOf(array, valueToFind) != -1;
}
// short IndexOf
@ -1611,7 +1611,7 @@ public static int lastIndexOf(short[] array, short valueToFind, int startIndex)
* @return <code>true</code> if the array contains the object
*/
public static boolean contains(short[] array, short valueToFind) {
return (indexOf(array, valueToFind) != -1);
return indexOf(array, valueToFind) != -1;
}
// char IndexOf
@ -1719,7 +1719,7 @@ public static int lastIndexOf(char[] array, char valueToFind, int startIndex) {
* @since 2.1
*/
public static boolean contains(char[] array, char valueToFind) {
return (indexOf(array, valueToFind) != -1);
return indexOf(array, valueToFind) != -1;
}
// byte IndexOf
@ -1822,7 +1822,7 @@ public static int lastIndexOf(byte[] array, byte valueToFind, int startIndex) {
* @return <code>true</code> if the array contains the object
*/
public static boolean contains(byte[] array, byte valueToFind) {
return (indexOf(array, valueToFind) != -1);
return indexOf(array, valueToFind) != -1;
}
// double IndexOf
@ -2029,7 +2029,7 @@ public static int lastIndexOf(double[] array, double valueToFind, int startIndex
* @return <code>true</code> if the array contains the object
*/
public static boolean contains(double[] array, double valueToFind) {
return (indexOf(array, valueToFind) != -1);
return indexOf(array, valueToFind) != -1;
}
/**
@ -2046,7 +2046,7 @@ public static boolean contains(double[] array, double valueToFind) {
* @return true if value falling within tolerance is in array
*/
public static boolean contains(double[] array, double valueToFind, double tolerance) {
return (indexOf(array, valueToFind, 0, tolerance) != -1);
return indexOf(array, valueToFind, 0, tolerance) != -1;
}
// float IndexOf
@ -2149,7 +2149,7 @@ public static int lastIndexOf(float[] array, float valueToFind, int startIndex)
* @return <code>true</code> if the array contains the object
*/
public static boolean contains(float[] array, float valueToFind) {
return (indexOf(array, valueToFind) != -1);
return indexOf(array, valueToFind) != -1;
}
// boolean IndexOf
@ -2252,7 +2252,7 @@ public static int lastIndexOf(boolean[] array, boolean valueToFind, int startInd
* @return <code>true</code> if the array contains the object
*/
public static boolean contains(boolean[] array, boolean valueToFind) {
return (indexOf(array, valueToFind) != -1);
return indexOf(array, valueToFind) != -1;
}
// Primitive/Object array converters

View File

@ -98,7 +98,7 @@ public short getShortValue(short holder) {
* @return the selected bits
*/
public int getRawValue(int holder) {
return (holder & _mask);
return holder & _mask;
}
/**

View File

@ -84,7 +84,7 @@ public static boolean isTrue(Boolean bool) {
if (bool == null) {
return false;
}
return (bool.booleanValue() ? true : false);
return bool.booleanValue() ? true : false;
}
/**
@ -104,7 +104,7 @@ public static boolean isFalse(Boolean bool) {
if (bool == null) {
return false;
}
return (bool.booleanValue() ? false : true);
return bool.booleanValue() ? false : true;
}
/**
@ -121,7 +121,7 @@ public static boolean isFalse(Boolean bool) {
* @return Boolean.TRUE or Boolean.FALSE as appropriate
*/
public static Boolean toBooleanObject(boolean bool) {
return (bool ? Boolean.TRUE : Boolean.FALSE);
return bool ? Boolean.TRUE : Boolean.FALSE;
}
/**
@ -142,7 +142,7 @@ public static boolean toBoolean(Boolean bool) {
if (bool == null) {
return false;
}
return (bool.booleanValue() ? true : false);
return bool.booleanValue() ? true : false;
}
/**
@ -162,7 +162,7 @@ public static boolean toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull)
if (bool == null) {
return valueIfNull;
}
return (bool.booleanValue() ? true : false);
return bool.booleanValue() ? true : false;
}
// Integer to Boolean methods
@ -182,7 +182,7 @@ public static boolean toBooleanDefaultIfNull(Boolean bool, boolean valueIfNull)
* if zero
*/
public static boolean toBoolean(int value) {
return (value == 0 ? false : true);
return value == 0 ? false : true;
}
/**
@ -200,7 +200,7 @@ public static boolean toBoolean(int value) {
* <code>null</code> if <code>null</code>
*/
public static Boolean toBooleanObject(int value) {
return (value == 0 ? Boolean.FALSE : Boolean.TRUE);
return value == 0 ? Boolean.FALSE : Boolean.TRUE;
}
/**
@ -223,7 +223,7 @@ public static Boolean toBooleanObject(Integer value) {
if (value == null) {
return null;
}
return (value.intValue() == 0 ? Boolean.FALSE : Boolean.TRUE);
return value.intValue() == 0 ? Boolean.FALSE : Boolean.TRUE;
}
/**
@ -369,7 +369,7 @@ public static Boolean toBooleanObject(Integer value, Integer trueValue, Integer
* @return one if <code>true</code>, zero if <code>false</code>
*/
public static int toInteger(boolean bool) {
return (bool ? 1 : 0);
return bool ? 1 : 0;
}
/**
@ -385,7 +385,7 @@ public static int toInteger(boolean bool) {
* @return one if <code>true</code>, zero if <code>false</code>
*/
public static Integer toIntegerObject(boolean bool) {
return (bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO);
return bool ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
/**
@ -406,7 +406,7 @@ public static Integer toIntegerObject(Boolean bool) {
if (bool == null) {
return null;
}
return (bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO);
return bool.booleanValue() ? NumberUtils.INTEGER_ONE : NumberUtils.INTEGER_ZERO;
}
/**
@ -423,7 +423,7 @@ public static Integer toIntegerObject(Boolean bool) {
* @return the appropriate value
*/
public static int toInteger(boolean bool, int trueValue, int falseValue) {
return (bool ? trueValue : falseValue);
return bool ? trueValue : falseValue;
}
/**
@ -445,7 +445,7 @@ public static int toInteger(Boolean bool, int trueValue, int falseValue, int nul
if (bool == null) {
return nullValue;
}
return (bool.booleanValue() ? trueValue : falseValue);
return bool.booleanValue() ? trueValue : falseValue;
}
/**
@ -464,7 +464,7 @@ public static int toInteger(Boolean bool, int trueValue, int falseValue, int nul
* @return the appropriate value
*/
public static Integer toIntegerObject(boolean bool, Integer trueValue, Integer falseValue) {
return (bool ? trueValue : falseValue);
return bool ? trueValue : falseValue;
}
/**
@ -489,7 +489,7 @@ public static Integer toIntegerObject(Boolean bool, Integer trueValue, Integer f
if (bool == null) {
return nullValue;
}
return (bool.booleanValue() ? trueValue : falseValue);
return bool.booleanValue() ? trueValue : falseValue;
}
// String to Boolean methods
@ -778,7 +778,7 @@ public static String toString(Boolean bool, String trueString, String falseStrin
if (bool == null) {
return nullString;
}
return (bool.booleanValue() ? trueString : falseString);
return bool.booleanValue() ? trueString : falseString;
}
// boolean to String methods
@ -850,7 +850,7 @@ public static String toStringYesNo(boolean bool) {
* @return one of the two input Strings
*/
public static String toString(boolean bool, String trueString, String falseString) {
return (bool ? trueString : falseString);
return bool ? trueString : falseString;
}
// xor methods
@ -922,7 +922,7 @@ public static Boolean xor(Boolean[] array) {
} catch (NullPointerException ex) {
throw new IllegalArgumentException("The array must not contain any null elements");
}
return (xor(primitive) ? Boolean.TRUE : Boolean.FALSE);
return xor(primitive) ? Boolean.TRUE : Boolean.FALSE;
}
}

View File

@ -145,7 +145,7 @@ public boolean isNegated() {
* @return <code>true</code> if this range contains the input character
*/
public boolean contains(char ch) {
return ((ch >= start && ch <= end) != negated);
return (ch >= start && ch <= end) != negated;
}
/**
@ -162,15 +162,15 @@ public boolean contains(CharRange range) {
}
if (negated) {
if (range.negated) {
return (start >= range.start && end <= range.end);
return start >= range.start && end <= range.end;
} else {
return (range.end < start || range.start > end);
return range.end < start || range.start > end;
}
} else {
if (range.negated) {
return (start == 0 && end == Character.MAX_VALUE);
return start == 0 && end == Character.MAX_VALUE;
} else {
return (start <= range.start && end >= range.end);
return start <= range.start && end >= range.end;
}
}
}
@ -192,7 +192,7 @@ public boolean equals(Object obj) {
return false;
}
CharRange other = (CharRange) obj;
return (start == other.start && end == other.end && negated == other.negated);
return start == other.start && end == other.end && negated == other.negated;
}
/**

View File

@ -254,7 +254,7 @@ public boolean equals(Object obj) {
return false;
}
CharSet other = (CharSet) obj;
return (set.equals(other.set));
return set.equals(other.set);
}
/**

View File

@ -219,7 +219,7 @@ public static int toIntValue(char ch) {
if (isAsciiNumeric(ch) == false) {
throw new IllegalArgumentException("The character " + ch + " is not in the range '0' - '9'");
}
return (ch - 48);
return ch - 48;
}
/**
@ -241,7 +241,7 @@ public static int toIntValue(char ch, int defaultValue) {
if (isAsciiNumeric(ch) == false) {
return defaultValue;
}
return (ch - 48);
return ch - 48;
}
/**
@ -403,7 +403,7 @@ public static String unicodeEscaped(Character ch) {
* @return true if less than 128
*/
public static boolean isAscii(char ch) {
return (ch < 128);
return ch < 128;
}
/**
@ -422,7 +422,7 @@ public static boolean isAscii(char ch) {
* @return true if between 32 and 126 inclusive
*/
public static boolean isAsciiPrintable(char ch) {
return (ch >= 32 && ch < 127);
return ch >= 32 && ch < 127;
}
/**
@ -441,7 +441,7 @@ public static boolean isAsciiPrintable(char ch) {
* @return true if less than 32 or equals 127
*/
public static boolean isAsciiControl(char ch) {
return (ch < 32 || ch == 127);
return ch < 32 || ch == 127;
}
/**
@ -479,7 +479,7 @@ public static boolean isAsciiAlpha(char ch) {
* @return true if between 65 and 90 inclusive
*/
public static boolean isAsciiAlphaUpper(char ch) {
return (ch >= 'A' && ch <= 'Z');
return ch >= 'A' && ch <= 'Z';
}
/**
@ -498,7 +498,7 @@ public static boolean isAsciiAlphaUpper(char ch) {
* @return true if between 97 and 122 inclusive
*/
public static boolean isAsciiAlphaLower(char ch) {
return (ch >= 'a' && ch <= 'z');
return ch >= 'a' && ch <= 'z';
}
/**
@ -517,7 +517,7 @@ public static boolean isAsciiAlphaLower(char ch) {
* @return true if between 48 and 57 inclusive
*/
public static boolean isAsciiNumeric(char ch) {
return (ch >= '0' && ch <= '9');
return ch >= '0' && ch <= '9';
}
/**

View File

@ -494,7 +494,7 @@ public static boolean isInnerClass(Class cls) {
if (cls == null) {
return false;
}
return (cls.getName().indexOf(INNER_CLASS_SEPARATOR_CHAR) >= 0);
return cls.getName().indexOf(INNER_CLASS_SEPARATOR_CHAR) >= 0;
}
}

View File

@ -83,7 +83,7 @@ public ObjectUtils() {
* @return <code>object</code> if it is not <code>null</code>, defaultValue otherwise
*/
public static Object defaultIfNull(Object object, Object defaultValue) {
return (object != null ? object : defaultValue);
return object != null ? object : defaultValue;
}
/**
@ -129,7 +129,7 @@ public static boolean equals(Object object1, Object object2) {
* @since 2.1
*/
public static int hashCode(Object obj) {
return ((obj == null) ? 0 : obj.hashCode());
return (obj == null) ? 0 : obj.hashCode();
}
// Identity ToString
@ -208,7 +208,7 @@ public static StringBuffer appendIdentityToString(StringBuffer buffer, Object ob
* @since 2.0
*/
public static String toString(Object obj) {
return (obj == null ? "" : obj.toString());
return obj == null ? "" : obj.toString();
}
/**
@ -231,7 +231,7 @@ public static String toString(Object obj) {
* @since 2.0
*/
public static String toString(Object obj, String nullStr) {
return (obj == null ? nullStr : obj.toString());
return obj == null ? nullStr : obj.toString();
}
// Null

View File

@ -430,7 +430,7 @@ public static String stripToNull(String str) {
return null;
}
str = strip(str, null);
return (str.length() == 0 ? null : str);
return str.length() == 0 ? null : str;
}
/**
@ -456,7 +456,7 @@ public static String stripToNull(String str) {
* @since 2.0
*/
public static String stripToEmpty(String str) {
return (str == null ? EMPTY : strip(str, null));
return str == null ? EMPTY : strip(str, null);
}
/**
@ -666,7 +666,7 @@ public static String[] stripAll(String[] strs, String stripChars) {
* both <code>null</code>
*/
public static boolean equals(String str1, String str2) {
return (str1 == null ? str2 == null : str1.equals(str2));
return str1 == null ? str2 == null : str1.equals(str2);
}
/**
@ -691,7 +691,7 @@ public static boolean equals(String str1, String str2) {
* both <code>null</code>
*/
public static boolean equalsIgnoreCase(String str1, String str2) {
return (str1 == null ? str2 == null : str1.equalsIgnoreCase(str2));
return str1 == null ? str2 == null : str1.equalsIgnoreCase(str2);
}
// IndexOf
@ -1022,7 +1022,7 @@ public static boolean contains(String str, char searchChar) {
if (isEmpty(str)) {
return false;
}
return (str.indexOf(searchChar) >= 0);
return str.indexOf(searchChar) >= 0;
}
/**
@ -1050,7 +1050,7 @@ public static boolean contains(String str, String searchStr) {
if (str == null || searchStr == null) {
return false;
}
return (str.indexOf(searchStr) >= 0);
return str.indexOf(searchStr) >= 0;
}
// IndexOfAny chars

View File

@ -1239,7 +1239,7 @@ private static String getSystemProperty(String property) {
* than the required version
*/
public static boolean isJavaVersionAtLeast(float requiredVersion) {
return (JAVA_VERSION_FLOAT >= requiredVersion);
return JAVA_VERSION_FLOAT >= requiredVersion;
}
/**
@ -1257,7 +1257,7 @@ public static boolean isJavaVersionAtLeast(float requiredVersion) {
* @since 2.0
*/
public static boolean isJavaVersionAtLeast(int requiredVersion) {
return (JAVA_VERSION_INT >= requiredVersion);
return JAVA_VERSION_INT >= requiredVersion;
}
/**

View File

@ -114,7 +114,7 @@ public WordUtils() {
// }
// }
//
// return (stringBuffer.toString());
// return stringBuffer.toString();
// }
// Wrapping

View File

@ -134,7 +134,7 @@
* super("Plus");
* }
* public int eval(int a, int b) {
* return (a + b);
* return a + b;
* }
* }
* public static final OperationEnum MINUS = new MinusOperation();
@ -143,7 +143,7 @@
* super("Minus");
* }
* public int eval(int a, int b) {
* return (a - b);
* return a - b;
* }
* }
*

View File

@ -134,7 +134,7 @@
* super("Plus");
* }
* public int eval(int a, int b) {
* return (a + b);
* return a + b;
* }
* }
* public static final OperationEnum MINUS = new MinusOperation();
@ -143,7 +143,7 @@
* super("Minus");
* }
* public int eval(int a, int b) {
* return (a - b);
* return a - b;
* }
* }
*

View File

@ -342,7 +342,7 @@ private static Throwable getCauseUsingFieldName(Throwable throwable, String fiel
* @since 2.0
*/
public static boolean isThrowableNested() {
return (THROWABLE_CAUSE_METHOD != null);
return THROWABLE_CAUSE_METHOD != null;
}
/**

View File

@ -157,7 +157,7 @@ public String getMessage(String baseMsg) {
}
}
return (msg.length() > 0 ? msg.toString() : null);
return msg.length() > 0 ? msg.toString() : null;
}
/**

View File

@ -305,7 +305,7 @@ public boolean containsNumber(Number number) {
* range by <code>double</code> comparison
*/
public boolean containsDouble(double value) {
return (value >= min && value <= max);
return value >= min && value <= max;
}
// Range tests

View File

@ -301,7 +301,7 @@ public boolean containsNumber(Number number) {
* range by <code>float</code> comparison
*/
public boolean containsFloat(float value) {
return (value >= min && value <= max);
return value >= min && value <= max;
}
// Range tests

View File

@ -276,7 +276,7 @@ public boolean containsNumber(Number number) {
* range by <code>int</code> comparison
*/
public boolean containsInteger(int value) {
return (value >= min && value <= max);
return value >= min && value <= max;
}
// Range tests
@ -337,7 +337,7 @@ public boolean equals(Object obj) {
return false;
}
IntRange range = (IntRange) obj;
return (min == range.min && max == range.max);
return min == range.min && max == range.max;
}
/**

View File

@ -136,7 +136,7 @@ public static long nextLong(long n) {
* @return the random boolean
*/
public boolean nextBoolean() {
return (Math.random() > 0.5);
return Math.random() > 0.5;
}
/**
* <p>Returns the next pseudorandom, uniformly distributed float value

View File

@ -289,7 +289,7 @@ public boolean containsNumber(Number number) {
* range by <code>long</code> comparison
*/
public boolean containsLong(long value) {
return (value >= min && value <= max);
return value >= min && value <= max;
}
// Range tests
@ -350,7 +350,7 @@ public boolean equals(Object obj) {
return false;
}
LongRange range = (LongRange) obj;
return (min == range.min && max == range.max);
return min == range.min && max == range.max;
}
/**

View File

@ -169,7 +169,7 @@ public boolean containsNumber(Number number) {
}
int compareMin = ((Comparable) min).compareTo(number);
int compareMax = ((Comparable) max).compareTo(number);
return (compareMin <= 0 && compareMax >= 0);
return compareMin <= 0 && compareMax >= 0;
}
// Range tests

View File

@ -198,7 +198,7 @@ public boolean containsLong(Number value) {
* range by <code>long</code> comparison
*/
public boolean containsLong(long value) {
return (value >= getMinimumLong() && value <= getMaximumLong());
return value >= getMinimumLong() && value <= getMaximumLong();
}
/**
@ -232,7 +232,7 @@ public boolean containsInteger(Number value) {
* range by <code>int</code> comparison
*/
public boolean containsInteger(int value) {
return (value >= getMinimumInteger() && value <= getMaximumInteger());
return value >= getMinimumInteger() && value <= getMaximumInteger();
}
/**
@ -268,7 +268,7 @@ public boolean containsDouble(Number value) {
public boolean containsDouble(double value) {
int compareMin = NumberUtils.compare(getMinimumDouble(), value);
int compareMax = NumberUtils.compare(getMaximumDouble(), value);
return (compareMin <= 0 && compareMax >= 0);
return compareMin <= 0 && compareMax >= 0;
}
/**
@ -304,7 +304,7 @@ public boolean containsFloat(Number value) {
public boolean containsFloat(float value) {
int compareMin = NumberUtils.compare(getMinimumFloat(), value);
int compareMax = NumberUtils.compare(getMaximumFloat(), value);
return (compareMin <= 0 && compareMax >= 0);
return compareMin <= 0 && compareMax >= 0;
}
// Range tests

View File

@ -180,7 +180,7 @@ public int hashCode() {
public int compareTo(Object obj) {
MutableByte other = (MutableByte) obj;
byte anotherVal = other.value;
return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1));
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
/**

View File

@ -146,7 +146,7 @@ public double doubleValue() {
*/
public boolean equals(Object obj) {
if (obj instanceof MutableInt) {
return (value == ((MutableInt) obj).intValue());
return value == ((MutableInt) obj).intValue();
}
return false;
}
@ -171,7 +171,7 @@ public int hashCode() {
public int compareTo(Object obj) {
MutableInt other = (MutableInt) obj;
int anotherVal = other.value;
return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1));
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
/**

View File

@ -171,7 +171,7 @@ public int hashCode() {
public int compareTo(Object obj) {
MutableLong other = (MutableLong) obj;
long anotherVal = other.value;
return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1));
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
/**

View File

@ -83,7 +83,7 @@ public void setValue(Object value) {
public boolean equals(Object obj) {
if (obj instanceof MutableObject) {
Object other = ((MutableObject) obj).value;
return (value == other || (value != null && value.equals(other)));
return value == other || (value != null && value.equals(other));
}
return false;
}
@ -94,7 +94,7 @@ public boolean equals(Object obj) {
* @return the value's hash code or <code>0</code> if the value is <code>null</code>.
*/
public int hashCode() {
return (value == null ? 0 : value.hashCode());
return value == null ? 0 : value.hashCode();
}
/**
@ -103,7 +103,7 @@ public int hashCode() {
* @return the mutable value as a string
*/
public String toString() {
return (value == null ? "null" : value.toString());
return value == null ? "null" : value.toString();
}
}

View File

@ -155,7 +155,7 @@ public double doubleValue() {
*/
public boolean equals(Object obj) {
if (obj instanceof MutableShort) {
return (value == ((MutableShort) obj).shortValue());
return value == ((MutableShort) obj).shortValue();
}
return false;
}
@ -180,7 +180,7 @@ public int hashCode() {
public int compareTo(Object obj) {
MutableShort other = (MutableShort) obj;
short anotherVal = other.value;
return (value < anotherVal ? -1 : (value == anotherVal ? 0 : 1));
return value < anotherVal ? -1 : (value == anotherVal ? 0 : 1);
}
/**

View File

@ -185,7 +185,7 @@ public static boolean isSameInstant(Date date1, Date date2) {
if (date1 == null || date2 == null) {
throw new IllegalArgumentException("The date must not be null");
}
return (date1.getTime() == date2.getTime());
return date1.getTime() == date2.getTime();
}
/**
@ -203,7 +203,7 @@ public static boolean isSameInstant(Calendar cal1, Calendar cal2) {
if (cal1 == null || cal2 == null) {
throw new IllegalArgumentException("The date must not be null");
}
return (cal1.getTime().getTime() == cal2.getTime().getTime());
return cal1.getTime().getTime() == cal2.getTime().getTime();
}
//-----------------------------------------------------------------------

View File

@ -207,13 +207,13 @@ public void resume() {
*/
public long getTime() {
if(this.runningState == STATE_STOPPED || this.runningState == STATE_SUSPENDED) {
return (this.stopTime - this.startTime);
return this.stopTime - this.startTime;
} else
if(this.runningState == STATE_UNSTARTED) {
return 0;
} else
if(this.runningState == STATE_RUNNING) {
return (System.currentTimeMillis() - this.startTime);
return System.currentTimeMillis() - this.startTime;
}
throw new RuntimeException("Illegal running state has occured. ");
}
@ -232,7 +232,7 @@ public long getSplitTime() {
if(this.splitState != STATE_SPLIT) {
throw new IllegalStateException("Stopwatch must be split to get the split time. ");
}
return (this.stopTime - this.startTime);
return this.stopTime - this.startTime;
}
/**