Lower requirement for an extra type in constructor to Java 7- #390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Evening,
first of all thanks for the great project!
This pull request lowers the requirement for an extra
javaassist.runtime.Inner
type in the target constructor when calling a private constructor from an inner class. This check was introduced in #253 and makes no sense considering that the constructor invocation still works on older jvms like 8. (tested against jvm versionsHotSpot 1.8.0_241-b07
,HotSpot 11.0.6+8-LTS
andHotSpot 18-ea+12-613
).The test setup was as follows:
The generated class looked like this before the change:
And like this after the change:
The code after the change works as expected allowing me to call the private Constructor from the inner class while the code before the change obviously doesn't as there is no constructor with the
String, Inner
signatureI was unable to test this on older jvm versions than 8 so i lowered the check to 8.