[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - reportbuilder/java

Stephan Bergmann sbergman at redhat.com
Wed Jan 21 08:45:49 PST 2015


 reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d5ff2e409d450d53ab0bed7cdc3de18841c5c7fb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jan 21 17:22:57 2015 +0100

    Related fdo#85190: Don't dress arbitrary Java Throwables as UNO Any values
    
    Regression introduced with 9341bf3dc38b2cc117ffbe12ff057511ed6e046d "java: when
    rethrowing, store the original exception," but these two appear to be the only
    two cases related to com.sun.star.lang.WrappedTarget[Runtime]Exception in that
    patch that would now create bad UNO Any values.  Happily reverted to the
    original but oddly inconsistent setting of the WrappedTargetException's
    TargetException member...
    
    Change-Id: I9421da721d5a111d0d89ee0601238a2c01cfc12c
    (cherry picked from commit 01fb1701c8a59dd023604492a117ea1a6cffcee9)
    Reviewed-on: https://gerrit.libreoffice.org/14089
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java
index f6d7147..68b1b17 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java
@@ -216,12 +216,12 @@ public class SOReportJobFactory
             catch (java.lang.Exception e)
             {
                 LOGGER.error("ReportProcessing failed", e);
-                throw new com.sun.star.lang.WrappedTargetException(e.getMessage(), this, e);
+                throw new com.sun.star.lang.WrappedTargetException(e, e.getMessage(), this, null);
             }
             catch (java.lang.IncompatibleClassChangeError e2)
             {
                 LOGGER.error("Detected an IncompatibleClassChangeError");
-                throw new com.sun.star.lang.WrappedTargetException("caught a " + e2.getClass().getName(), this, e2);
+                throw new com.sun.star.lang.WrappedTargetException(e2, "caught a " + e2.getClass().getName(), this, new com.sun.star.uno.Exception(e2.getLocalizedMessage()));
             }
             Thread.currentThread().setContextClassLoader(cl);
 


More information about the Libreoffice-commits mailing list