sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1795065 - in /sis/data/non-free/sis-epsg: pom.xml src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java src/test/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProviderTest.java
Date Sat, 13 May 2017 14:09:51 GMT
Author: desruisseaux
Date: Sat May 13 14:09:51 2017
New Revision: 1795065

URL: http://svn.apache.org/viewvc?rev=1795065&view=rev
Log:
Change dependency from SIS 0.7 to SIS 0.8-SNAPSHOT.

Modified:
    sis/data/non-free/sis-epsg/pom.xml
    sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java
    sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProviderTest.java

Modified: sis/data/non-free/sis-epsg/pom.xml
URL: http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg/pom.xml?rev=1795065&r1=1795064&r2=1795065&view=diff
==============================================================================
--- sis/data/non-free/sis-epsg/pom.xml (original)
+++ sis/data/non-free/sis-epsg/pom.xml Sat May 13 14:09:51 2017
@@ -27,11 +27,11 @@
   <parent>
     <groupId>org.apache.sis</groupId>
     <artifactId>parent</artifactId>
-    <version>0.7</version>
+    <version>0.8-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.sis.non-free</groupId>
   <artifactId>sis-epsg</artifactId>
-  <version>0.7</version>
+  <version>0.8-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <name>EPSG dataset for Apache SIS</name>
@@ -101,7 +101,7 @@ The EPSG geodetic dataset provides defin
   </build>
 
   <!--
-    While this module declares a dependency to SIS 0.7, it can be used with 0.7-jdk6, 0.7-jdk7
or 0.7-jdk8 as well.
+    While this module declares a dependency to SIS 0.8, it can be used with 0.8-jdk6, 0.8-jdk7
or 0.8-jdk8 as well.
     It is up to the user to choose the Apache SIS version.
   -->
   <dependencies>

Modified: sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java
URL: http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java?rev=1795065&r1=1795064&r2=1795065&view=diff
==============================================================================
--- sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java
[UTF-8] (original)
+++ sis/data/non-free/sis-epsg/src/main/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProvider.java
[UTF-8] Sat May 13 14:09:51 2017
@@ -70,15 +70,13 @@ public class ScriptProvider extends Inst
         }
         final StringBuilder buffer = new StringBuilder();
         final String lineSeparator = System.getProperty("line.separator", "\n");
-        final BufferedReader in = new BufferedReader(new InputStreamReader(
-                ScriptProvider.class.getResourceAsStream(filename), "UTF-8"));
-        try {
+        try (BufferedReader in = new BufferedReader(new InputStreamReader(
+                ScriptProvider.class.getResourceAsStream(filename), "UTF-8")))
+        {
             String line;
             while ((line = in.readLine()) != null) {
                 buffer.append(line).append(lineSeparator);
             }
-        } finally {
-            in.close();
         }
         return buffer.toString();
     }

Modified: sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProviderTest.java
URL: http://svn.apache.org/viewvc/sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProviderTest.java?rev=1795065&r1=1795064&r2=1795065&view=diff
==============================================================================
--- sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProviderTest.java
[UTF-8] (original)
+++ sis/data/non-free/sis-epsg/src/test/java/org/apache/sis/referencing/factory/sql/epsg/ScriptProviderTest.java
[UTF-8] Sat May 13 14:09:51 2017
@@ -56,12 +56,9 @@ public final strictfp class ScriptProvid
         final String[] names = provider.getResourceNames("EPSG");
         assertArrayEquals(new String[] {"Prepare", "Tables.sql", "Data.sql", "FKeys.sql",
"Finish"}, names);
         for (int i=0; i<names.length; i++) {
-            final BufferedReader in = provider.openScript("EPSG", i);
-            try {
+            try (BufferedReader in = provider.openScript("EPSG", i)) {
                 // Just verify that we can read.
                 assertFalse(in.readLine().isEmpty());
-            } finally {
-                in.close();
             }
         }
     }



Mime
View raw message