Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.5, 1.8-beta-2
-
None
Description
def theNull = NullObject.getNullObject() assert theNull // first paradox assert theNull instanceof NullObject assert theNull.equals(null) assert theNull != null // second paradox assert null.getClass() == NullObject assert !(null instanceof NullObject) // third paradox
I have bumped into this paradox after debugging the following script:
new File('inexestent-folder/').listFiles().with { files -> assert files assert files in NullObject println "This shouldn't happen" }
Attachments
Issue Links
- relates to
-
GROOVY-11196 ambiguous method error for tap on null receiver
- Closed