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

[ColorPicker] control can be broken by typing big numbers in integer field.

XMLWordPrintable

      In custom color chosing popup put cursor into any integer field. type 888. I see exception:

      java.lang.IllegalArgumentException: Color.rgb's red parameter (888) expects color values 0-255
      at javafx.scene.paint.Color.checkRGB(Color.java:217)
      at javafx.scene.paint.Color.rgb(Color.java:151)
      at com.sun.javafx.scene.control.skin.CustomColorDialog$ColorRectPane.updateRGBColor(CustomColorDialog.java:235)
      at com.sun.javafx.scene.control.skin.CustomColorDialog$ColorRectPane.access$300(CustomColorDialog.java:150)
      at com.sun.javafx.scene.control.skin.CustomColorDialog$ColorRectPane$4.invalidated(CustomColorDialog.java:189)
      at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:129)
      at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:163)
      at com.sun.javafx.binding.BidirectionalBinding$BidirectionalIntegerBinding.changed(BidirectionalBinding.java:368)
      at com.sun.javafx.binding.BidirectionalBinding$BidirectionalIntegerBinding.changed(BidirectionalBinding.java:331)
      at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:367)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:100)
      at javafx.beans.property.IntegerPropertyBase.fireValueChangedEvent(IntegerPropertyBase.java:123)
      at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:130)
      at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:163)
      at com.sun.javafx.scene.control.skin.IntegerField.setValue(IntegerField.java:16)
      at com.sun.javafx.scene.control.skin.IntegerFieldSkin.updateValue(IntegerFieldSkin.java:75)
      at com.sun.javafx.scene.control.skin.InputFieldSkin$3.invalidated(InputFieldSkin.java:90)
      at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:359)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:100)
      at javafx.scene.control.TextInputControl$TextProperty.fireValueChangedEvent(TextInputControl.java:1031)
      at javafx.scene.control.TextInputControl$TextProperty.markInvalid(TextInputControl.java:1035)
      at javafx.scene.control.TextInputControl$TextProperty.invalidate(TextInputControl.java:975)
      at javafx.scene.control.TextInputControl$TextProperty.access$200(TextInputControl.java:947)
      at javafx.scene.control.TextInputControl$1.invalidated(TextInputControl.java:118)
      at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:155)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:100)
      at javafx.scene.control.TextField$TextFieldContent.insert(TextField.java:79)
      at javafx.scene.control.TextInputControl.replaceText(TextInputControl.java:370)
      at com.sun.javafx.scene.control.skin.InputFieldSkin$1.replaceText(InputFieldSkin.java:53)
      at com.sun.javafx.scene.control.skin.TextFieldSkin.replaceText(TextFieldSkin.java:498)
      at com.sun.javafx.scene.control.behavior.TextFieldBehavior.replaceText(TextFieldBehavior.java:142)
      at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.defaultKeyTyped(TextInputControlBehavior.java:213)
      at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callAction(TextInputControlBehavior.java:129)
      at com.sun.javafx.scene.control.behavior.BehaviorBase.callActionForEvent(BehaviorBase.java:157)
      at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.callActionForEvent(TextInputControlBehavior.java:117)
      at com.sun.javafx.scene.control.behavior.BehaviorBase$1.handle(BehaviorBase.java:121)
      at com.sun.javafx.scene.control.behavior.BehaviorBase$1.handle(BehaviorBase.java:119)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:64)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
      at javafx.event.Event.fireEvent(Event.java:171)
      at javafx.scene.Scene$KeyHandler.process(Scene.java:3303)
      at javafx.scene.Scene$KeyHandler.access$1900(Scene.java:3226)
      at javafx.scene.Scene.impl_processKeyEvent(Scene.java:1643)
      at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2047)
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:126)
      at com.sun.glass.ui.View.handleKeyEvent(View.java:509)
      at com.sun.glass.ui.View.notifyKey(View.java:941)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
      at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
      at java.lang.Thread.run(Thread.java:722)

            psomashe Parvathi Somashekar (Inactive)
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: