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

Findbugs complaint in CustomColorDialog

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8
    • javafx

      Original code (1) that caused findbugs complaint RT-24375 is still in the repo. There was an attempt to fix it (2) which caused regression RT-27731.

      (1) return new Double(value*255).intValue();

      (2) return (int)value * 255;

      The fix was not correct as (int)value evaluates first to 0 or 1 which results in 0 or 255 instead of any number from 0 to 255.

      Also both formulas doesn't use rounding which seems to be appropriate for this conversion.

            psomashe Parvathi Somashekar (Inactive)
            mrkam Alexander Kuznetcov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: