[
https://issues.jboss.org/browse/ISPN-9705?page=com.atlassian.jira.plugin....
]
Katia Aresti updated ISPN-9705:
-------------------------------
Description:
{code:title=SpringCacheTest,java|borderStyle=solid}
public void testPutNullError() {
//when//then
cache.put("key", null);
cache.get("key", String.class);
}
{code}
We get
{code}
java.lang.IllegalStateException: Cached value is not of required type [java.lang.String]:
org.infinispan.spring.provider.NullValue@76f7d241
{code}
JavaDoc for this method states this method does not make difference between cached null
and null value.
Note: This variant of {@code get} does not allow for differentiating
* between a cached {@code null} value and no cache entry found at all.
* Use the standard {@link #get(Object)} variant for that purpose instead.
was:
{code:title=SpringCacheTest,java|borderStyle=solid}
public void testPutNullError() {
//when//then
cache.put("key", null);
cache.get("key", String.class);
}
{code}
We get
```
java.lang.IllegalStateException: Cached value is not of required type [java.lang.String]:
org.infinispan.spring.provider.NullValue@76f7d241
```
JavaDoc for this method states this method does not make difference between cached null
and null value.
Note: This variant of {@code get} does not allow for differentiating
* between a cached {@code null} value and no cache entry found at all.
* Use the standard {@link #get(Object)} variant for that purpose instead.
SpringCache Put null value and get(key, clazz) IllegalStateException
--------------------------------------------------------------------
Key: ISPN-9705
URL:
https://issues.jboss.org/browse/ISPN-9705
Project: Infinispan
Issue Type: Bug
Reporter: Katia Aresti
Priority: Major
{code:title=SpringCacheTest,java|borderStyle=solid}
public void testPutNullError() {
//when//then
cache.put("key", null);
cache.get("key", String.class);
}
{code}
We get
{code}
java.lang.IllegalStateException: Cached value is not of required type [java.lang.String]:
org.infinispan.spring.provider.NullValue@76f7d241
{code}
JavaDoc for this method states this method does not make difference between cached null
and null value.
Note: This variant of {@code get} does not allow for differentiating
* between a cached {@code null} value and no cache entry found at all.
* Use the standard {@link #get(Object)} variant for that purpose instead.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)