8145468: update java.lang APIs with new deprecations

Reviewed-by: mcimadamore
This commit is contained in:
Stuart Marks 2016-04-18 14:04:09 -07:00
parent 9691505077
commit 2d863bcd37
4 changed files with 30 additions and 30 deletions

View File

@ -125,15 +125,15 @@ strictfp class ConstFold {
return syms.booleanType.constType(b2i(intValue(od) >= 0));
case lneg: // unary -
return syms.longType.constType(new Long(-longValue(od)));
return syms.longType.constType(Long.valueOf(-longValue(od)));
case lxor: // ~
return syms.longType.constType(new Long(~longValue(od)));
return syms.longType.constType(Long.valueOf(~longValue(od)));
case fneg: // unary -
return syms.floatType.constType(new Float(-floatValue(od)));
return syms.floatType.constType(Float.valueOf(-floatValue(od)));
case dneg: // ~
return syms.doubleType.constType(new Double(-doubleValue(od)));
return syms.doubleType.constType(Double.valueOf(-doubleValue(od)));
default:
return null;
@ -216,37 +216,37 @@ strictfp class ConstFold {
case ladd:
return syms.longType.constType(
new Long(longValue(l) + longValue(r)));
Long.valueOf(longValue(l) + longValue(r)));
case lsub:
return syms.longType.constType(
new Long(longValue(l) - longValue(r)));
Long.valueOf(longValue(l) - longValue(r)));
case lmul:
return syms.longType.constType(
new Long(longValue(l) * longValue(r)));
Long.valueOf(longValue(l) * longValue(r)));
case ldiv:
return syms.longType.constType(
new Long(longValue(l) / longValue(r)));
Long.valueOf(longValue(l) / longValue(r)));
case lmod:
return syms.longType.constType(
new Long(longValue(l) % longValue(r)));
Long.valueOf(longValue(l) % longValue(r)));
case land:
return syms.longType.constType(
new Long(longValue(l) & longValue(r)));
Long.valueOf(longValue(l) & longValue(r)));
case lor:
return syms.longType.constType(
new Long(longValue(l) | longValue(r)));
Long.valueOf(longValue(l) | longValue(r)));
case lxor:
return syms.longType.constType(
new Long(longValue(l) ^ longValue(r)));
Long.valueOf(longValue(l) ^ longValue(r)));
case lshl: case lshll:
return syms.longType.constType(
new Long(longValue(l) << intValue(r)));
Long.valueOf(longValue(l) << intValue(r)));
case lshr: case lshrl:
return syms.longType.constType(
new Long(longValue(l) >> intValue(r)));
Long.valueOf(longValue(l) >> intValue(r)));
case lushr:
return syms.longType.constType(
new Long(longValue(l) >>> intValue(r)));
Long.valueOf(longValue(l) >>> intValue(r)));
case lcmp:
if (longValue(l) < longValue(r))
return syms.intType.constType(minusOne);
@ -256,19 +256,19 @@ strictfp class ConstFold {
return syms.intType.constType(zero);
case fadd:
return syms.floatType.constType(
new Float(floatValue(l) + floatValue(r)));
Float.valueOf(floatValue(l) + floatValue(r)));
case fsub:
return syms.floatType.constType(
new Float(floatValue(l) - floatValue(r)));
Float.valueOf(floatValue(l) - floatValue(r)));
case fmul:
return syms.floatType.constType(
new Float(floatValue(l) * floatValue(r)));
Float.valueOf(floatValue(l) * floatValue(r)));
case fdiv:
return syms.floatType.constType(
new Float(floatValue(l) / floatValue(r)));
Float.valueOf(floatValue(l) / floatValue(r)));
case fmod:
return syms.floatType.constType(
new Float(floatValue(l) % floatValue(r)));
Float.valueOf(floatValue(l) % floatValue(r)));
case fcmpg: case fcmpl:
if (floatValue(l) < floatValue(r))
return syms.intType.constType(minusOne);
@ -282,19 +282,19 @@ strictfp class ConstFold {
return syms.intType.constType(minusOne);
case dadd:
return syms.doubleType.constType(
new Double(doubleValue(l) + doubleValue(r)));
Double.valueOf(doubleValue(l) + doubleValue(r)));
case dsub:
return syms.doubleType.constType(
new Double(doubleValue(l) - doubleValue(r)));
Double.valueOf(doubleValue(l) - doubleValue(r)));
case dmul:
return syms.doubleType.constType(
new Double(doubleValue(l) * doubleValue(r)));
Double.valueOf(doubleValue(l) * doubleValue(r)));
case ddiv:
return syms.doubleType.constType(
new Double(doubleValue(l) / doubleValue(r)));
Double.valueOf(doubleValue(l) / doubleValue(r)));
case dmod:
return syms.doubleType.constType(
new Double(doubleValue(l) % doubleValue(r)));
Double.valueOf(doubleValue(l) % doubleValue(r)));
case dcmpg: case dcmpl:
if (doubleValue(l) < doubleValue(r))
return syms.intType.constType(minusOne);

View File

@ -457,13 +457,13 @@ public class ClassReader {
poolObj[i] = getInt(index + 1);
break;
case CONSTANT_Float:
poolObj[i] = new Float(getFloat(index + 1));
poolObj[i] = Float.valueOf(getFloat(index + 1));
break;
case CONSTANT_Long:
poolObj[i] = new Long(getLong(index + 1));
poolObj[i] = Long.valueOf(getLong(index + 1));
break;
case CONSTANT_Double:
poolObj[i] = new Double(getDouble(index + 1));
poolObj[i] = Double.valueOf(getDouble(index + 1));
break;
case CONSTANT_MethodHandle:
skipBytes(4);

View File

@ -203,7 +203,7 @@ public class Gen extends JCTree.Visitor {
*/
void emitMinusOne(int tc) {
if (tc == LONGcode) {
items.makeImmediateItem(syms.longType, new Long(-1)).load();
items.makeImmediateItem(syms.longType, Long.valueOf(-1)).load();
} else {
code.emitop0(iconst_m1);
}

View File

@ -686,7 +686,7 @@ public class JavacParser implements Parser {
try {
t = F.at(pos).Literal(
TypeTag.LONG,
new Long(Convert.string2long(strval(prefix), token.radix())));
Long.valueOf(Convert.string2long(strval(prefix), token.radix())));
} catch (NumberFormatException ex) {
error(token.pos, "int.number.too.large", strval(prefix));
}