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

Katia Aresti (Jira) issues at jboss.org
Mon Nov 12 07:55:00 EST 2018


Katia Aresti created ISPN-9706:
----------------------------------

             Summary: 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
            Reporter: Katia Aresti


{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