Skip to content

Commit 18fe868

Browse files
committed
Warn, instead of fail, when potential simple methods aren't blacklisted or whitelisted.
1 parent c15e158 commit 18fe868

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

codegen/src/main/java/software/amazon/awssdk/codegen/IntermediateModelBuilder.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ private void linkAuthorizationToRequestShapeForAwsProtocol(AuthType authType, Sh
234234
}
235235

236236
private void setSimpleMethods(IntermediateModel model) {
237-
model.getOperations().entrySet().stream().forEach(m -> {
237+
model.getOperations().entrySet().forEach(m -> {
238238

239239
ShapeModel inputShape = m.getValue().getInputShape();
240240
String methodName = m.getValue().getMethodName();
@@ -245,12 +245,14 @@ private void setSimpleMethods(IntermediateModel model) {
245245
&& !(config.getBlacklistedSimpleMethods().size() == 1 && config.getBlacklistedSimpleMethods().get(0).equals("*"))
246246
&& !m.getValue().hasStreamingInput()
247247
&& !m.getValue().hasStreamingOutput()) {
248+
248249
if (!methodName.matches(Constant.APPROVED_SIMPLE_METHOD_VERBS) &&
249250
!config.getVerifiedSimpleMethods().contains(methodName)) {
250-
throw new RuntimeException("Simple method encountered that is not approved or blacklisted: " + methodName);
251+
// TODO: How do we prevent these from being missed before services launch?
252+
log.warn("Simple method encountered that is not approved or blacklisted: " + methodName);
253+
} else {
254+
inputShape.setSimpleMethod(true);
251255
}
252-
253-
inputShape.setSimpleMethod(true);
254256
}
255257
});
256258
}

0 commit comments

Comments
 (0)