[infinispan-issues] [JBoss JIRA] (ISPN-9706) SpringCache: get("key", Callable) not working with null values

Katia Aresti (Jira) issues at jboss.org
Fri Nov 16 10:28:00 EST 2018


     [ https://issues.jboss.org/browse/ISPN-9706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Katia Aresti updated ISPN-9706:
-------------------------------
    Component/s: Spring Integration


> SpringCache: get("key", Callable) not working with null values
> --------------------------------------------------------------
>
>                 Key: ISPN-9706
>                 URL: https://issues.jboss.org/browse/ISPN-9706
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Spring Integration
>    Affects Versions: 9.4.1.Final
>            Reporter: Katia Aresti
>            Assignee: Katia Aresti
>            Priority: Major
>
> {code:SpringCacheTest.java}
>  @Test
>    public void testGetWithNullValue() {
>       assertNull(cache.get("null", () -> null));
>    }
> {code}
> {code}
> Caused by: java.lang.NullPointerException: Null values are not supported!
> {code}
> and
> {code:SpringCacheTest.java}
>    @Test
>    public void testGetNullValueAfterPutNull() {
>       cache.put("key", null);
>       String result = cache.get("key", () -> "notnull");
>       assertNull(result);
>    }
> {code}
> {code}
> java.lang.ClassCastException: org.infinispan.spring.provider.NullValue cannot be cast to java.lang.String
> {code}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the infinispan-issues mailing list