提交 30ecd078 编写于 作者: S Stefan Spieker

Replaced inefficient Number constructor with static valueOf

上级 22222f4c
......@@ -67,7 +67,7 @@ public class BatchFile extends CommandInterpreter {
@CheckForNull
public final Integer getUnstableReturn() {
return new Integer(0).equals(unstableReturn) ? null : unstableReturn;
return Integer.valueOf(0).equals(unstableReturn) ? null : unstableReturn;
}
@DataBoundSetter
......
......@@ -106,7 +106,7 @@ public class Shell extends CommandInterpreter {
@CheckForNull
public final Integer getUnstableReturn() {
return new Integer(0).equals(unstableReturn) ? null : unstableReturn;
return Integer.valueOf(0).equals(unstableReturn) ? null : unstableReturn;
}
@DataBoundSetter
......
......@@ -285,7 +285,7 @@ public class HistoryWidget<O extends ModelObject,T> extends Widget {
return null;
}
try {
return new Long(paramVal);
return Long.valueOf(paramVal);
} catch (NumberFormatException nfe) {
return null;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册