Skip to content

Commit

Permalink
Fixed: Deprecation Warning about new Integer(int)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkarg committed Sep 30, 2023
1 parent 608cae7 commit 494ad2d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/java/com/beust/jcommander/JCommanderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ public void validationShouldWork1() {
ArgsValidate1 a = new ArgsValidate1();
JCommander jc = new JCommander(a);
jc.parse("-age", "2");
Assert.assertEquals(a.age, new Integer(2));
Assert.assertEquals(a.age, Integer.valueOf(2));
}

@Test(expectedExceptions = ParameterException.class)
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/beust/jcommander/MethodSetterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public Integer getPort() {
Arg args = new Arg();
JCommander.newBuilder().addObject(args).build().parse("--port", "42");

Assert.assertEquals(args.port, new Integer(42));
Assert.assertEquals(args.port, Integer.valueOf(42));
}

public void noGetterButWithField() {
Expand Down

0 comments on commit 494ad2d

Please sign in to comment.