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

Miklos Vajna vmiklos at collabora.co.uk
Mon Apr 25 14:56:31 UTC 2016


 bean/com/sun/star/comp/beans/OOoBean.java |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e58aa27adf5cc28a8a734263e0e0b6e331b095a9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Apr 25 16:10:21 2016 +0200

    bean: fix the OfficeBean SDK example
    
    Regression from 26b4f5be815bc7c77deb3d38d23b51c9dea9fcd1 (java:use
    System.arrayCopy to copy arrays, 2015-06-09), as the old code used to handle
    the case when aArguments was null.
    
    How to reproduce:
    
    1) Source the SDK environment.
    2) cd instdir/sdk/examples/DevelopersGuide/OfficeBean/
    3) make OOoBeanViewer.run
    4) Click new document... -> Text Document -> NullPointerException
    
    Change-Id: I5521c7fd200f6c74c5f2665f2e4a99f0d6abfeeb
    Reviewed-on: https://gerrit.libreoffice.org/24366
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java
index 5d79c21..28bde3f 100644
--- a/bean/com/sun/star/comp/beans/OOoBean.java
+++ b/bean/com/sun/star/comp/beans/OOoBean.java
@@ -1349,7 +1349,8 @@ xLayoutManager.showElement("private:resource/menubar/menubar");
             new com.sun.star.beans.PropertyValue[ nNumArgs + 1 ];
 
         // copy current arguments
-        System.arraycopy(aArguments, 0, aExtendedArguments, 0, nNumArgs);
+        if (aArguments != null)
+            System.arraycopy(aArguments, 0, aExtendedArguments, 0, nNumArgs);
 
         // add new argument
         aExtendedArguments[ nNumArgs ] = aArgument;


More information about the Libreoffice-commits mailing list