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

[Bug]: CtReferenceImpl.isSpecialType throws an exception #5660

Open
aeromac opened this issue Feb 6, 2024 · 0 comments
Open

[Bug]: CtReferenceImpl.isSpecialType throws an exception #5660

aeromac opened this issue Feb 6, 2024 · 0 comments
Labels

Comments

@aeromac
Copy link

aeromac commented Feb 6, 2024

Describe the bug

Maybe a bug, or maybe more an opportunity to add some error reporting so that it's easier to debug issues:
boolean isSpecialType(String identifier) in CtReferenceImpl calls identifier.isEmpty() and will throw an exception if identifier is null.
An example of when this happens is setSimpleName(null) - maybe that method could have some error checking?

Source code you are trying to analyze/transform

setSimpleName(null)
I know I shouldn't pass a null - it wasn't deliberate but throws a confusing exception.

Source code for your Spoon processing

No response

Actual output

No response

Expected output

No response

Spoon Version

Latest

JVM Version

java version "17.0.7" 2023-04-18 LTS

What operating system are you using?

Windows 11

@aeromac aeromac added the bug label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant