Issue 127074

Summary: Exception is created but not thrown
Product: General Reporter: AppChecker <appchecker>
Component: codeAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Normal    
Priority: P5 (lowest)    
Version: 4.1.2   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

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).