Made graph name optional. Default name is "graph".
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 19 Oct 2021 15:53:06 +0000 (18:53 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Tue, 19 Oct 2021 15:53:06 +0000 (18:53 +0300)
pom.xml
src/main/java/eu/svjatoslav/inspector/java/commandline/CommandlineConfiguration.java

diff --git a/pom.xml b/pom.xml
index 573798e..c594c1d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <dependency>
             <groupId>eu.svjatoslav</groupId>
             <artifactId>svjatoslavcommons</artifactId>
-            <version>1.8</version>
+            <version>1.9-SNAPSHOT</version>
         </dependency>
     </dependencies>
 
index 933a95d..5d4bf6f 100644 (file)
@@ -16,7 +16,9 @@ public class CommandlineConfiguration {
     public final boolean configurationOk;
     public NullParameter hideOrphanedClasses;
 
-    public CommandlineConfiguration(String args[]) {
+    public static final String DEFAULT_GRAPH_NAME = "graph";
+
+    public CommandlineConfiguration(String[] args) {
         Parser parser = buildCommandlineParameterParser();
         configurationOk = parser.parse(args);
         if (!configurationOk)
@@ -36,8 +38,7 @@ public class CommandlineConfiguration {
                 .addAliases("-j");
 
         graphName = parser.add(
-                new StringParameter("Graph name."))
-                .setMandatory()
+                new StringParameter("Graph name. (default: \"" + DEFAULT_GRAPH_NAME + "\")", DEFAULT_GRAPH_NAME))
                 .addAliases("-n");
 
         showDebug = parser.add(