Findbugs complaint in CustomColorDialog

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 8
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:
              Imported: