[ 
https://issues.apache.org/jira/browse/SLING-12742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17953366#comment-17953366
 ] 

Angela Schreiber edited comment on SLING-12742 at 5/22/25 8:25 AM:
-------------------------------------------------------------------

[~cziegeler], i am opening this ticket based on your comments. we should not 
have breaking or backwards incompatible changes.

on a related note: i wonder why the PR got merged when none of the invited 
reviewers approved it.... maybe we should all pay more attention to 
review-requests to swiftly get to a solution and unblock those contributing. 
wdyt?


was (Author: anchela):
[~cziegeler], i am opening this ticket based on your comments. we should not 
have breaking or backwards incompatible changes.

> Don't swallow java.io.NotSerializableException 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
>            Assignee: Konrad Windszus
>            Priority: Major
>             Fix For: JCR Resource 3.3.4
>
>
> Currently a log like this is exposed in case a class cannot be serialized 
> (despite having the marker interface Serializable) when 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)

Reply via email to