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

Potential IAE with 4.1.1 due to deprecation fix #282

Closed
DManstrator opened this issue May 24, 2023 · 3 comments
Closed

Potential IAE with 4.1.1 due to deprecation fix #282

DManstrator opened this issue May 24, 2023 · 3 comments

Comments

@DManstrator
Copy link

In commit ca30938, Constructor#isAccessible was replaced by Constructor#canAccess(null). From what I've seen within the source code, this could raise an IllegalArgumentException since null is treated as an invalid value.

I honestly don't know what else could be used but I wanted to point it out.

@DManstrator DManstrator changed the title Potential NPE with 4.1.1 due to deprecation fix Potential IAE with 4.1.1 due to deprecation fix May 24, 2023
@github-actions
Copy link

Thank you for contributing to Poiji! Feel free to create a PR If you want to contribute directly :)

@ozlerhakan
Copy link
Owner

ozlerhakan commented Jun 3, 2023

Hi @DManstrator , I was aware of that case. I was thinking that this unlikely happens to have IAE while debugging the code.

@DManstrator
Copy link
Author

DManstrator commented Jun 12, 2023

I looked at the source code again and searched for example usages. The examples also use null as the param and by looking closely, the method can also throw for non-null usages. And the JavaDocs explain the following:

if this reflected object is a static member or constructor and the given {@code obj} is non-{@code null}

So I guess it is correct in this case, sorry for the inconveniences.

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

No branches or pull requests

2 participants