@@ -93,6 +93,7 @@ private ImportScanResponse createFindings(ScanFile scanFile, String endpoint, lo
93
93
new MappingJackson2HttpMessageConverter ())
94
94
);
95
95
96
+ // FIXME: Why do we use a multi value map here? Do we need multiple values for any given key?
96
97
final var body = new LinkedMultiValueMap <String , Object >();
97
98
98
99
body .add ("lead" , Long .toString (lead ));
@@ -102,6 +103,7 @@ private ImportScanResponse createFindings(ScanFile scanFile, String endpoint, lo
102
103
body .add ("skip_duplicates" , "false" );
103
104
body .add ("test_type" , String .valueOf (testType ));
104
105
106
+ // Avoid duplicate entries:
105
107
for (final var optionName : options .keySet ()) {
106
108
body .remove (optionName );
107
109
}
@@ -119,7 +121,7 @@ public String getFilename() {
119
121
}
120
122
};
121
123
122
- // FIXME Why do we add the whole byte array resiurce here as object? Is not simply the file name sufficient here? Then we could use <String, String>
124
+ // FIXME: Why do we add the whole byte array resiurce here as object? Is not simply the file name sufficient here? Then we could use <String, String>
123
125
body .add ("file" , contentsAsResource );
124
126
125
127
// FIXME: We do not define the the type T of the body here!
@@ -130,7 +132,7 @@ public String getFilename() {
130
132
throw new DefectDojoPersistenceException ("Failed to attach findings to engagement." );
131
133
}
132
134
}
133
-
135
+
134
136
/**
135
137
* The DefectDojo Authentication Header
136
138
*
0 commit comments