Fix deprecation warning in java testcase
Fixes: ./director_string_runme.java:53: warning: [deprecation] Integer(int) in Integer has been deprecated
This commit is contained in:
parent
fa58fd53b4
commit
d1a4174bf3
1 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ public class director_string_runme {
|
|||
director_string_A c = new director_string_A("hi");
|
||||
for (int i=0; i<3; i++) {
|
||||
s = c.call_get(i);
|
||||
if (!s.equals(new Integer(i).toString())) throw new RuntimeException("director_string_A.get(" + i + ") failed. Got:" + s);
|
||||
if (!s.equals(Integer.valueOf(i).toString())) throw new RuntimeException("director_string_A.get(" + i + ") failed. Got:" + s);
|
||||
}
|
||||
|
||||
director_string_B b = new director_string_B("hello");
|
||||
|
|
@ -50,7 +50,7 @@ class director_string_A extends A {
|
|||
super(first);
|
||||
}
|
||||
public String get(int n) {
|
||||
return new Integer(n).toString();
|
||||
return Integer.valueOf(n).toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue