Details
-
Type:
Sub-task
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.0-RC-1
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
class Foo {
String s
Foo(s)
}
def foo = new Foo() // shouldn't call Foo(s) with null!
assert foo
assert !foo.s
See http://www.nabble.com/always-default-constructor--tf2834900.html for more details.
This issue is still around
groovy> class Foo { groovy> String s groovy> Foo(s) { println "called with s='${s}'!"; this.s = s } groovy> } groovy> def foo = new Foo() groovy> assert foo groovy> assert !foo.s called with s='null'!