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

@@ -34,7 +34,7 @@ public class SockJsUrlInfoTests {
@Test
public void serverId() throws Exception {
SockJsUrlInfo info = new SockJsUrlInfo(new URI("https://example.com"));
int serverId = Integer.valueOf(info.getServerId());
int serverId = Integer.parseInt(info.getServerId());
assertThat(serverId >= 0 && serverId < 1000).as("Invalid serverId: " + serverId).isTrue();
}