Don't call wrapper constructors directly
The constructors of the wrapper classes for primitives (Double, Integer, Long) have been deprecated since JDK 9 and should no longer be called. Instead the static factory #valueOf should be used.
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
1f3dd5f401
commit
c9e06b2a7f
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006-2007 the original author or authors.
|
||||
* Copyright 2006-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -33,7 +33,7 @@ public class ChunkResponseTests {
|
||||
|
||||
@Test
|
||||
public void testGetJobId() {
|
||||
assertEquals(new Long(111L), response.getJobId());
|
||||
assertEquals(Long.valueOf(111L), response.getJobId());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -50,7 +50,7 @@ public class ChunkResponseTests {
|
||||
public void testSerializable() throws Exception {
|
||||
ChunkResponse result = (ChunkResponse) SerializationUtils.deserialize(SerializationUtils.serialize(response));
|
||||
assertNotNull(result.getStepContribution());
|
||||
assertEquals(new Long(111L), result.getJobId());
|
||||
assertEquals(Long.valueOf(111L), result.getJobId());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user