Use parseInt without substring method
This commit is contained in:
committed by
Arjen Poutsma
parent
79d3f5c64c
commit
804b343cab
@@ -707,7 +707,7 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
idx = host.indexOf(':');
|
||||
}
|
||||
if (idx != -1) {
|
||||
return Integer.parseInt(host.substring(idx + 1));
|
||||
return Integer.parseInt(host, idx + 1, host.length(), 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user