@@ -93,19 +93,19 @@ protected ImportScanResponse createFindings(ScanFile scanFile, String endpoint,
93
93
new MappingJackson2HttpMessageConverter ())
94
94
);
95
95
96
- MultiValueMap <String , Object > mvn = new LinkedMultiValueMap <>();
96
+ MultiValueMap <String , Object > body = new LinkedMultiValueMap <>();
97
97
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 ));
104
104
105
105
for (String theKey : options .keySet ()) {
106
- mvn .remove (theKey );
106
+ body .remove (theKey );
107
107
}
108
- mvn .addAll (options );
108
+ body .addAll (options );
109
109
110
110
try {
111
111
ByteArrayResource contentsAsResource = new ByteArrayResource (scanFile .getContent ().getBytes (StandardCharsets .UTF_8 )) {
@@ -115,9 +115,9 @@ public String getFilename() {
115
115
}
116
116
};
117
117
118
- mvn .add ("file" , contentsAsResource );
118
+ body .add ("file" , contentsAsResource );
119
119
120
- var payload = new HttpEntity <>(mvn , headers );
120
+ var payload = new HttpEntity <>(body , headers );
121
121
122
122
return restTemplate .exchange (defectDojoUrl + "/api/v2/" + endpoint + "/" , HttpMethod .POST , payload , ImportScanResponse .class ).getBody ();
123
123
} catch (HttpClientErrorException e ) {
0 commit comments