From 3299e7bb4ad47a0e726cf101043793c442de8996 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Tue, 19 Oct 2021 18:53:06 +0300 Subject: [PATCH] Made graph name optional. Default name is "graph". --- pom.xml | 2 +- .../java/commandline/CommandlineConfiguration.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 573798e..c594c1d 100644 --- a/pom.xml +++ b/pom.xml @@ -120,7 +120,7 @@ eu.svjatoslav svjatoslavcommons - 1.8 + 1.9-SNAPSHOT diff --git a/src/main/java/eu/svjatoslav/inspector/java/commandline/CommandlineConfiguration.java b/src/main/java/eu/svjatoslav/inspector/java/commandline/CommandlineConfiguration.java index 933a95d..5d4bf6f 100644 --- a/src/main/java/eu/svjatoslav/inspector/java/commandline/CommandlineConfiguration.java +++ b/src/main/java/eu/svjatoslav/inspector/java/commandline/CommandlineConfiguration.java @@ -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( -- 2.20.1