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

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

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: