Use Integer.parseInt instead of Integer.valueOf for primitive int

Closes gh-25456
This commit is contained in:
XenoAmess
2020-07-22 16:54:32 +08:00
committed by GitHub
parent 24f9b1d966
commit cd12583e13
5 changed files with 9 additions and 9 deletions

View File

@@ -416,11 +416,11 @@ public abstract class AbstractCacheAnnotationTests {
Integer three = 3;
Cache cache = this.cm.getCache("testCache");
assertThat((int) Integer.valueOf(service.conditionalUpdate(one).toString())).isEqualTo((int) one);
assertThat(Integer.parseInt(service.conditionalUpdate(one).toString())).isEqualTo((int) one);
assertThat(cache.get(one)).isNull();
assertThat((int) Integer.valueOf(service.conditionalUpdate(three).toString())).isEqualTo((int) three);
assertThat((int) Integer.valueOf(cache.get(three).get().toString())).isEqualTo((int) three);
assertThat(Integer.parseInt(service.conditionalUpdate(three).toString())).isEqualTo((int) three);
assertThat(Integer.parseInt(cache.get(three).get().toString())).isEqualTo((int) three);
}
protected void testMultiCache(CacheableService<?> service) {