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

ASF subversion and git services commented on OFBIZ-13268:
---------------------------------------------------------

Commit 19d82f640b556a41b34532f0d282271dce9b64f8 in ofbiz-framework's branch 
refs/heads/release24.09 from Deepak Dixit
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=19d82f640b ]

Fixed:  ClassCastException in EntityConditionBuilder.createNode when using 
EntityFunction keys (OFBIZ-13268)
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.

manually cherry picked from commit 7c098dbd5431c7e079ba227581de0fb1c691aca2


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

Reply via email to