sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] branch geoapi-4.0 updated: Partial revert of previous commit: keep using appendOffsetId() instead of appendOffset("+H:MM:ss", "Z") for compatibility with Java 8. Will revisit after upgrade to Java 10 or 11 (after Apache SIS 1.0 release).
Date Tue, 15 Jan 2019 10:26:29 GMT
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


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new 77979cc  Partial revert of previous commit: keep using appendOffsetId() instead of
appendOffset("+H:MM:ss", "Z") for compatibility with Java 8. Will revisit after upgrade to
Java 10 or 11 (after Apache SIS 1.0 release).
77979cc is described below

commit 77979ccbbf9262e135c75b3443e034e95ff06918
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Tue Jan 15 11:25:04 2019 +0100

    Partial revert of previous commit: keep using appendOffsetId() instead of appendOffset("+H:MM:ss",
"Z") for compatibility with Java 8.
    Will revisit after upgrade to Java 10 or 11 (after Apache SIS 1.0 release).
---
 .../src/main/java/org/apache/sis/internal/util/StandardDateFormat.java | 3 ++-
 .../src/test/java/org/apache/sis/internal/netcdf/VariableTest.java     | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
b/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
index 56dd8a1..fcf137e 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
@@ -98,7 +98,8 @@ public final class StandardDateFormat extends DateFormat {
             .optionalStart().appendLiteral(':').appendValue(ChronoField.SECOND_OF_MINUTE,
2)
                                                .appendFraction(ChronoField.MILLI_OF_SECOND,
3, 3, true)
             .optionalEnd().optionalEnd().optionalEnd()    // Move back to the optional block
of HOUR_OF_DAY.
-            .optionalStart().appendOffset("+H:MM:ss", "Z")
+//          .optionalStart().appendOffset("+H:MM:ss", "Z")
+            .optionalStart().appendOffsetId()               // TODO: replace by above line
after we migrated to JDK10.
             .toFormatter(Locale.ROOT);
 
     /**
diff --git a/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/VariableTest.java
b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/VariableTest.java
index 09a9a0a..a8bfeb7 100644
--- a/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/VariableTest.java
+++ b/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/VariableTest.java
@@ -164,7 +164,7 @@ public strictfp class VariableTest extends TestCase {
          */
         final Instant save = variable.epoch;
         try {
-            assertSame(Units.DAY, variable.parseUnit("days since 1992-10-8 15:15:42.5 -6:00"));
+            assertSame(Units.DAY, variable.parseUnit("days since 1992-10-8 15:15:42.5 -06:00"));
             assertEquals("epoch", variable.epoch, Instant.parse("1992-10-08T21:15:42.500Z"));
         } finally {
             variable.epoch = save;


Mime
View raw message