Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(java,dotnet): emit default implementations for optional properties #906

Merged
merged 5 commits into from
Oct 29, 2019

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Oct 24, 2019

For optional properties on interfaces, emit default implementations (for .NET,
this required upgrading the target to netcoreapp3.0) so that adding a new
optional property on an interface does not break existing code that implements
the interface.

In it's current form, the getters always return null, while the setters throw an
exception unless overridden.

Fixes #543


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

For optional properties on interfaces, emit default implementations when
possible (for .NET, this requires `netcoreapp3.0` or later) so that
adding a new optional property on an interface does not break existing
core that implements the interface.

In it's current form, the getters always return `null`, while the
setters throw an exception (this may change in the future).

Fixes #543
@RomainMuller RomainMuller requested a review from a team as a code owner October 24, 2019 12:33
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • 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

@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Oct 25, 2019
@RomainMuller RomainMuller force-pushed the rmuller/optional-members-in-static-languages branch from 1616327 to 7632290 Compare October 28, 2019 10:15
@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

@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

@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 merged commit 37ddfd5 into master Oct 29, 2019
@RomainMuller RomainMuller deleted the rmuller/optional-members-in-static-languages branch October 29, 2019 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/do-not-merge This PR should not be merged at this time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java - problems implementing class/interface with optional property
3 participants