diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-15 13:13:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-15 14:26:08 +0100 |
commit | 5baef3adfe47407a16f219760554ced678cb0842 (patch) | |
tree | 66d764e0bd0f83148553730954448ee92588d705 /xmerge | |
parent | 21c30f6e416ba25908e9633733a09ba38b8e1a2a (diff) |
coverity#1326266 Explicit null dereferenced
Change-Id: Ic6971a9006f82528a9943f8d425389545403162a
Diffstat (limited to 'xmerge')
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java index f83b43b6668b..7e970334d9b2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java @@ -65,34 +65,23 @@ public final class Driver { * @param args The argument passed on the command line. */ public static void main(String args[]) { - - // Register jarfiles - String propFile = "ConverterInfoList.properties"; - ConverterInfoList cil = null; try { - cil = new ConverterInfoList(propFile); - } catch (Exception e) { - System.out.println("\nCannot not load " + propFile + - " property file"); - } + // Register jarfiles + String propFile = "ConverterInfoList.properties"; + ConverterInfoList cil = new ConverterInfoList(propFile); - Iterator<ConverterInfo> jarInfoEnumeration; - ConverterInfoReader cir; - - Iterator<String> jarFileEnum = cil.getJarFileEnum(); - while (jarFileEnum.hasNext()) { - String jarName = jarFileEnum.next(); - try { - cir = new ConverterInfoReader(jarName, false); - jarInfoEnumeration = cir.getConverterInfoEnumeration(); - ConverterInfoMgr.addPlugIn(jarInfoEnumeration); - } catch (Exception e) { - System.out.println("\nCannot not load <" + jarName + - "> from the <" + propFile + "> property file"); + Iterator<String> jarFileEnum = cil.getJarFileEnum(); + while (jarFileEnum.hasNext()) { + String jarName = jarFileEnum.next(); + try { + ConverterInfoReader cir = new ConverterInfoReader(jarName, false); + Iterator<ConverterInfo> jarInfoEnumeration = cir.getConverterInfoEnumeration(); + ConverterInfoMgr.addPlugIn(jarInfoEnumeration); + } catch (Exception e) { + System.out.println("\nCannot not load <" + jarName + + "> from the <" + propFile + "> property file"); + } } - } - - try { Driver app = new Driver(); app.parseCommandLine(args); @@ -293,4 +282,4 @@ public final class Driver { String str = zipName.toLowerCase(); return str.endsWith("sxw") || zipName.endsWith("sxc"); } -}
\ No newline at end of file +} |