mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 23:03:04 +00:00
Clear some minor static analysis warnings.
This commit is contained in:
parent
8b8bf50144
commit
5be443c2d3
@ -100,7 +100,7 @@ public class VersionMessage extends Message {
|
|||||||
try {
|
try {
|
||||||
// We hard-code the IPv4 localhost address here rather than use InetAddress.getLocalHost() because some
|
// We hard-code the IPv4 localhost address here rather than use InetAddress.getLocalHost() because some
|
||||||
// mobile phones have broken localhost DNS entries, also, this is faster.
|
// mobile phones have broken localhost DNS entries, also, this is faster.
|
||||||
final byte[] localhost = new byte[] { 127, 0, 0, 1 };
|
final byte[] localhost = { 127, 0, 0, 1 };
|
||||||
myAddr = new PeerAddress(InetAddress.getByAddress(localhost), params.getPort(), 0);
|
myAddr = new PeerAddress(InetAddress.getByAddress(localhost), params.getPort(), 0);
|
||||||
theirAddr = new PeerAddress(InetAddress.getByAddress(localhost), params.getPort(), 0);
|
theirAddr = new PeerAddress(InetAddress.getByAddress(localhost), params.getPort(), 0);
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
@ -289,7 +289,7 @@ public class VersionMessage extends Message {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkSubVerComponent(String component) {
|
private static void checkSubVerComponent(String component) {
|
||||||
if (component.contains("/") || component.contains("(") || component.contains(")"))
|
if (component.contains("/") || component.contains("(") || component.contains(")"))
|
||||||
throw new IllegalArgumentException("name contains invalid characters");
|
throw new IllegalArgumentException("name contains invalid characters");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user