Issue 127074 - Exception is created but not thrown
Summary: Exception is created but not thrown
Status: UNCONFIRMED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.1.2
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-15 08:33 UTC by AppChecker
Modified: 2016-08-15 08:33 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description AppChecker 2016-08-15 08:33:40 UTC
In file main/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java at line 347 there is a code fragment: 

 if (aWindow == null)
                new com.sun.star.lang.IllegalArgumentException(
                    "Method external_event requires that a window is passed as argument",
                    this, (short) -1);

It seems, that Exception new com.sun.star.lang.IllegalArgumentException is created but not thrown.

GitHub link: https://github.com/apache/openoffice/blob/c014b5f2b55cff8d4b0c952d5c16d62ecde09ca1/main/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java#L347

I guess it should be like:

            if (aWindow == null)
                throw  new com.sun.star.lang.IllegalArgumentException(
                    "Method external_event requires that a window is passed as argument",
                    this, (short) -1);

The possible bug was found by AppChecker static analyzer (https://npo-echelon.ru/en/solutions/appchecker.php).