Kaydet (Commit) e58aa27a authored tarafından Miklos Vajna's avatar Miklos Vajna

bean: fix the OfficeBean SDK example

Regression from 26b4f5be (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/24366Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 21f5a271
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment