qadevOOo/runner/helper/APIDescGetter.java |   29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

New commits:
commit 226285b7ccc0c6880ae1005c9f0d9f47aa41fc29
Author: Noel Grandin <n...@peralex.com>
Date:   Thu Oct 30 10:47:32 2014 +0200

    java: calling ready() on a BufferedReader is a dodgy way..
    
    ..to detect end-of-file
    
    Change-Id: I3b1d5eca3a7424d72b5e3ab741f7407ad7e65193

diff --git a/qadevOOo/runner/helper/APIDescGetter.java 
b/qadevOOo/runner/helper/APIDescGetter.java
index 71c8981..2df8cea 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -589,26 +589,21 @@ public class APIDescGetter extends DescGetter
             {
                 InputStream in = con.getInputStream();
                 java.io.BufferedReader buf = new java.io.BufferedReader(new 
InputStreamReader(in));
-                boolean found = false;
-
-                while (buf.ready() && !found)
+                while (true)
                 {
                     String entry = buf.readLine();
-
-                    if (entry != null)
+                    if (entry == null)
+                        break;
+                    if (entry.endsWith(sEndsWithCSVName))
                     {
-                        if (entry.endsWith(sEndsWithCSVName))
-                        {
-                            System.out.println("FOUND  ####");
-                            InputStream input =
-                                this.getClass().getResourceAsStream("/objdsc/" 
+
-                                    module +
-                                    "/" +
-                                    entry);
-                            csvFile =
-                                new BufferedReader(new 
InputStreamReader(input));
-                            found = true;
-                        }
+                        System.out.println("FOUND  ####");
+                        InputStream input =
+                            this.getClass().getResourceAsStream("/objdsc/" +
+                                module +
+                                "/" +
+                                entry);
+                        csvFile = new BufferedReader(new 
InputStreamReader(input));
+                        break;
                     }
                 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to