[ 
https://issues.apache.org/jira/browse/PDFBOX-5703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17778387#comment-17778387
 ] 

ASF subversion and git services commented on PDFBOX-5703:
---------------------------------------------------------

Commit 1913207 from Tilman Hausherr in branch 'pdfbox/branches/3.0'
[ https://svn.apache.org/r1913207 ]

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]

Reply via email to