Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5703

use comparison operators for enums

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.0 PDFBox
    • 2.0.30, 3.0.1 PDFBox, 4.0.0
    • None
    • Patch

    Description

      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.

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            axh Axel Howind
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: