Use valueOf()
@@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test;
*/
public class ProgressListenerTest {
- private class ProgressListenerImpl implements ProgressListener {
+ private static class ProgressListenerImpl implements ProgressListener {
private final long expectedContentLength;
@@ -55,9 +55,9 @@ public class ProgressListenerTest {
assertTrue(pItems >= 0 && pItems <= expectedItems);
assertTrue(bytesRead == null || pBytesRead >= bytesRead.longValue());
- bytesRead = new Long(pBytesRead);
+ bytesRead = Long.valueOf(pBytesRead);
assertTrue(items == null || pItems >= items.intValue());
- items = new Integer(pItems);
+ items = Integer.valueOf(pItems);
}
void checkFinished() {
