Applied Energistics 2

Applied Energistics 2

137M Downloads

Use Jetbrains annotations for API

Technici4n opened this issue ยท 1 comments

commented

Would allow using @ApiStatus.NonExtendable and friends.
We should also remove all these pesky @Nonnull and assume that non null is by default.

commented

This will not provide any real benefit and instead just adds more work on our side for something which will not be used.

First it's a vendor specific thing, so anyone not using IDEA will not benefit from it. Also anyone using IDEA will just ignore them as the javadocs now.

Secondly the API and implementation are technically two separate projects. Therefore we basically provide a reference implementation for the API, so if @ApiStatus.NonExtendable is done correctly, it should always trigger a warning or whatever it produces for our own code.

Thirdly their retention type should be CLASS, but neither Minecraft nor Forge provides this dependency. Which means we would have to add it as dependency. However due to Forge/ForgeGradle being broken, we have to strip all dependencies from the pom.xml as it will otherwise result in non resolveable depdencies. Maybe solvable, but not worth the effort to have another thing around just waiting to break randomly.

Finally, which overlaps a bit with the first point. No IDE specific things will be added to force any potential contributor or addon dev into a vendor locking. If jetbrains is serious about contributing to the java ecosystem, they are free to pickup jsr305 again and improve it for everyone.