[
https://issues.apache.org/jira/browse/PDFBOX-5703?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr resolved PDFBOX-5703.
-------------------------------------
Fix Version/s: 2.0.30
3.0.1 PDFBox
4.0.0
Assignee: Tilman Hausherr
Resolution: Fixed
Thanks, done.
> use comparison operators for enums
> ----------------------------------
>
> Key: PDFBOX-5703
> URL: https://issues.apache.org/jira/browse/PDFBOX-5703
> Project: PDFBox
> Issue Type: Improvement
> Affects Versions: 3.0.0 PDFBox
> Reporter: Axel Howind
> Assignee: Tilman Hausherr
> Priority: Minor
> Labels: patch
> Fix For: 2.0.30, 3.0.1 PDFBox, 4.0.0
>
> Attachments: use_comparison_operator_for_enums.patch
>
>
> PDFBox code base in some places uses equals() to test for enum equality. This
> is unnecessary since enum values are guaranteed to be unique. This patch
> replaces calls to equals() with comparison operators, which IMHO makes the
> code easier to read. Comparison using == / != is null safe too, so there
> should nothing to worry about.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]