https://bz.apache.org/ooo/show_bug.cgi?id=127074

          Issue ID: 127074
        Issue Type: DEFECT
           Summary: Exception is created but not thrown
           Product: General
           Version: 4.1.2
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P5 (lowest)
         Component: code
          Assignee: issues@openoffice.apache.org
          Reporter: appchec...@cnpo.ru

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

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to