Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shape.stroke_=(v: Paint) doesn't accept null as v #241

Closed
MamoruAsagami opened this issue May 22, 2016 · 1 comment
Closed

Shape.stroke_=(v: Paint) doesn't accept null as v #241

MamoruAsagami opened this issue May 22, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@MamoruAsagami
Copy link

@MamoruAsagami MamoruAsagami commented May 22, 2016

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

@jpsacha jpsacha added this to the 8.0.*-R11 milestone May 24, 2016
@jpsacha jpsacha self-assigned this May 24, 2016
@jpsacha
Copy link
Member

@jpsacha jpsacha commented May 24, 2016

Thank for reporting this. It is fixed now. I left it to the implicit conversion to deal properly with null value.

@jpsacha jpsacha closed this May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants