sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1772890 [2/2] - in /sis/branches/JDK8: core/sis-metadata/src/main/java/org/apache/sis/io/wkt/ core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ core/sis-referencing/src/main/java/org/apache/sis/referencing/ c...
Date Tue, 06 Dec 2016 13:27:06 GMT
Modified: sis/branches/JDK8/storage/sis-geotiff/src/test/java/org/apache/sis/test/suite/GeoTiffTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-geotiff/src/test/java/org/apache/sis/test/suite/GeoTiffTestSuite.java?rev=1772890&r1=1772889&r2=1772890&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-geotiff/src/test/java/org/apache/sis/test/suite/GeoTiffTestSuite.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-geotiff/src/test/java/org/apache/sis/test/suite/GeoTiffTestSuite.java
[UTF-8] Tue Dec  6 13:27:05 2016
@@ -32,6 +32,7 @@ import org.junit.BeforeClass;
 @Suite.SuiteClasses({
     org.apache.sis.storage.geotiff.TypeTest.class,
     org.apache.sis.storage.geotiff.CompressionTest.class,
+    org.apache.sis.storage.geotiff.GeoKeysTest.class,
     org.apache.sis.storage.geotiff.CRSBuilderTest.class
 })
 public final strictfp class GeoTiffTestSuite extends TestSuite {

Modified: sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java?rev=1772890&r1=1772889&r2=1772890&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java
[UTF-8] Tue Dec  6 13:27:05 2016
@@ -855,19 +855,6 @@ public class MetadataBuilder {
     }
 
     /**
-     * Returns {@code true} if a title has been specified for the current identification
information.
-     * This method is provided because titles are mandatory in ISO 19115 metadata, so data
stores may
-     * want to provide a fallback if no title has been found. Titles are specified by calls
to
-     * {@link #addTitle(CharSequence)} and needs to be specified again if {@link #newIdentification()}
-     * has been invoked.
-     *
-     * @return whether a title exists for the current identification information.
-     */
-    public final boolean hasTitle() {
-        return (citation != null) && citation.getTitle() != null;
-    }
-
-    /**
      * Adds a title or alternate title of the resource.
      * Storage location is:
      *
@@ -1082,8 +1069,9 @@ parse:      for (int i = 0; i < length;)
                     }
                     /*
                      * If a copyright notice is followed by digits, assume that those digits
are the copyright year.
-                     * We require the year to be surrounded by punctuations in order to reduce
the risk of confusion
-                     * with postal addresses. So this block should accept "John, 1992." but
not "1992 Nowhere road".
+                     * We require the year is followed by punctuations or non-breaking space
in order to reduce the
+                     * risk of confusion with postal addresses. So this block should accept
"John, 1992." but not
+                     * "1992-1 Nowhere road".
                      */
                     if (isCopyright && wasPunctuation && year == 0 &&
c >= '0' && c <= '9') {
                         int endOfDigits = i + n;            // After the last digit in sequence.
@@ -1094,7 +1082,7 @@ parse:      for (int i = 0; i < length;)
                         }
                         // Verify if the digits are followed by a punctuation.
                         final int endOfToken = CharSequences.skipLeadingWhitespaces(notice,
endOfDigits, length);
-                        if (endOfToken >= length || isSpaceOrPunctuation(notice.codePointAt(endOfToken)))
try {
+                        if (endOfToken > endOfDigits || isSpaceOrPunctuation(notice.codePointAt(endOfToken)))
try {
                             year = Integer.parseInt(notice.substring(i, endOfDigits));
                             if (year >= 1800 && year <= 9999) {           
         // Those limits are arbitrary.
                                 skipNextChars = true;

Modified: sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/MetadataBuilderTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/MetadataBuilderTest.java?rev=1772890&r1=1772889&r2=1772890&view=diff
==============================================================================
--- sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/MetadataBuilderTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/MetadataBuilderTest.java
[UTF-8] Tue Dec  6 13:27:05 2016
@@ -60,6 +60,7 @@ public final strictfp class MetadataBuil
     public void testParseLegalNotice() {
         verifyCopyrightParsing("Copyright (C), John Smith, 1992. All rights reserved.");
         verifyCopyrightParsing("(C) 1992, John Smith. All rights reserved.");
+        verifyCopyrightParsing("(C) COPYRIGHT 1992 John Smith.");
     }
 
     /**



Mime
View raw message