Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8286270

[java.desktop] Replace color search in XColors with a switch statement

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • 17, 18, 19
    • client-libs
    • None
    • b08

      The current implementation creates ~750 new objects on load, and uses a binary array search with a Comparable implementation. This implementation is probably bad. Instead, we can use the enhanced switch feature to possibly save time, resources, and code size. The new implementation means that the array doesn't have to be sorted alphanumerically necessarily, and it creates the colors on demand.

            jwaters Julian Waters
            jwaters Julian Waters
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: