@@ -231,7 +231,7 @@ public void processRequest(final InputStream inputStream, final OutputStream out
231231 } finally {
232232 // A response will be output on all paths, though CloudFormation will
233233 // not block on invoking the handlers, but rather listen for callbacks
234- writeResponse (outputStream , handlerResponse , request );
234+ writeResponse (outputStream , handlerResponse );
235235 publishExceptionCodeAndCountMetrics (request == null ? null : request .getAction (), handlerResponse .getErrorCode ());
236236 }
237237 }
@@ -376,9 +376,7 @@ public void processRequest(final InputStream inputStream, final OutputStream out
376376
377377 }
378378
379- protected void writeResponse (final OutputStream outputStream ,
380- final ProgressEvent <ResourceT , CallbackT > response ,
381- final HandlerRequest <ResourceT , CallbackT > request )
379+ protected void writeResponse (final OutputStream outputStream , final ProgressEvent <ResourceT , CallbackT > response )
382380 throws IOException {
383381 if (response .getResourceModel () != null ) {
384382 // strip write only properties on final results, we will need the intact model
@@ -389,21 +387,10 @@ protected void writeResponse(final OutputStream outputStream,
389387 }
390388
391389 String output = this .serializer .serialize (response );
392- if (response .getStatus () != OperationStatus .IN_PROGRESS ) {
393- // if status is not IN_PROGRESS, it means the response has been sanitized
394- final String logicalResourceId = getLogicalResourceId (request );
395- final String stackId = getStackId (request );
396- this .log (String .format ("StackId=%s LogicalResourceId=%s Response=%s" , stackId , logicalResourceId , output ));
397- }
398390 outputStream .write (output .getBytes (StandardCharsets .UTF_8 ));
399391 outputStream .flush ();
400392 }
401393
402- protected void writeResponse (final OutputStream outputStream , final ProgressEvent <ResourceT , CallbackT > response )
403- throws IOException {
404- this .writeResponse (outputStream , response , null );
405- }
406-
407394 protected ResourceT sanitizeModel (final ResourceT model ) throws IOException {
408395 // strip write only properties on final results, we will need the intact model
409396 // while provisioning
@@ -587,15 +574,6 @@ protected String getStackId(final HandlerRequest<ResourceT, CallbackT> request)
587574 return null ;
588575 }
589576
590- @ VisibleForTesting
591- protected String getLogicalResourceId (final HandlerRequest <ResourceT , CallbackT > request ) {
592- if (request != null && request .getRequestData () != null ) {
593- return request .getRequestData ().getLogicalResourceId ();
594- }
595-
596- return null ;
597- }
598-
599577 private void replaceInMap (final Map <String , String > targetMap , final Map <String , String > sourceMap ) {
600578 if (targetMap == null ) {
601579 return ;
0 commit comments