You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/07/24 08:49:04 UTC
[jira] [Updated] (GROOVY-6958) null != NullObject when using
Categories
[ https://issues.apache.org/jira/browse/GROOVY-6958?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jochen Kemnade updated GROOVY-6958:
-----------------------------------
Affects Version/s: 2.4.4
> null != NullObject when using Categories
> ----------------------------------------
>
> Key: GROOVY-6958
> URL: https://issues.apache.org/jira/browse/GROOVY-6958
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.3.4, 2.4.0-rc-2, 2.4.1, 2.4.4, 2.5.0-beta-1
> Reporter: Jochen Kemnade
> Priority: Minor
>
> {code}
> def val = null
> class Helper {
>
> static boolean isNull(value) {
> value == null
> }
>
> }
> use(Helper){
> assert val == null
> assert val.isNull()
> }
> {code}
> The last assertion fails because value isnt {{null}} but a {{NullObject}} and inside the {{isNull}} method, those are apparently not equal.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)