l = -l;
}
}
- n = new Long(l);
+ n = Long.valueOf(l);
} else {
BigInteger big = digitList.getBigInteger(status[STATUS_POSITIVE]);
n = (big.bitLength() < 64) ? (Number) Long.valueOf(big.longValue()) : (Number) big;
if (pp.getIndex() == 0 && sub1.getPos() != 0) {
// commented out because ParsePosition doesn't have error index in 1.1.x
// parsePosition.setErrorIndex(pp.getErrorIndex());
- return new Long(0);
+ return Long.valueOf(0);
}
// this is the fun part. The basic guts of the rule-matching
// if we make it here, this was an unsuccessful match, and we
// leave pp unchanged and return 0
pp.setIndex(0);
- return new Long(0);
+ return Long.valueOf(0);
// if "delimiter" is empty, or consists only of ignorable characters
// (i.e., is semantically empty), thwe we obviously can't search
//TODO: We need a real fix. See #6895 / #6896
if (noParse) {
// skip parsing
- return new Long(0);
+ return Long.valueOf(0);
}
// parsePosition tells us where to start parsing. We copy the
if (resultNumber == null && longestParseDistance != 0) {
// set the number using plurrual count
if ( countOfLongestMatch.equals("zero") ) {
- resultNumber = new Integer(0);
+ resultNumber = Integer.valueOf(0);
} else if ( countOfLongestMatch.equals("one") ) {
- resultNumber = new Integer(1);
+ resultNumber = Integer.valueOf(1);
} else if ( countOfLongestMatch.equals("two") ) {
- resultNumber = new Integer(2);
+ resultNumber = Integer.valueOf(2);
} else {
// should not happen.
// TODO: how to handle?