]
Diego Lovison updated ISPN-9706:
--------------------------------
Tester: Diego Lovison
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
Fix For: 9.4.2.Final, 10.0.0.Alpha1
{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}