Skip to content

Commit ade329a

Browse files
committed
Prevent producing AmazonClientBuildItem if not used
1 parent 572736a commit ade329a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

extensions/amazon-services/common/deployment/src/main/java/io/quarkus/amazon/common/deployment/AbstractAmazonServiceProcessor.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ protected void setupExtension(BeanRegistrationPhaseBuildItem beanRegistrationPha
5353
asyncClassName = Optional.of(asyncClientName());
5454
}
5555
}
56-
57-
clientProducer.produce(new AmazonClientBuildItem(syncClassName, asyncClassName, extensionName()));
56+
if (syncClassName.isPresent() || asyncClassName.isPresent()) {
57+
clientProducer.produce(new AmazonClientBuildItem(syncClassName, asyncClassName, extensionName()));
58+
}
5859
}
5960

6061
protected void createExtensionClients(List<AmazonClientTransportsBuildItem> clients,

0 commit comments

Comments
 (0)