]> gitweb.hhaalo.de Git - discspan-java.git/commitdiff
add: validate parameters
authorBastian Dehn <hhaalo@arcor.de>
Thu, 3 Feb 2022 16:29:03 +0000 (17:29 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 3 Feb 2022 16:29:03 +0000 (17:29 +0100)
src/de/hhaalo/discspan.java

index aefb562baec0798ee4e6718b1b950246eeabd95b..8ba0895e51708539a1477cf7d809e99221dc204a 100644 (file)
@@ -4,7 +4,13 @@ public class discspan
 {
        public static void main(String[] args)
        {
-               System.out.println("Hello World!");
                parameter param = new parameter(args);
+
+               if (param.getInput() == ""
+                               || param.getOutput() == ""
+                               || param.getSplit() < 2048) {
+                       System.err.println("ERROR: missing arguments");
+                       System.exit(1);
+               }
        }
 }