Only run NewInstanceTransformer on Class references #109

Closed
Desetude wants to merge 1 commits from Desetude:fix/newinstance into master

Fixes a problem (in a 569 client) where

Constructor var0 = clazz.getDeclaredConstructor();
return var0.newInstance();

was transformed to

Constructor var0 = clazz.getDeclaredConstructor();
return var0.getDeclaredConstructor().newInstance();

This required patching javaparser to be able to resolve types in the client properly, and these changes are now upstream: https://github.com/javaparser/javaparser/pull/2675https://github.com/javaparser/javaparser/pull/2697 (the diff in that PR is quite large since the a javaparser maintainer refactored some related code in the branch).

Fixes a problem (in a 569 client) where ``` Constructor var0 = clazz.getDeclaredConstructor(); return var0.newInstance(); ``` was transformed to ``` Constructor var0 = clazz.getDeclaredConstructor(); return var0.getDeclaredConstructor().newInstance(); ``` This required patching javaparser to be able to resolve types in the client properly, and these changes are now upstream: https://github.com/javaparser/javaparser/pull/2675~~https://github.com/javaparser/javaparser/pull/2697~~ (the diff in that PR is quite large since the a javaparser maintainer refactored some related code in the branch).
Owner

cherry-picked

cherry-picked
gpe closed this pull request 4 years ago
Desetude deleted branch fix/newinstance 4 years ago
All checks were successful
continuous-integration/drone/pr Build is passing
This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
Loading…
There is no content yet.