You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classC {
defm() { x =null }
privatevoidsetX(x) {}
}
classDextends C /*implements Map*/ {
/* @Delegate Map m void setX(x) { } void set(String name, value) { }*/
}
new D().m()
The expression "x = null" will not make use of the private setter of C if one of the items in D is uncommented. "setX(null)" is safe or changing the visibility of setX to at least package-private or enabling static compilation for the call site prevents the interception as well. A warning could help bring awareness to this possibility.
The text was updated successfully, but these errors were encountered:
Consider the following:
The expression "x = null" will not make use of the private setter of
C
if one of the items inD
is uncommented. "setX(null)" is safe or changing the visibility ofsetX
to at least package-private or enabling static compilation for the call site prevents the interception as well. A warning could help bring awareness to this possibility.The text was updated successfully, but these errors were encountered: