stroke's initial default value is null to mean no stroke.
But, Shape.stroke = null gets null pointer exception at scalafx.scene.shape.Shape.stroke_$eq(Shape.scala:129).
The Shape.stroke_= has the following code.
127 def stroke_=(v: Paint) {
128 println(s"stroke_=(${v})")
129 stroke() = v.delegate
130 }
But, line 129 should be as follows to accept null.
129 stroke() = if(v != null) v.delegate else null
stroke's initial default value is null to mean no stroke.
But, Shape.stroke = null gets null pointer exception at scalafx.scene.shape.Shape.stroke_$eq(Shape.scala:129).
The Shape.stroke_= has the following code.
127 def stroke_=(v: Paint) {
128 println(s"stroke_=(${v})")
129 stroke() = v.delegate
130 }
But, line 129 should be as follows to accept null.
129 stroke() = if(v != null) v.delegate else null