[
https://issues.apache.org/jira/browse/PDFBOX-5703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17778370#comment-17778370
]
ASF subversion and git services commented on PDFBOX-5703:
---------------------------------------------------------
Commit 1913203 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1913203 ]
PDFBOX-5703: use comparison operators for enums, as suggested by Axel Howind
> 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
> Priority: Minor
> Labels: patch
> 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]