Skip to content

Conversation

@RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Feb 3, 2020

This commit annotates values (parameters, properties, and method return
values) with the JetBrains annotations associated to the use-case:

  • @org.jetbrains.annotations.NotNull
  • @org.jetbrains.annotations.Nullable

While there is no standard nullability annotation in the Java Language Specification,
several alternatives exist - including JSR-305
and FindBugs.
The decision to use JetBrains' is based on the following reasoning:

  • JSR-305 has been dormant, and may incur licensing issues (see Migrate off of jsr305 google/guava#2960)
  • JetBrains' annotations are licensed as Apache-2.0 (same as jsii itself), while FindBugs is LGPL
  • One of the values of annotating is to improve Kotlin interoperability, so JetBrains annotations make the most sense in this context.

This can help IDEs provide static analysis of the code for discovery
of possible bugs; and will make usage from Kotlin nicer as it enables
use of the correct platform types.

Implements aws/aws-cdk#6026


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This commit annotates values (parameters, properties, and method return
values) with the JetBrains annotations associated to the use-case.

Implements aws/aws-cdk#6026
@RomainMuller RomainMuller requested review from a team and MrArnoldPalmer as code owners February 3, 2020 14:01
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@RomainMuller RomainMuller added contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort language/java Related to Java bindings labels Feb 3, 2020
@RomainMuller RomainMuller self-assigned this Feb 3, 2020
@eladb eladb added the pr/do-not-merge This PR should not be merged at this time. label Feb 3, 2020
@eladb
Copy link
Contributor

eladb commented Feb 3, 2020

Minor comments, added do-not-merge

@RomainMuller RomainMuller removed the pr/do-not-merge This PR should not be merged at this time. label Feb 3, 2020
@RomainMuller RomainMuller removed the request for review from MrArnoldPalmer February 3, 2020 14:41
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Feb 3, 2020

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Feb 3, 2020
@mergify mergify bot merged commit 6f2ab03 into master Feb 3, 2020
@mergify mergify bot deleted the rmuller/java-nullable branch February 3, 2020 15:04
@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. effort/small Small work item – less than a day of effort language/java Related to Java bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants