sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1687828 - in /sis/branches/JDK8/core: sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
Date Fri, 26 Jun 2015 18:08:54 GMT
Author: desruisseaux
Date: Fri Jun 26 18:08:53 2015
New Revision: 1687828

URL: http://svn.apache.org/r1687828
Log:
Post-merge cleanup (for avoiding some conflicts in next merge operations).

Modified:
    sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
    sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java

Modified: sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java?rev=1687828&r1=1687827&r2=1687828&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/GeodeticObjectParser.java
[UTF-8] Fri Jun 26 18:08:53 2015
@@ -685,12 +685,6 @@ final class GeodeticObjectParser extends
             Unit<?> unit = defaultUnit;     // Depth, height or time axis unit.
             switch (type) {
                 /*
-                 * Unknown CS type — we can not guess which axes to create.
-                 */
-                default: {
-                    throw parent.missingComponent(WKTKeywords.Axis);
-                }
-                /*
                  * Cartesian — we can create axes only for geodetic datum, in which case
the axes are for
                  * two-dimensional Projected or three-dimensional Geocentric CRS.
                  */
@@ -768,6 +762,12 @@ final class GeodeticObjectParser extends
                     z = "t";
                     break;
                 }
+                /*
+                 * Unknown CS type — we can not guess which axes to create.
+                 */
+                default: {
+                    throw parent.missingComponent(WKTKeywords.Axis);
+                }
             }
             int i = 0;
             axes = new CoordinateSystemAxis[dimension];

Modified: sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java?rev=1687828&r1=1687827&r2=1687828&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
[UTF-8] Fri Jun 26 18:08:53 2015
@@ -49,9 +49,9 @@ public final class StandardDateFormat ex
     public static final String PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SX";
 
     /**
-     * Short version of {@link #DATE_PATTERN}, to be used when formatting temporal extents
+     * Short version of {@link #PATTERN}, to be used when formatting temporal extents
      * if the duration is greater than some threshold (typically one day). This pattern must
-     * be a prefix of {@link #DATE_PATTERN}, since we will use that condition for deciding
+     * be a prefix of {@link #PATTERN}, since we will use that condition for deciding
      * if this pattern is really shorter (the user could have created his own date format
      * with a different pattern).
      */
@@ -86,27 +86,27 @@ public final class StandardDateFormat ex
      */
     @Override
     public Date parse(final String text, final ParsePosition position) {
-        Date time = super.parse(text, position);
-        if (time == null) {
+        Date date = super.parse(text, position);
+        if (date == null) {
             /*
              * The "yyyy-MM-dd'T'HH:mm:ss.SX" pattern may fail if the user did not specified
the time part.
              * So if we fail to parse using the full pattern, try again with only the "yyyy-MM-dd"
pattern.
              */
             final String pattern = toPattern();
-            if (PATTERN.startsWith(pattern)) {
+            if (pattern.startsWith(SHORT_PATTERN)) {
                 final int errorIndex = position.getErrorIndex();
                 position.setErrorIndex(-1);
                 applyPattern(SHORT_PATTERN);
                 try {
-                    time = parse(text, position);
+                    date = parse(text, position);
                 } finally {
                     applyPattern(pattern);
                 }
-                if (time == null) {
+                if (date == null) {
                     position.setErrorIndex(errorIndex); // Reset original error index.
                 }
             }
         }
-        return time;
+        return date;
     }
 }



Mime
View raw message