Skip to content

Conversation

@lukaszlenart
Copy link
Member

@lukaszlenart lukaszlenart commented May 12, 2024

This PR fixes creating instances via OGNL expressions. The breaking change was introduced in #780

Closes WW-5415

@lukaszlenart lukaszlenart requested a review from kusalk May 12, 2024 07:49
// Special case: Target is a Class object but not Class.class
if (Class.class.equals(target.getClass()) && !Class.class.equals(target)) {
if (!isStatic(member)) {
if (!isStatic(member) && Arrays.stream(((Class<?>) target).getConstructors()).noneMatch(p -> p.getClass().equals(member.getClass()))) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a temporary solution to express where the problem is, @kusalk I count on your comment :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @lukaszlenart for writing the test case - I did indeed overlook the constructor case, I've pushed a commit to this PR with the appropriate fix :)

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
57.1% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@lukaszlenart lukaszlenart merged commit 40ccc74 into master May 14, 2024
@lukaszlenart lukaszlenart deleted the fix/WW-5415-constructor branch May 14, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants