summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--java/tests/SOCK_SAP/SOCKConnectorTest.java27
1 files changed, 15 insertions, 12 deletions
diff --git a/java/tests/SOCK_SAP/SOCKConnectorTest.java b/java/tests/SOCK_SAP/SOCKConnectorTest.java
index e0cf37091e6..d1fdacc48a4 100644
--- a/java/tests/SOCK_SAP/SOCKConnectorTest.java
+++ b/java/tests/SOCK_SAP/SOCKConnectorTest.java
@@ -73,20 +73,23 @@ public class SOCKConnectorTest
SOCKConnectorTest client = new SOCKConnectorTest ();
// check arg count
- if (args.length < 2 || args.length > 2)
+ if (args.length == 0 || args.length > 2)
print_usage_and_die();
if (args.length == 2)
- {
- try
- {
- port = Integer.parseInt (args[1]);
- }
- catch (NumberFormatException e)
- {
- client.print_usage_and_die ();
- }
- client.init (args[0], port);
- }
+ {
+ try
+ {
+ port = Integer.parseInt (args[1]);
+ }
+ catch (NumberFormatException e)
+ {
+ client.print_usage_and_die ();
+ }
+ }
+ client.init (args[0], port);
+
+
}
}
+