sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1677174 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/ sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/ sis-utility/src/main/java/org/apache/sis/internal/util/
Date Fri, 01 May 2015 16:31:39 GMT
Author: desruisseaux
Date: Fri May  1 16:31:38 2015
New Revision: 1677174

URL: http://svn.apache.org/r1677174
Log:
Utilities: provide a way do disable the "this operation requires the sis-temporal module"
warning in SIS releases.

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/TemporalUtilities.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java?rev=1677174&r1=1677173&r2=1677174&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gts/TM_PeriodDuration.java
[UTF-8] Fri May  1 16:31:38 2015
@@ -178,6 +178,8 @@ public final class TM_PeriodDuration ext
      * @param e The exception.
      */
     private static void warningOccured(final String methodName, final Exception e) {
-        Context.warningOccured(Context.current(), TM_PeriodDuration.class, methodName, e,
true);
+        if (TemporalUtilities.REPORT_MISSING_MODULE || !e.getMessage().contains("sis-temporal"))
{
+            Context.warningOccured(Context.current(), TM_PeriodDuration.class, methodName,
e, true);
+        }
     }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java?rev=1677174&r1=1677173&r2=1677174&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/jaxb/gml/TM_Primitive.java
[UTF-8] Fri May  1 16:31:38 2015
@@ -164,6 +164,8 @@ public final class TM_Primitive extends
      * @param e the exception.
      */
     private static void warningOccured(final String method, final Exception e) {
-        Context.warningOccured(Context.current(), TM_Primitive.class, method, e, true);
+        if (TemporalUtilities.REPORT_MISSING_MODULE || !e.getMessage().contains("sis-temporal"))
{
+            Context.warningOccured(Context.current(), TM_Primitive.class, method, e, true);
+        }
     }
 }

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/TemporalUtilities.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/TemporalUtilities.java?rev=1677174&r1=1677173&r2=1677174&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/TemporalUtilities.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/TemporalUtilities.java
[UTF-8] Fri May  1 16:31:38 2015
@@ -37,6 +37,15 @@ import org.apache.sis.internal.system.De
  */
 public final class TemporalUtilities extends Static {
     /**
+     * {@code true} if the SIS library should log the "This operation requires the sis-temporal
module" warning.
+     * This flag can be {@code true} during development phase, but should be set to {@code
false} in SIS releases
+     * until we can really provide a sis-temporal module.
+     *
+     * This constant will be removed after SIS release a sis-temporal module.
+     */
+    public static final boolean REPORT_MISSING_MODULE = true;
+
+    /**
      * Do not allow instantiation of this class.
      */
     private TemporalUtilities() {



Mime
View raw message