Apache OpenOffice (AOO) Bugzilla – Issue 109942
scripting: FindBugs Warning
Last modified: 2017-05-20 10:47:34 UTC
Dear all, We are conducting an study about the relevance of the warnings reported by the FindBugs tool when executed over several open-source systems. Particularly, in the case of OpenOffice, we would like to confirm the relevance of the following warning reported by the tool (for OpenOffice 2.4.0): Package: com.sun.star.script.framework.provider.javascript.ScriptEditorForJavaScript Method: edit Line: 22 Warning: Possible null pointer dereference. There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a NullPointerException when the code is executed. Since this warning seemed relevant to us, we would like to confirm our classification with OpenOffice's developers. Best regards, Marco Tulio Valente Brazil
Can this tool be run on a more recent build? 2.4.0 is pretty old and outdated.
Matthias, AFAIK you looking into such things anyway, so please take over :-)
Confirming issue, the control flow in method "edit()" <quote> if (rhinoWindow != null) { ... rhinoWindow.showScriptWindow(...); ... } else { ... } rhinoWindow.toFront(); <=== </quote> leads to the assumption of a possible Null Pointer dereference. On the other hand, "rhinoWindow" is a static (i.e. class) member, and may be constructed through the side effect of constructing another instance during the above control flow. Changing issue type from "patch" to "defect", as there is no patch attached.
Hi Andreas, can you please have a look at this issue ? IMHO, this code should be reworked to be understandable without need to follow all side effects (in particular, FindBugs should be able to understand it). Thanks, Matthias
STARTED, OOo 3.x
Reset assigne to the default "issues@openoffice.apache.org".