From 1e7382cb45759908cd3d639c839dcd5633dbadd1 Mon Sep 17 00:00:00 2001 From: Robert Antoni Buj i Gelonch Date: Wed, 29 Oct 2014 16:48:00 +0100 Subject: runner: Dereference of the result of readLine() without nullcheck Change-Id: I3d02436446a79137ce42b1a190c9e3985fbb9246 Reviewed-on: https://gerrit.libreoffice.org/12135 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- qadevOOo/runner/helper/APIDescGetter.java | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'qadevOOo') diff --git a/qadevOOo/runner/helper/APIDescGetter.java b/qadevOOo/runner/helper/APIDescGetter.java index 4171dc231e2b..71c8981c84e4 100644 --- a/qadevOOo/runner/helper/APIDescGetter.java +++ b/qadevOOo/runner/helper/APIDescGetter.java @@ -595,16 +595,20 @@ public class APIDescGetter extends DescGetter { String entry = buf.readLine(); - if (entry.endsWith(sEndsWithCSVName)) + if (entry != null) { - System.out.println("FOUND ####"); - InputStream input = this.getClass().getResourceAsStream("/objdsc/" + - module + - "/" + - entry); - csvFile = new BufferedReader( - new InputStreamReader(input)); - found = true; + if (entry.endsWith(sEndsWithCSVName)) + { + System.out.println("FOUND ####"); + InputStream input = + this.getClass().getResourceAsStream("/objdsc/" + + module + + "/" + + entry); + csvFile = + new BufferedReader(new InputStreamReader(input)); + found = true; + } } } -- cgit