Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restored Deencapsulation and its related classes. #157

Merged
merged 6 commits into from
Dec 2, 2023

Conversation

yukkes
Copy link

@yukkes yukkes commented Nov 29, 2023

The Deencapsulation class has been restored.
Added DeencapsulationTest class and have verified that all tests PASS.

[INFO] Results:
[WARNING] Tests run: 1047, Failures: 0, Errors: 0, Skipped: 10

@hazendaz hazendaz self-assigned this Nov 30, 2023
@hazendaz
Copy link
Owner

Thanks @yukkes , will look to merge probably tomorrow and try to get a release out shortly after.

@yukkes
Copy link
Author

yukkes commented Nov 30, 2023

Thank you for your response.
I restored the Deencapsulation.invoke() method earlier, so please check it.

import static mockit.internal.reflection.ParameterReflection.hasMoreSpecificTypes;
import static mockit.internal.reflection.ParameterReflection.indexOfFirstRealParameter;
import static mockit.internal.reflection.ParameterReflection.matchesParameterTypes;
import static mockit.internal.reflection.ParameterReflection.*;
Copy link
Owner

Choose a reason for hiding this comment

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

@yukkes Please don't use star imports. Usually your IDE causes that, make sure intellij (going on a limb that is what you are using) is setup appropriately to stop doing that. Its meant for use if something like 99 imports which isn't the case.

@hazendaz
Copy link
Owner

hazendaz commented Dec 2, 2023

@yukkes I moved jmockit up to require jdk 11, do you foresee that causing any issues for you with this? Do note jdk 21 will fail as that is an issue still so generally just need rest to build ok.

An alternative to this we probably should document is that Powermock-reflect Whitebox does the same. In fact, for any usage I had at work and some 2k repos I help support we long already dumped that class. I however understand not everyone else had 2 to 3 years of understanding this fork was alive and well to overcome the issues or know of the alternative. So that said, as soon as this is good to go, I can get a release out right away.

@hazendaz
Copy link
Owner

hazendaz commented Dec 2, 2023

ok just fix the star import issue, rest I think is great. I can merge this then and release right after. If you need it to work with java 8 will need to know that as I will have to backport it. If its fine at java 11, great makes my life easier :)

@hazendaz
Copy link
Owner

hazendaz commented Dec 2, 2023

Actually I'm a bit impatient tonight. I'm going to merge, I'll fix my trivial concern and release this bit!

@hazendaz hazendaz merged commit 4ade706 into hazendaz:master Dec 2, 2023
6 of 9 checks passed
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