@@ -93,7 +93,7 @@ protected ImportScanResponse createFindings(ScanFile scanFile, String endpoint,
9393 new MappingJackson2HttpMessageConverter ())
9494 );
9595
96- MultiValueMap < String , Object > body = new LinkedMultiValueMap <>();
96+ final var body = new LinkedMultiValueMap <String , Object >();
9797
9898 body .add ("lead" , Long .toString (lead ));
9999 body .add ("scan_date" , currentDate );
@@ -102,9 +102,10 @@ protected ImportScanResponse createFindings(ScanFile scanFile, String endpoint,
102102 body .add ("skip_duplicates" , "false" );
103103 body .add ("test_type" , String .valueOf (testType ));
104104
105- for (String theKey : options .keySet ()) {
105+ for (final var theKey : options .keySet ()) {
106106 body .remove (theKey );
107107 }
108+
108109 body .addAll (options );
109110
110111 try {
@@ -117,7 +118,7 @@ public String getFilename() {
117118
118119 body .add ("file" , contentsAsResource );
119120
120- var payload = new HttpEntity <>(body , headers );
121+ final var payload = new HttpEntity <>(body , headers );
121122
122123 return restTemplate .exchange (defectDojoUrl + "/api/v2/" + endpoint + "/" , HttpMethod .POST , payload , ImportScanResponse .class ).getBody ();
123124 } catch (HttpClientErrorException e ) {
0 commit comments