This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit 962ee26275bf87bf94acb948402fec3167d8a73c Author: Martin Desruisseaux <[email protected]> AuthorDate: Fri Sep 6 19:25:29 2019 +0200 Replace hard-coded string value by a new constant in the Modules class. --- .../src/main/java/org/apache/sis/console/TransformCommand.java | 3 ++- .../src/main/java/org/apache/sis/internal/system/Modules.java | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java b/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java index 8c8cbe0..f0c7d9d 100644 --- a/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java +++ b/application/sis-console/src/main/java/org/apache/sis/console/TransformCommand.java @@ -52,6 +52,7 @@ import org.apache.sis.internal.referencing.Formulas; import org.apache.sis.internal.referencing.DirectPositionView; import org.apache.sis.internal.referencing.ReferencingUtilities; import org.apache.sis.internal.storage.CodeType; +import org.apache.sis.internal.system.Modules; import org.apache.sis.referencing.IdentifiedObjects; import org.apache.sis.referencing.CRS; import org.apache.sis.internal.util.X364; @@ -649,6 +650,6 @@ final class TransformCommand extends FormattedOutputCommand { * considered as an indication that the point is outside the domain of validity. */ private static void warning(final Exception e) { - Logging.recoverableException(Logging.getLogger("org.apache.sis.console"), TransformCommand.class, "run", e); + Logging.recoverableException(Logging.getLogger(Modules.CONSOLE), TransformCommand.class, "run", e); } } diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java b/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java index c3da41f..bf5d60a 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java +++ b/core/sis-utility/src/main/java/org/apache/sis/internal/system/Modules.java @@ -93,6 +93,11 @@ public final class Modules { public static final String SQL = "org.apache.sis.sql"; /** + * The {@value} module name. + */ + public static final String CONSOLE = "org.apache.sis.console"; + + /** * The major version number of all Apache SIS modules. * * @see org.apache.sis.util.Version
