]> source.dussan.org Git - sonarqube.git/commitdiff
Fix some quality flaws
authorJulien HENRY <julien.henry@sonarsource.com>
Tue, 10 Nov 2015 15:23:39 +0000 (16:23 +0100)
committerJulien HENRY <julien.henry@sonarsource.com>
Tue, 10 Nov 2015 15:23:52 +0000 (16:23 +0100)
sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java

index aa275e19b281745cd3233cbda0bea9394c853a83..c513d25f10e092895129fc9744a9f5e374a0b36d 100644 (file)
@@ -302,7 +302,7 @@ public class FileMetadata {
   }
 
   private static void read(Reader reader, CharHandler... handlers) throws IOException {
-    char c = (char) 0;
+    char c;
     int i = reader.read();
     boolean afterCR = false;
     while (i != -1) {
@@ -315,12 +315,10 @@ public class FileMetadata {
           } else if (c == LINE_FEED) {
             handler.handleAll(c);
             handler.newLine();
-            afterCR = false;
           } else {
             handler.newLine();
             handler.handleIgnoreEoL(c);
             handler.handleAll(c);
-            afterCR = false;
           }
         }
         afterCR = c == CARRIAGE_RETURN;