Skip to content

Commit a99006d

Browse files
committed
Warnings (wrt JDK 11) cleanup
1 parent 1e61565 commit a99006d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/test/java/com/fasterxml/jackson/databind/deser/creators/TestCreators.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public void testNoArgsFactory() throws Exception
315315

316316
public void testSimpleDoubleConstructor() throws Exception
317317
{
318-
Double exp = new Double("0.25");
318+
Double exp = Double.valueOf("0.25");
319319
DoubleConstructorBean bean = MAPPER.readValue(exp.toString(), DoubleConstructorBean.class);
320320
assertEquals(exp, bean.d);
321321
}

src/test/java/com/fasterxml/jackson/databind/deser/creators/TestValueInstantiator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public CreatorProperty[] getFromObjectArguments(DeserializationConfig config) {
128128
public Object createFromObjectWith(DeserializationContext ctxt, Object[] args) {
129129
try {
130130
Class<?> cls = (Class<?>) args[0];
131-
return cls.newInstance();
131+
return cls.getDeclaredConstructor().newInstance();
132132
} catch (Exception e) {
133133
throw new RuntimeException(e);
134134
}

src/test/java/com/fasterxml/jackson/databind/jsontype/deftyping/TestDefaultForScalars.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class TestDefaultForScalars
1717
{
1818
static class Jackson417Bean {
1919
public String foo = "bar";
20-
public java.io.Serializable bar = new Integer(13);
20+
public java.io.Serializable bar = Integer.valueOf(13);
2121
}
2222

2323
// [databind#1395]: prevent attempts at including type info for primitives

src/test/java/com/fasterxml/jackson/failing/TestUnknownProperty426.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static class User {
1818
public void setUserId(CharSequence id) {
1919
// 21-Dec-2015, tatu: With a fix in 2.7, use of String would not
2020
// trigger the problem, so use CharSequence...
21-
setUserId(new Integer(id.toString()));
21+
setUserId(Integer.valueOf(id.toString()));
2222
}
2323

2424
public Integer getUserId() {

0 commit comments

Comments
 (0)