You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2023/12/14 17:49:46 UTC
(sis) 01/03: Force SIS class initialization at JShell startup time.
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 b368e4000513b53fbc90dc33eb1c8f210fd3e758
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Thu Dec 14 17:40:11 2023 +0100
Force SIS class initialization at JShell startup time.
---
.../main/org/apache/sis/console/Command.java | 2 ++
.../main/org/apache/sis/console/SIS.java | 10 ++++++++++
optional/src/org.apache.sis.gui/bundle/conf/imports.jsh | 1 +
3 files changed, 13 insertions(+)
diff --git a/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/Command.java b/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/Command.java
index 4eae489efa..9c4dbb648e 100644
--- a/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/Command.java
+++ b/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/Command.java
@@ -196,6 +196,8 @@ public final class Command {
* This method can be invoked at initialization time,
* such as the beginning of {@code main(…)} static method.
*
+ * @see MonolineFormatter#install()
+ *
* @since 1.5
*/
public static void configureLogging() {
diff --git a/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/SIS.java b/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/SIS.java
index f46c416759..273842cad9 100644
--- a/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/SIS.java
+++ b/endorsed/src/org.apache.sis.console/main/org/apache/sis/console/SIS.java
@@ -19,6 +19,7 @@ package org.apache.sis.console;
import java.util.EnumMap;
import java.io.PrintWriter;
import org.apache.sis.util.Static;
+import org.apache.sis.util.Version;
import org.apache.sis.util.Printable;
import org.apache.sis.util.CharSequences;
import org.apache.sis.util.resources.Errors;
@@ -213,6 +214,15 @@ public final class SIS extends Static {
private SIS() {
}
+ /**
+ * {@return a string representation of the Apache SIS version}.
+ *
+ * @see Version#SIS
+ */
+ public static String version() {
+ return Version.SIS.toString();
+ }
+
diff --git a/optional/src/org.apache.sis.gui/bundle/conf/imports.jsh b/optional/src/org.apache.sis.gui/bundle/conf/imports.jsh
index ddf130cb4b..c3ad133108 100644
--- a/optional/src/org.apache.sis.gui/bundle/conf/imports.jsh
+++ b/optional/src/org.apache.sis.gui/bundle/conf/imports.jsh
@@ -297,3 +297,4 @@ import static org.apache.sis.console.SIS.print;
// Initialization
org.apache.sis.console.Command.configureLogging()
+SIS.version() // For class static initializer.