[Libreoffice-commits] core.git: qadevOOo/runner qadevOOo/tests xmerge/source

jan iversen jani at documentfoundation.org
Fri Jan 29 02:05:14 PST 2016


 qadevOOo/runner/graphical/FileHelper.java                                                        |    2 +
 qadevOOo/tests/java/ifc/i18n/_XCalendar.java                                                     |   11 +++++-----
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java |    4 +--
 3 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 3c28a0e3864edc2812a02dec2f80f09d6cf2bc73
Author: jan iversen <jani at documentfoundation.org>
Date:   Mon Jan 25 11:28:50 2016 +0100

    cid#1326280, 1326295, 1326303
    
    null pointer dereference, made test
    
    Change-Id: I2bd820a2eb04499ab3b518d5b5e5ccccf3ffe531
    Reviewed-on: https://gerrit.libreoffice.org/21771
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: jan iversen <jani at documentfoundation.org>

diff --git a/qadevOOo/runner/graphical/FileHelper.java b/qadevOOo/runner/graphical/FileHelper.java
index 88d4042..05acb5e 100644
--- a/qadevOOo/runner/graphical/FileHelper.java
+++ b/qadevOOo/runner/graphical/FileHelper.java
@@ -44,6 +44,8 @@ public class FileHelper
         String fs = System.getProperty("file.separator");
         if (! fs.equals("/"))
         {
+            if (sSystemFile == null)
+               throw new IllegalStateException("sSystemFile is unexpected null");
             sSystemFile = sSystemFile.replace ('/', fs.toCharArray ()[0]);
         }
 // FEATURE FOR UNC NEED!!!
diff --git a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java b/qadevOOo/tests/java/ifc/i18n/_XCalendar.java
index e04595a..129339b 100644
--- a/qadevOOo/tests/java/ifc/i18n/_XCalendar.java
+++ b/qadevOOo/tests/java/ifc/i18n/_XCalendar.java
@@ -76,15 +76,16 @@ public class _XCalendar extends MultiMethodTest {
                 XLocaleData.class,
                     tParam.getMSF().createInstance(
                     "com.sun.star.i18n.LocaleData"));
+
+            installed_locales = locData.getAllInstalledLocaleNames();
+            calendars = new String[installed_locales.length][];
+            count = new int[installed_locales.length];
+            oObj.loadDefaultCalendar(installed_locales[0]);
         } catch (com.sun.star.uno.Exception e) {
 
         }
-        installed_locales = locData.getAllInstalledLocaleNames();
-        calendars = new String[installed_locales.length][];
-        count = new int[installed_locales.length];
-        oObj.loadDefaultCalendar(installed_locales[0]);
-        aOriginalDTime = oObj.getDateTime();
 
+        aOriginalDTime = oObj.getDateTime();
         debug = tParam.getBool("DebugIsActive");
     }
 
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
index ed7012d..a7b5463 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java
@@ -88,8 +88,8 @@ public final class DocumentDeserializerImpl
         while (enumerate.hasNext()) {
             docOut = (DOMDocument) enumerate.next();
         }
-        domDoc = docOut.getContentDOM();
         try {
+            domDoc = docOut.getContentDOM();
             baos = transform(domDoc);
             sxwDoc.initContentDOM();
             DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance();
@@ -184,4 +184,4 @@ public final class DocumentDeserializerImpl
 
         Debug.log(Debug.TRACE, str);
     }
-}
\ No newline at end of file
+}


More information about the Libreoffice-commits mailing list