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

Add ClassInfo#getSourceFile #740

Merged
merged 2 commits into from Dec 21, 2022

Conversation

freya022
Copy link
Contributor

This PR adds the SourceFile attribute, as specified in the 4.7.10 section

@freya022
Copy link
Contributor Author

Btw this would be nice if we could use some nullability annotations, as some fields (such as this one) are optional, letting IDEs or even languages (like Kotlin) to know what is nullable or not, would be useful

I'd suggest using this one: compileOnly("com.google.code.findbugs:jsr305:3.0.2") as a compile only dependency as to not be included in the uber jar

@lukehutch
Copy link
Member

Thank you for the contribution, @freya022! I'll roll out a release tonight.

Good suggestion re findbugs. I did some nullability dataflow analysis in the past, and I gave up, partly because the compile-time dependency I added wasn't compatible with JDK 7, which was (and is still) supported by ClassGraph. I'll try out findbugs.

I suspect it will be an enormous amount of work to get the nullability annotations correct throughout the entire project, however. I am not up to date in my knowledge about how much of the work tools can do correctly for the programmer.

@freya022 freya022 deleted the feature/class-source-file branch December 21, 2022 12:52
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.

None yet

2 participants