Skip to content

Commit

Permalink
fix(aws-cdk): update Java template to new builder style (#3723)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Java builders no longer use the "with" prefix.
  • Loading branch information
rix0rrr authored and mergify[bot] committed Aug 20, 2019
1 parent 98f131a commit ab07af1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static HelloConstructPropsBuilder aHelloConstructProps() {
return new HelloConstructPropsBuilder();
}

public HelloConstructPropsBuilder withBucketCount(int bucketCount) {
public HelloConstructPropsBuilder bucketCount(int bucketCount) {
this.bucketCount = bucketCount;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ public HelloStack(final Construct parent, final String id, final StackProps prop
super(parent, id, props);

Queue queue = new Queue(this, "MyFirstQueue", QueueProps.builder()
.withVisibilityTimeout(Duration.seconds(300))
.visibilityTimeout(Duration.seconds(300))
.build());

Topic topic = new Topic(this, "MyFirstTopic", TopicProps.builder()
.withDisplayName("My First Topic Yeah")
.displayName("My First Topic Yeah")
.build());

topic.addSubscription(new SqsSubscription(queue));

HelloConstruct hello = new HelloConstruct(this, "Buckets", HelloConstructProps.builder()
.withBucketCount(5)
.bucketCount(5)
.build());

User user = new User(this, "MyUser", UserProps.builder().build());
Expand Down

0 comments on commit ab07af1

Please sign in to comment.