Commit eed6d588 authored by Mark's avatar Mark
Browse files

Use java.lang.Integer.valueOf() rather than constructor

Removes warnings in openjdk17 compilation.

<https://stackoverflow.com/questions/47095474/the-constructors-integerint-doubledouble-longlong-and-so-on-are-deprecat>
claims that openjdk9 onwards caches small Integers.
parent 3e36eb01
......@@ -84,7 +84,7 @@ public final class JProxy
String methodName = method.getName();
if (methodName.equals("hashCode"))
return new Integer(System.identityHashCode(proxy));
return Integer.valueOf(System.identityHashCode(proxy));
if (methodName.equals("equals"))
return (proxy == args[0] ? Boolean.TRUE : Boolean.FALSE);
if (methodName.equals("toString"))
......
......@@ -537,7 +537,7 @@ public final class LispThread extends LispObject
thread.specials[index] = null;
}
freeSpecialIndices.add(new Integer(index));
freeSpecialIndices.add(Integer.valueOf(index));
}
}
......
......@@ -59,7 +59,7 @@ final public class SpecialBinding
{
if (value == null)
// return or not: error doesn't return anyway
Lisp.error(new UnboundVariable(LispThread.specialNames.get(new Integer(idx)).get()));
Lisp.error(new UnboundVariable(LispThread.specialNames.get(Integer.valueOf(idx)).get()));
return value;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment