@@ -105,19 +105,19 @@ protected ImportScanResponse createFindings(ScanFile scanFile, String endpoint,
105
105
new MappingJackson2HttpMessageConverter ())
106
106
);
107
107
108
- MultiValueMap <String , Object > mvn = new LinkedMultiValueMap <>();
108
+ MultiValueMap <String , Object > body = new LinkedMultiValueMap <>();
109
109
110
- mvn .add ("lead" , Long .toString (lead ));
111
- mvn .add ("scan_date" , currentDate );
112
- mvn .add ("scan_type" , scanType .getTestType ());
113
- mvn .add ("close_old_findings" , "true" );
114
- mvn .add ("skip_duplicates" , "false" );
115
- mvn .add ("test_type" , String .valueOf (testType ));
110
+ body .add ("lead" , Long .toString (lead ));
111
+ body .add ("scan_date" , currentDate );
112
+ body .add ("scan_type" , scanType .getTestType ());
113
+ body .add ("close_old_findings" , "true" );
114
+ body .add ("skip_duplicates" , "false" );
115
+ body .add ("test_type" , String .valueOf (testType ));
116
116
117
117
for (String theKey : options .keySet ()) {
118
- mvn .remove (theKey );
118
+ body .remove (theKey );
119
119
}
120
- mvn .addAll (options );
120
+ body .addAll (options );
121
121
122
122
try {
123
123
ByteArrayResource contentsAsResource = new ByteArrayResource (scanFile .getContent ().getBytes (StandardCharsets .UTF_8 )) {
@@ -127,9 +127,9 @@ public String getFilename() {
127
127
}
128
128
};
129
129
130
- mvn .add ("file" , contentsAsResource );
130
+ body .add ("file" , contentsAsResource );
131
131
132
- var payload = new HttpEntity <>(mvn , headers );
132
+ var payload = new HttpEntity <>(body , headers );
133
133
134
134
return restTemplate .exchange (defectDojoUrl + "/api/v2/" + endpoint + "/" , HttpMethod .POST , payload , ImportScanResponse .class ).getBody ();
135
135
} catch (HttpClientErrorException e ) {
0 commit comments