From b3b3ba93af7ce87350bb917fb7937689ece8b6ff Mon Sep 17 00:00:00 2001 From: Romain Marcadier-Muller Date: Tue, 18 Jun 2019 15:09:47 +0200 Subject: [PATCH] fix(init): Correct java init template (#2889) Package name included capitalized Subscriptions in the package FQN, which is incorrect. --- .../app/java/src/main/java/com/myorg/HelloStack.java | 2 +- .../app/java/src/test/java/com/myorg/HelloStackTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/HelloStack.java b/packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/HelloStack.java index 4159f9ed95776..1a262fbc88e3c 100644 --- a/packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/HelloStack.java +++ b/packages/aws-cdk/lib/init-templates/app/java/src/main/java/com/myorg/HelloStack.java @@ -7,7 +7,7 @@ import software.amazon.awscdk.services.iam.UserProps; import software.amazon.awscdk.services.sns.Topic; import software.amazon.awscdk.services.sns.TopicProps; -import software.amazon.awscdk.services.sns.Subscriptions.SqsSubscription; +import software.amazon.awscdk.services.sns.subscriptions.SqsSubscription; import software.amazon.awscdk.services.sqs.Queue; import software.amazon.awscdk.services.sqs.QueueProps; diff --git a/packages/aws-cdk/lib/init-templates/app/java/src/test/java/com/myorg/HelloStackTest.java b/packages/aws-cdk/lib/init-templates/app/java/src/test/java/com/myorg/HelloStackTest.java index 3cdae8f875eee..cb04e591fd394 100644 --- a/packages/aws-cdk/lib/init-templates/app/java/src/test/java/com/myorg/HelloStackTest.java +++ b/packages/aws-cdk/lib/init-templates/app/java/src/test/java/com/myorg/HelloStackTest.java @@ -21,7 +21,7 @@ public void testStack() throws IOException { // synthesize the stack to a CloudFormation template and compare against // a checked-in JSON file. - JsonNode actual = JSON.valueToTree(app.run().getStack(stack.getName()).getTemplate()); + JsonNode actual = JSON.valueToTree(app.run().getStack(stack.getStackName()).getTemplate()); JsonNode expected = JSON.readTree(getClass().getResource("expected.cfn.json")); assertEquals(expected, actual); }