mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Use Integer.parseInt(String) to get a primitive int.
This commit is contained in:
@@ -73,7 +73,7 @@ class LanTcpPlugin extends TcpPlugin {
|
||||
!StringUtils.isNullOrEmpty(portString)) {
|
||||
try {
|
||||
addr = InetAddress.getByName(addrString);
|
||||
int port = Integer.valueOf(portString);
|
||||
int port = Integer.parseInt(portString);
|
||||
addrs.add(new InetSocketAddress(addr, port));
|
||||
addrs.add(new InetSocketAddress(addr, 0));
|
||||
} catch(NumberFormatException e) {
|
||||
|
||||
@@ -191,7 +191,7 @@ abstract class TcpPlugin implements DuplexPlugin {
|
||||
if(StringUtils.isNullOrEmpty(portString)) return null;
|
||||
try {
|
||||
InetAddress addr = InetAddress.getByName(addrString);
|
||||
int port = Integer.valueOf(portString);
|
||||
int port = Integer.parseInt(portString);
|
||||
return new InetSocketAddress(addr, port);
|
||||
} catch(NumberFormatException e) {
|
||||
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||
|
||||
@@ -64,7 +64,7 @@ class WanTcpPlugin extends TcpPlugin {
|
||||
!StringUtils.isNullOrEmpty(portString)) {
|
||||
try {
|
||||
addr = InetAddress.getByName(addrString);
|
||||
port = Integer.valueOf(portString);
|
||||
port = Integer.parseInt(portString);
|
||||
addrs.add(new InetSocketAddress(addr, port));
|
||||
addrs.add(new InetSocketAddress(addr, 0));
|
||||
} catch(NumberFormatException e) {
|
||||
|
||||
Reference in New Issue
Block a user