Skip to content

[REQ] Migrate off of com.google.code.findbugs:jsr305 or make it configurable #7177

Description

@thokuest

Is your feature request related to a problem? Please describe.

Pull request #3409 added nullable annotations to generated Java POJOs. The annotations are provided by library com.google.code.findbugs:jsr305. I'd like to cite SpotBugs issue #130 for why I think this is a problem for applications:

JSR-305 is dormant, has been for a long while and shows no hope of ever producing an agreed set of annotations in our lifetime. Further more these annotations use javax. packages which it is not possible to use according to the Oracle Java binary licence, so applications can not use and ship these dependencies along with a JRE without violating the Oracle licence agreement.

F. JAVA TECHNOLOGY RESTRICTIONS. You may not create, modify, or change the behavior of, or authorize your licensees to create, modify, or change the behavior of, classes, interfaces, or subpackages that are in any way identified as "java", "javax", "sun", “oracle” or similar convention as specified by Oracle in any naming convention designation.

The JSR-305 group has not defined any official releases according to its jsr page so the only implementations is a seemingly random implementation provided by the FindBugs team. Even if the team where experts on the JSR (which some where) they are not official as there has been no vote and are not available from the JSR hompage - so the javax package name restriction still applies.

Additionally, using the library with the Java Platform Module System results in a split package and the application won't compile.

Describe the solution you'd like

Make it configurable so that annotations can be enabled/disabled explicitly. Also consider moving to a friendlier alternative. The Kotlin Java Interop Documentation enumerates some options.

Describe alternatives you've considered

/

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions