Volodymyr Siedlecki created MYFACES-4592:
--------------------------------------------
Summary: 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
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]
It seems to me that SerializableConsumer should extend SerializedLambda rather
than Serializable?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)