[
https://issues.apache.org/jira/browse/SLING-12742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Konrad Windszus updated SLING-12742:
------------------------------------
Description:
Currently a log like this is exposed in case a class cannot be serialized
(despite having the marker interface Serializable) which an object of that type
is put into a {{ModifiableValueMap}}:
{code}
Caused by: java.lang.IllegalArgumentException: Value can't be stored in the
repository: <my object>
at
org.apache.sling.jcr.resource.internal.helper.JcrPropertyMapCacheEntry.failIfCannotStore(JcrPropertyMapCacheEntry.java:109)
[org.apache.sling.jcr.resource:3.3.2]
at
org.apache.sling.jcr.resource.internal.helper.JcrPropertyMapCacheEntry.<init>(JcrPropertyMapCacheEntry.java:97)
[org.apache.sling.jcr.resource:3.3.2]
at
org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:63)
[org.apache.sling.jcr.resource:3.3.2]
{code}
The underlying exception was a
{code}
java.io.NotSerializableException: java.util.Optional
{code}
which was swallowed in
https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/7d980aa423bf32b639bea5c767d1fe6ec66773b7/src/main/java/org/apache/sling/jcr/resource/internal/helper/JcrPropertyMapCacheEntry.java#L135
was:
Currently a log like this is exposed in case a class cannot be serialized
(despite having the marker interface Serializable)
{code}
Caused by: java.lang.IllegalArgumentException: Value can't be stored in the
repository: <my object>
at
org.apache.sling.jcr.resource.internal.helper.JcrPropertyMapCacheEntry.failIfCannotStore(JcrPropertyMapCacheEntry.java:109)
[org.apache.sling.jcr.resource:3.3.2]
at
org.apache.sling.jcr.resource.internal.helper.JcrPropertyMapCacheEntry.<init>(JcrPropertyMapCacheEntry.java:97)
[org.apache.sling.jcr.resource:3.3.2]
at
org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:63)
[org.apache.sling.jcr.resource:3.3.2]
{code}
The underlying exception was a
{code}
java.io.NotSerializableException: java.util.Optional
{code}
which was swallowed in
https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/7d980aa423bf32b639bea5c767d1fe6ec66773b7/src/main/java/org/apache/sling/jcr/resource/internal/helper/JcrPropertyMapCacheEntry.java#L135
> Don't swallow Serializable exceptions in
> JcrPropertyMapCacheEntry.createValue()
> -------------------------------------------------------------------------------
>
> Key: SLING-12742
> URL: https://issues.apache.org/jira/browse/SLING-12742
> Project: Sling
> Issue Type: Improvement
> Components: JCR
> Affects Versions: JCR Resource 3.3.2
> Reporter: Konrad Windszus
> Priority: Major
>
> Currently a log like this is exposed in case a class cannot be serialized
> (despite having the marker interface Serializable) which an object of that
> type is put into a {{ModifiableValueMap}}:
> {code}
> Caused by: java.lang.IllegalArgumentException: Value can't be stored in the
> repository: <my object>
> at
> org.apache.sling.jcr.resource.internal.helper.JcrPropertyMapCacheEntry.failIfCannotStore(JcrPropertyMapCacheEntry.java:109)
> [org.apache.sling.jcr.resource:3.3.2]
> at
> org.apache.sling.jcr.resource.internal.helper.JcrPropertyMapCacheEntry.<init>(JcrPropertyMapCacheEntry.java:97)
> [org.apache.sling.jcr.resource:3.3.2]
> at
> org.apache.sling.jcr.resource.internal.JcrModifiableValueMap.put(JcrModifiableValueMap.java:63)
> [org.apache.sling.jcr.resource:3.3.2]
> {code}
> The underlying exception was a
> {code}
> java.io.NotSerializableException: java.util.Optional
> {code}
> which was swallowed in
> https://github.com/apache/sling-org-apache-sling-jcr-resource/blob/7d980aa423bf32b639bea5c767d1fe6ec66773b7/src/main/java/org/apache/sling/jcr/resource/internal/helper/JcrPropertyMapCacheEntry.java#L135
--
This message was sent by Atlassian Jira
(v8.20.10#820010)