[Libreoffice-commits] core.git: wizards/com

Caolán McNamara caolanm at redhat.com
Wed Jan 20 03:00:18 PST 2016


 wizards/com/sun/star/wizards/common/Configuration.java |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 24bfa15bd3d169022dafba177da29e49241892e8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 20 10:59:34 2016 +0000

    coverity#1326466 Dereference null return value
    
    Change-Id: Iea0dc27bf32499e1f8b38d8a0e90cebe6ab8b31f

diff --git a/wizards/com/sun/star/wizards/common/Configuration.java b/wizards/com/sun/star/wizards/common/Configuration.java
index c69d029..3fcef49 100644
--- a/wizards/com/sun/star/wizards/common/Configuration.java
+++ b/wizards/com/sun/star/wizards/common/Configuration.java
@@ -153,19 +153,11 @@ public abstract class Configuration
         }
     }
 
-    public static XNameAccess getChildNodebyIndex(XNameAccess _xNameAccess, int _index)
+    public static XNameAccess getChildNodebyIndex(XNameAccess _xNameAccess, int _index) throws com.sun.star.uno.Exception
     {
-        try
-        {
-            String[] snames = _xNameAccess.getElementNames();
-            Object oNode = _xNameAccess.getByName(snames[_index]);
-            return UnoRuntime.queryInterface(XNameAccess.class, oNode);
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace(System.err);
-            return null;
-        }
+        String[] snames = _xNameAccess.getElementNames();
+        Object oNode = _xNameAccess.getByName(snames[_index]);
+        return UnoRuntime.queryInterface(XNameAccess.class, oNode);
     }
 
     public static XNameAccess getChildNodebyName(XNameAccess _xNameAccessNode, String _SubNodeName)


More information about the Libreoffice-commits mailing list