Skip to content

Commit 657cb5d

Browse files
committed
Fix checkstyles
1 parent c70d58f commit 657cb5d

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

codegen/src/main/java/software/amazon/awssdk/codegen/docs/OperationDocProvider.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import software.amazon.awssdk.codegen.model.intermediate.OperationModel;
3131
import software.amazon.awssdk.codegen.model.intermediate.ShapeModel;
3232
import software.amazon.awssdk.codegen.model.service.PaginatorDefinition;
33-
import software.amazon.awssdk.utils.Lazy;
3433
import software.amazon.awssdk.utils.Pair;
3534
import software.amazon.awssdk.utils.StringUtils;
3635

@@ -39,9 +38,6 @@
3938
*/
4039
abstract class OperationDocProvider {
4140

42-
private static final Lazy<ExampleMetadataProvider> EXAMPLE_PROVIDER =
43-
new Lazy<>(() -> ExampleMetadataProvider.getInstance(EXAMPLE_META_PATH));
44-
4541
/**
4642
* Doc string for {@link java.nio.file.Path} parameter in simple method overload for streaming input operations.
4743
*/
@@ -58,6 +54,9 @@ abstract class OperationDocProvider {
5854
"this method will throw an exception. If the file is not writable by the current user then " +
5955
"an exception will be thrown. ";
6056

57+
private static final ExampleMetadataProvider EXAMPLE_PROVIDER =
58+
ExampleMetadataProvider.getInstance(EXAMPLE_META_PATH);
59+
6160
protected final IntermediateModel model;
6261
protected final OperationModel opModel;
6362
protected final DocConfiguration config;
@@ -94,7 +93,7 @@ String getDocs() {
9493
docBuilder.see(crosslink);
9594
}
9695

97-
Optional<String> codeExampleLink = EXAMPLE_PROVIDER.getValue()
96+
Optional<String> codeExampleLink = EXAMPLE_PROVIDER
9897
.createLinkToCodeExample(model.getMetadata(), opModel.getOperationName());
9998
codeExampleLink.ifPresent(docBuilder::see);
10099
return docBuilder.build().replace("$", "&#36");

codegen/src/main/java/software/amazon/awssdk/codegen/internal/ExampleMetadataProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private Map<String, JsonNode> buildServiceNodeCache() {
172172
});
173173
}
174174
}
175-
} catch (IOException e) {
175+
} catch (IOException | RuntimeException e) {
176176
log.warn(() -> "Failed to load " + exampleMetaPath, e);
177177
}
178178

0 commit comments

Comments
 (0)