We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6f9ba5b + a7ee7bf commit d96af45Copy full SHA for d96af45
initial/client/src/main/java/com/example/restservice/SimpleClient.java
@@ -13,6 +13,7 @@ public class SimpleClient {
13
14
private static void usageAndExit() {
15
System.out.println("Usage: SimpleClient <-i identityFile> <-s serviceName>");
16
+ System.exit(1);
17
}
18
19
public static void main(String[] args) {
@@ -21,14 +22,14 @@ public static void main(String[] args) {
21
22
23
for(int i = 0; i < args.length; i++) {
24
if("-i".equals(args[i])) {
- if( i < args.length ) {
25
+ if( i < args.length-1 ) {
26
identityFile = args[++i];
27
} else {
28
usageAndExit();
29
30
31
if("-s".equals(args[i])) {
- if( i < args.length) {
32
33
serviceName = args[++i];
34
35
0 commit comments