criteriaBuilder.isEmpty used within criteriaBuilder.construct throws an exception

Description

When calling criteriaBuilder.isEmpty within criteriaBuilder.construct an exception is thrown:

When

is used instead of

everything works fine.

I attach a test case.
To run it just unzip and run "gradlew test" on Windows or "./gradlew test" on Linux

Environment

None

Assignee

Unassigned

Reporter

Jarek

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major
Configure