SlimeKnights / TinkersConstruct

Tinker a little, build a little, tinker a little more...
MIT License
1.24k stars 785 forks source link

add com.google.code.findbugs to remove '@Nullable' errors #5269

Closed Goldenlion5648 closed 1 month ago

Goldenlion5648 commented 1 month ago

When I loaded the project in Intellij, it complained about "@Nullable" for example in https://github.com/SlimeKnights/TinkersConstruct/blob/62dc631581963e32397dff774c477363b9c77a39/src/main/java/slimeknights/tconstruct/tables/block/TinkerStationBlock.java#L9

Also noted in the readme that java 18 must be used

KnightMiner commented 1 month ago

I don't see why this would be needed. We just setup a workspace using Gradle, and its always fetched that dependency for us just fine, has been doing so for years. That comes from javax, which is not google, its oracle.

As for the Java 18 requirement, its not a requirement? We use Java 17, as specified by our build.gradle. Our Jenkins server has been perfectly happy with that.

Please provide more information about why you think this change is needed. I assume you are just not setting up the workspace correctly.


If I had to guess, IDEA is not saying you need to add an additional project for those annotations. IDEA is just telling you it prefers its own annotations; you have to tell it we would rather use the built in ones. But thats not a build.gradle dependency, thats an IDEA profile setting. Show me the exact error message you got.

Goldenlion5648 commented 1 month ago

The output was image

Seems this was caused by having these two options set to intellij instead of gradle. (This was likely also the cause of IntelliJ telling me to use java 18 in the gradle output, or the other screenshot below) image

The gradle error might have been related to this setting image

KnightMiner commented 1 month ago

I was specifically asking about the error with nullable that prompted adding the dependency. It shouldn't be needed, but there is probably a better way to remove the warning.