ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-1863) IgniteAtomicReference.compareAndSet does not work for nulls
Date Thu, 05 Nov 2015 14:58:27 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-1863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14991763#comment-14991763
] 

ASF GitHub Bot commented on IGNITE-1863:
----------------------------------------

GitHub user ashutakGG opened a pull request:

    https://github.com/apache/ignite/pull/206

    IGNITE-1863: Fix IgniteAtomicReference.compareAndSet for nulls

    IGNITE-1863: Fix IgniteAtomicReference.compareAndSet for nulls
    
    https://issues.apache.org/jira/browse/IGNITE-1863

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ashutakGG/incubator-ignite ignite-1863-atom-ref

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/206.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #206
    
----
commit 1c8c0fb6bf87e6f624501e6c6ada1d638f94bf5b
Author: ashutak <ashutak@gridgain.com>
Date:   2015-11-05T14:55:55Z

    ignite-1863: Fix IgniteAtomicReference.compareAndSet for nulls

----


> IgniteAtomicReference.compareAndSet does not work for nulls
> -----------------------------------------------------------
>
>                 Key: IGNITE-1863
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1863
>             Project: Ignite
>          Issue Type: Bug
>          Components: data structures
>    Affects Versions: 1.5
>            Reporter: Pavel  Tupitsyn
>            Assignee: Artem Shutak
>             Fix For: 1.5
>
>
> IgniteAtomicReference allows null as a value, but when current value is null, compareAndSet
does not work:
> {code}
>         IgniteAtomicReference<String> atomic = ignite.atomicReference(atomicName,
null, true);
>         assertEquals(null, atomic.get());
>         boolean res = atomic.compareAndSet(null, "x");
>         assertTrue(res);                    // fail
>         assertEquals("x", atomic.get());    // fail
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message