@@ -93,19 +93,19 @@ protected ImportScanResponse createFindings(ScanFile scanFile, String endpoint,
9393 new MappingJackson2HttpMessageConverter ())
9494 );
9595
96- MultiValueMap <String , Object > mvn = new LinkedMultiValueMap <>();
96+ MultiValueMap <String , Object > body = new LinkedMultiValueMap <>();
9797
98- mvn .add ("lead" , Long .toString (lead ));
99- mvn .add ("scan_date" , currentDate );
100- mvn .add ("scan_type" , scanType .getTestType ());
101- mvn .add ("close_old_findings" , "true" );
102- mvn .add ("skip_duplicates" , "false" );
103- mvn .add ("test_type" , String .valueOf (testType ));
98+ body .add ("lead" , Long .toString (lead ));
99+ body .add ("scan_date" , currentDate );
100+ body .add ("scan_type" , scanType .getTestType ());
101+ body .add ("close_old_findings" , "true" );
102+ body .add ("skip_duplicates" , "false" );
103+ body .add ("test_type" , String .valueOf (testType ));
104104
105105 for (String theKey : options .keySet ()) {
106- mvn .remove (theKey );
106+ body .remove (theKey );
107107 }
108- mvn .addAll (options );
108+ body .addAll (options );
109109
110110 try {
111111 ByteArrayResource contentsAsResource = new ByteArrayResource (scanFile .getContent ().getBytes (StandardCharsets .UTF_8 )) {
@@ -115,9 +115,9 @@ public String getFilename() {
115115 }
116116 };
117117
118- mvn .add ("file" , contentsAsResource );
118+ body .add ("file" , contentsAsResource );
119119
120- var payload = new HttpEntity <>(mvn , headers );
120+ var payload = new HttpEntity <>(body , headers );
121121
122122 return restTemplate .exchange (defectDojoUrl + "/api/v2/" + endpoint + "/" , HttpMethod .POST , payload , ImportScanResponse .class ).getBody ();
123123 } catch (HttpClientErrorException e ) {
0 commit comments