You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Deepak Dixit (Jira)" <ji...@apache.org> on 2025/06/23 13:54:00 UTC

[jira] [Commented] (OFBIZ-13268) Fix ClassCastException in EntityConditionBuilder.createNode when using EntityFunction keys

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

Deepak Dixit commented on OFBIZ-13268:
--------------------------------------

Here is the PR for the fix

[https://github.com/apache/ofbiz-framework/pull/897]

> 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
>
> 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)