Commit 049bc90f authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

code: cleanup some warnings

parent 9bf47d56
......@@ -97,7 +97,7 @@ public final class Bytes {
* @return int value
*/
public static int getInt(byte[] bytes, int offset) {
return (bytes[offset + 0] & 0xFF) << 24
return (bytes[offset] & 0xFF) << 24
| (bytes[offset + 1] & 0xFF) << 16
| (bytes[offset + 2] & 0xFF) << 8
| (bytes[offset + 3] & 0xFF);
......
......@@ -182,7 +182,7 @@ public class OncRpcSvc {
* @throws IOException
* @throws UnknownHostException
*/
private void publishToPortmap() throws IOException, UnknownHostException {
private void publishToPortmap() throws IOException {
OncRpcClient rpcClient = new OncRpcClient(InetAddress.getLocalHost(),
IpProtocolType.UDP, OncRpcPortmap.PORTMAP_PORT);
......
......@@ -41,7 +41,7 @@ public class RpcReply {
private RpcAuthVerifier _verf;
private final XdrTransport _transport;
public RpcReply(int xid, Xdr xdr, XdrTransport transport) throws RpcException, OncRpcException, IOException {
public RpcReply(int xid, Xdr xdr, XdrTransport transport) throws OncRpcException, IOException {
_xid = xid;
_xdr = xdr;
_transport = transport;
......
......@@ -28,7 +28,7 @@ public class SpringRunner {
// this class it used only to bootstrap the Spring IoC
}
public static void main(String[] args) throws FileNotFoundException, IOException {
public static void main(String[] args) throws IOException {
if( args.length != 1 ) {
System.err.println("Usage: SpringRunner <config>");
System.exit(1);
......
......@@ -32,7 +32,7 @@ public class netid {
return "0.0.0.0." + (0xFF & port_part[0]) + "." + (0xFF & port_part[1]);
}
public static final InetSocketAddress toInetSocketAddress(String str)
public static InetSocketAddress toInetSocketAddress(String str)
throws UnknownHostException {
String[] cb_addr = str.trim().split("[.]");
......@@ -54,7 +54,7 @@ public class netid {
}
public static final int getPort(String str) {
public static int getPort(String str) {
String[] cb_addr = str.trim().split("[.]");
......
......@@ -68,7 +68,7 @@ public class GenericPortmapClient implements OncPortmapClient {
return _portmapClient.getPort(program, version, netid);
}
public static void main(String[] args) throws UnknownHostException, InterruptedException, IOException, OncRpcException {
public static void main(String[] args) throws InterruptedException, IOException, OncRpcException {
OncRpcClient rpcClient = new OncRpcClient(InetAddress.getByName("127.0.0.1"), IpProtocolType.UDP, 111);
XdrTransport transport = rpcClient.connect();
......
......@@ -36,11 +36,11 @@ public class OncRpcEmbeddedPortmap {
private static final RpcAuth _auth = new RpcAuthTypeNone();
public OncRpcEmbeddedPortmap() throws UnknownHostException, IOException {
public OncRpcEmbeddedPortmap() throws IOException {
this(2000);
}
public OncRpcEmbeddedPortmap(int timeout) throws UnknownHostException, IOException {
public OncRpcEmbeddedPortmap(int timeout) throws IOException {
// we start embedded portmap only if there no other one is running
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment