[
https://issues.apache.org/jira/browse/MYFACES-4592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17698089#comment-17698089
]
Volodymyr Siedlecki commented on MYFACES-4592:
----------------------------------------------
Do we need to be explicit and cast these as serializable?
[https://github.com/apache/myfaces/blob/6090f15d204901a9f920aae163d5d0d522f6de52/impl/src/main/java/org/apache/myfaces/cdi/clientwindow/ClientWindowScopeContextualStorageHolder.java#L55]
I'm not very familiar with lambda and what's causing this exception. I was to
say it's a MyFaces problem, and not one with our session persistence code?
> Lambda ClassCastException with Session Persistence
> --------------------------------------------------
>
> Key: MYFACES-4592
> URL: https://issues.apache.org/jira/browse/MYFACES-4592
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 4.0.0
> Reporter: Volodymyr Siedlecki
> Priority: Major
>
> In our setup, we have session persistence enabled, and we've discovered the
> following problem:
> Stack Dump = java.lang.ClassCastException: cannot assign instance of
> java.lang.invoke.SerializedLambda to field
> org.apache.myfaces.util.lang.LRULinkedHashMap.expiredCallback of type
> org.apache.myfaces.util.lang.SerializableConsumer in instance of
> org.apache.myfaces.util.l
> ang.LRULinkedHashMap
> SerializedLambda JavaDoc:
> [https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/invoke/SerializedLambda.html]
>
> Relevant Code:
> [https://github.com/apache/myfaces/blob/myfaces-core-module-4.0.0/impl/src/main/java/org/apache/myfaces/util/lang/SerializableConsumer.java#L25]
> [https://github.com/apache/myfaces/blob/myfaces-core-module-4.0.0/impl/src/main/java/org/apache/myfaces/util/lang/LRULinkedHashMap.java#L30]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)