Skip to content

Commit

Permalink
DCPERF-747 Fix binary incompatibility of Investment.copy with the p…
Browse files Browse the repository at this point in the history
  • Loading branch information
jacek-foremski committed Dec 3, 2024
1 parent acf9939 commit f08173a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Dropping a requirement of a major version of a dependency is a new contract.
## [Unreleased]
[Unreleased]: https://github.com/atlassian-labs/aws-resources/compare/release-1.18.0...master

### Fixed
- Fix binary incompatibility of `Investment.copy` with the previous minor version.

## [1.18.0] - 2024-11-29
[1.18.0]: https://github.com/atlassian-labs/aws-resources/compare/release-1.17.0...release-1.18.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ private constructor(
*/
fun tag(): List<Tag> = tagAtlassianAwsAccountability() + tagLifecycle() + tagInitiator()

/**
* Added for backwards compatibility.
* TODO: To be removed in the next major version.
*/
fun copy(
useCase: String = this.useCase,
lifespan: Duration = this.lifespan,
disposable: Boolean = this.disposable,
reuseKey: () -> String = this.reuseKey
): Investment {
return Investment(
useCase = useCase,
lifespan = lifespan,
disposable = disposable,
reuseKey = reuseKey
)
}

/**
* @return tags required by all Atlassian AWS accounts
*/
Expand Down

0 comments on commit f08173a

Please sign in to comment.