Remove unnecessary boxing

This commit is contained in:
Stephane Nicoll
2022-04-15 16:33:12 +02:00
parent 59cc34fa6e
commit c9866e3785
2 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2021 the original author or authors.
* Copyright 2006-2022 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.
@@ -456,7 +456,7 @@ public class EnableRetryTests {
@Bean
public Integer integerFiveBean() {
return Integer.valueOf(5);
return 5;
}
@Bean

View File

@@ -35,7 +35,7 @@ public class DummySleeper implements Sleeper {
* @return the lastBackOff
*/
public long getLastBackOff() {
return backOffs.get(backOffs.size() - 1).longValue();
return backOffs.get(backOffs.size() - 1);
}
public long[] getBackOffs() {
@@ -43,7 +43,7 @@ public class DummySleeper implements Sleeper {
int i = 0;
for (Iterator<Long> iterator = backOffs.iterator(); iterator.hasNext();) {
Long value = iterator.next();
result[i++] = value.longValue();
result[i++] = value;
}
return result;
}
@@ -54,7 +54,7 @@ public class DummySleeper implements Sleeper {
* @see org.springframework.batch.retry.backoff.Sleeper#sleep(long)
*/
public void sleep(long backOffPeriod) throws InterruptedException {
this.backOffs.add(Long.valueOf(backOffPeriod));
this.backOffs.add(backOffPeriod);
}
}