Skip to content

Commit

Permalink
Warnings (wrt JDK 11) cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Mar 6, 2019
1 parent 1e61565 commit a99006d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ public void testNoArgsFactory() throws Exception

public void testSimpleDoubleConstructor() throws Exception
{
Double exp = new Double("0.25");
Double exp = Double.valueOf("0.25");
DoubleConstructorBean bean = MAPPER.readValue(exp.toString(), DoubleConstructorBean.class);
assertEquals(exp, bean.d);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public CreatorProperty[] getFromObjectArguments(DeserializationConfig config) {
public Object createFromObjectWith(DeserializationContext ctxt, Object[] args) {
try {
Class<?> cls = (Class<?>) args[0];
return cls.newInstance();
return cls.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class TestDefaultForScalars
{
static class Jackson417Bean {
public String foo = "bar";
public java.io.Serializable bar = new Integer(13);
public java.io.Serializable bar = Integer.valueOf(13);
}

// [databind#1395]: prevent attempts at including type info for primitives
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static class User {
public void setUserId(CharSequence id) {
// 21-Dec-2015, tatu: With a fix in 2.7, use of String would not
// trigger the problem, so use CharSequence...
setUserId(new Integer(id.toString()));
setUserId(Integer.valueOf(id.toString()));
}

public Integer getUserId() {
Expand Down

0 comments on commit a99006d

Please sign in to comment.