I will assume that we want to stay at language level 8, as upgrading is out of scope for this issue. Since we'd presumably want to be compatible with as many tools as possible, we are pretty much limited to the packages mentioned in the linked SO answer.Īdditionally, pom.xml in Bukkit repo advertises, that it is compiled at language level of Java 7, but the code itself uses some classes from Java 8 (Consumer and Predicate). Here is a nice overview of what is available. But I don't know which annotations should I use. If md is okay with it, I'd suggest making a PR for it. I'd ask md_5 if he's fine with adding them, but we probably won't have the time to go through and do it ourselves. It'd be a pretty monumental task to annotate the entire API in this way. But I think it won't be an issue to include that artefact. is not included in Bukkit, only in CraftBukkit (through MinecraftServer).īut it would make sense to document some return values using this and other annotions like as long as this remains compatibility.Īs far as I understand, is provided by JSR 305 which is a required dependency of Guava, so it needs to be present. The change would not break any existing API usage. The javax.annotation package is already present within Bukkit's dependencies. Therefore it would be massively helpful if all methods that may return null could be annotated with the annotation which can be used by such tools. However javadocs cannot be accessed for static code analyses. most methods within ConfigurationSection). Add annotations to all APIs that can return nullĬurrently lots of methods within the Bukkit API can return null under certain valid conditions these conditions are normally documented within the javadocs of each method (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |