summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authoreea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-13 16:47:24 +0000
committereea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-13 16:47:24 +0000
commitd47f883e991310938d62050b998dd97efd9bc3ca (patch)
treeb899598ef85fe92323a7aee1ddff2ec5c4f3c888 /java
parent18c4a577960ea605807e8a7a37e1be3ae239f28f (diff)
downloadATCD-d47f883e991310938d62050b998dd97efd9bc3ca.tar.gz
Made the command line arguments work correctly.
Diffstat (limited to 'java')
-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);
+
+
}
}
+