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: Bug fix: read character set if not empty.
Date Fri, 10 Jan 2020 19:07:10 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 b961b32  Bug fix: read character set if not empty.
b961b32 is described below

commit b961b322ec974ba7c2333c12d1ef590e109d3c63
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Fri Jan 10 20:06:21 2020 +0100

    Bug fix: read character set if not empty.
---
 .../src/main/java/org/apache/sis/storage/shapefile/cpg/CpgFiles.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/cpg/CpgFiles.java
b/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/cpg/CpgFiles.java
index 5dfec95..a448e59 100644
--- a/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/cpg/CpgFiles.java
+++ b/storage/sis-shapefile/src/main/java/org/apache/sis/storage/shapefile/cpg/CpgFiles.java
@@ -56,7 +56,7 @@ public final class CpgFiles extends Static {
         try (BufferedReader reader = new BufferedReader(new InputStreamReader(Channels.newInputStream(in),
StandardCharsets.UTF_8))) {
             String line;
             while ((line = reader.readLine()) != null) {
-                if ((line = line.trim()).isEmpty()) {
+                if (!(line = line.trim()).isEmpty()) {
                     return Charset.forName(line);
                 }
             }
@@ -67,7 +67,7 @@ public final class CpgFiles extends Static {
     /**
      * Writes the character set to given file.
      *
-     * @param  cs    charset to write.
+     * @param  cs    character set to write.
      * @param  file  output file.
      * @throws IOException if an error occurred while writing the file.
      */


Mime
View raw message