NullPointerException when using CriteriaBuilder.selectCase with CriteriaBuilder.equal

Description

Sample code:

It find that CriteriaBuilder.equal will throws NullPointerException, below is the stacktrace

After checking the source code, it suspected that there is a bug in

cause the selectCase.getJavaType() always return null.

The javaType override logic of SearchedCaseExpression actually do nothing:

I think it should call AbstractTupleElement.resetJavaType instead of adjustJavaType

Environment

None

Status

Assignee

Unassigned

Reporter

raykou

Fix versions

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure