Issue 109942 - scripting: FindBugs Warning
Summary: scripting: FindBugs Warning
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: OOo 2.4.0
Hardware: Unknown All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Reported: 2010-03-08 16:16 UTC by mtov
Modified: 2017-05-20 10:47 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Note You need to log in before you can comment on or make changes to this issue.
Description mtov 2010-03-08 16:16: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):

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
Comment 1 Olaf Felka 2010-03-08 16:33:46 UTC
Can this tool be run on a more recent build? 2.4.0 is pretty old and outdated.
Comment 2 kay.ramme 2010-03-09 11:51:22 UTC
Matthias, AFAIK you looking into such things anyway, so please take over :-)
Comment 3 matthias.huetsch 2010-04-06 09:23:28 UTC
Confirming issue, the control flow in method "edit()"

if (rhinoWindow != null)
rhinoWindow.toFront(); <===

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.

Comment 4 matthias.huetsch 2010-04-06 09:26:09 UTC
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).

Comment 5 ab 2010-06-03 11:51:17 UTC
Comment 6 Marcus 2017-05-20 10:47:34 UTC
Reset assigne to the default "".