[JBoss JIRA] (ISPN-9706) SpringCache: get("key", Callable) not working with null values
by Katia Aresti (Jira)
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)
6 years, 1 month
[JBoss JIRA] (ISPN-9705) SpringCache Put null value and get(key, clazz) IllegalStateException
by Katia Aresti (Jira)
[ 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
```
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.
was:
SpringCacheTest,java
```
public void testPutNullError() {
//when//then
cache.put("key", null);
cache.get("key", String.class);
}
```
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
> ```
> 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.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9705) SpringCache Put null value and get(key, clazz) IllegalStateException
by Katia Aresti (Jira)
[ 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)
6 years, 1 month
[JBoss JIRA] (ISPN-9705) SpringCache Put null value and get(key, clazz) IllegalStateException
by Katia Aresti (Jira)
[ https://issues.jboss.org/browse/ISPN-9705?page=com.atlassian.jira.plugin.... ]
Katia Aresti updated ISPN-9705:
-------------------------------
Summary: SpringCache Put null value and get(key, clazz) IllegalStateException (was: SpringCache Put null value and get(ket, clazz) IllegalStateException)
> 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
>
> SpringCacheTest,java
> ```
> public void testPutNullError() {
> //when//then
> cache.put("key", null);
> cache.get("key", String.class);
> }
> ```
> 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.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9705) SpringCache Put null value and get(ket, clazz) IllegalStateException
by Katia Aresti (Jira)
Katia Aresti created ISPN-9705:
----------------------------------
Summary: SpringCache Put null value and get(ket, clazz) IllegalStateException
Key: ISPN-9705
URL: https://issues.jboss.org/browse/ISPN-9705
Project: Infinispan
Issue Type: Bug
Reporter: Katia Aresti
SpringCacheTest,java
```
public void testPutNullError() {
//when//then
cache.put("key", null);
cache.get("key", String.class);
}
```
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.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month
[JBoss JIRA] (ISPN-9704) REST fine grained security support
by Gustavo Fernandes (Jira)
[ https://issues.jboss.org/browse/ISPN-9704?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes updated ISPN-9704:
------------------------------------
Description:
Currently the REST server requires authentication but does not offer authorization capabilities. The new REST API described in ISPN-8535 requires that invocations on resources can be restricted on a per user/role basis.
Examples:
/GET on /rest/v2/{cacheName} should be allowed for all authenticated users
/POST on /rest/v2/{cacheName} should be restricted to users having the ADMIN role
was:
Currently the REST server requires authentication but does not offer authorization capabilities. The new REST API described in ISPN-8535 requires that invocations on resources can be restricted on a per user/role basis.
Examples:
/GET on /rest/v2/{cacheName} should be allowed for all authenticated users
/POST on /rest/v2/{cacheName} should be restricted to users having the ADMIN role
> REST fine grained security support
> ----------------------------------
>
> Key: ISPN-9704
> URL: https://issues.jboss.org/browse/ISPN-9704
> Project: Infinispan
> Issue Type: Feature Request
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Priority: Major
>
> Currently the REST server requires authentication but does not offer authorization capabilities. The new REST API described in ISPN-8535 requires that invocations on resources can be restricted on a per user/role basis.
> Examples:
> /GET on /rest/v2/{cacheName} should be allowed for all authenticated users
> /POST on /rest/v2/{cacheName} should be restricted to users having the ADMIN role
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 1 month