[
https://issues.apache.org/jira/browse/OFBIZ-13268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17985822#comment-17985822
]
ASF subversion and git services commented on OFBIZ-13268:
---------------------------------------------------------
Commit 528f419f83e81384d5ca26019a0cf92ea9e5c6e0 in ofbiz-framework's branch
refs/heads/release24.09 from Deepak Dixit
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=528f419f83 ]
Fixed: ClassCastException in EntityConditionBuilder.createNode when using
EntityFunction keys (OFBIZ-13268) (#897)
Fixed: ClassCastException in EntityConditionBuilder.createNode when
using EntityFunction keys
(OFBIZ-13268)
Updated EntityConditionBuilder to handle keys like EntityFunction
properly, avoiding ClassCastException after the JDK 17 upgrade.
> Fix ClassCastException in EntityConditionBuilder.createNode when using
> EntityFunction keys
> ------------------------------------------------------------------------------------------
>
> Key: OFBIZ-13268
> URL: https://issues.apache.org/jira/browse/OFBIZ-13268
> Project: OFBiz
> Issue Type: Bug
> Components: framework/entity
> Affects Versions: Upcoming Branch, 24.09
> Reporter: Deepak Dixit
> Assignee: Deepak Dixit
> Priority: Major
> Fix For: Upcoming Branch, 24.09.02
>
>
> After upgrading to JDK 17, a {{ClassCastException}} occurs when using key
> types such as {{EntityFunction$UPPER}} in {{EntityConditionBuilder}}
> This is due to stricter module boundaries and cast enforcement in JDK 17,
> which no longer allows implicit down casting from {{Object}} to {{String
> }}when the actual object is not a {{{}String{}}}.
>
> {code:java}
> : java.lang.ClassCastException: class
> org.apache.ofbiz.entity.condition.EntityFunction$UPPER cannot be cast to
> class java.lang.String
> (org.apache.ofbiz.entity.condition.EntityFunction$UPPER is in unnamed module
> of loader 'app'; java.lang.String is in module java.base of loader
> 'bootstrap'){code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)