Skip to content

Add ClassInfo#getSourceFile#740

Merged
lukehutch merged 2 commits into
classgraph:latestfrom
freya022:feature/class-source-file
Dec 21, 2022
Merged

Add ClassInfo#getSourceFile#740
lukehutch merged 2 commits into
classgraph:latestfrom
freya022:feature/class-source-file

Conversation

@freya022

Copy link
Copy Markdown
Contributor

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

@freya022

Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants