Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-2540

Add '@Nullable' annotations to all APIs that can return null

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None

      Currently 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. most methods within ConfigurationSection).

      However javadocs cannot be accessed for static code analyses. Therefore it would be massively helpful if all methods that may return null could be annotated with the javax.annotation.Nullable annotation which can be used by such tools.

      The javax.annotation package is already present within Bukkit's dependencies. The change would not break any existing API usage.

            Unassigned Unassigned
            TheE TheE
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: