Skip to content

Commit f95a2e0

Browse files
authored
More examples for -AresourceLeakIgnoredExceptions (#7774)
1 parent 79948a2 commit f95a2e0

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

docs/manual/resource-leak-checker.tex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,20 +575,22 @@
575575
\<-AresourceLeakIgnoredExceptions=...>. The option takes a comma-separated list of
576576
fully-qualified exception types. A type can be prefixed with \<=> to ignore exactly
577577
that type and not its subclasses. For example, for a very pedantic set of ignored
578-
exceptions use:
578+
exceptions use either of these, which have identical effect:
579579

580580
\begin{verbatim}
581-
-AresourceLeakIgnoredExceptions=java.lang.Error, =java.lang.NullPointerException
581+
-AresourceLeakIgnoredExceptions="java.lang.Error,=java.lang.NullPointerException"
582+
-AresourceLeakIgnoredExceptions="=java.lang.NullPointerException,java.lang.Error"
582583
\end{verbatim}
583584

584585
which ignores \<java.lang.Error> (and all its subclasses) as well as
585586
\<java.lang.NullPointerException> (but not its subclasses).
586587

587588
The keyword \<default> will expand to the default set of ignored exceptions. So,
588-
to add an additional exception to the set of ignored exceptions, use:
589+
to add an additional exception to the set of ignored exceptions, use one of these:
589590

590591
\begin{verbatim}
591-
-AresourceLeakIgnoredExceptions=default,package.MyCustomException
592+
-AresourceLeakIgnoredExceptions="default,package.MyCustomException"
593+
-AresourceLeakIgnoredExceptions="default,=package.MyCustomException"
592594
\end{verbatim}
593595

594596
\sectionAndLabel{Errors about field initialization}{resource-leak-field-initialization}

0 commit comments

Comments
 (0)