Below is the code snippet , i am getting sonar qube issue on the line 3 (FileUtilits.copy…). Could you please help me to resolve this issue.
ResponseEntity<Resource> response=//get response from other source
InputStream is = resource.getInputStream();
FileUtils.copyInputStreamToFile(is, new File(fileName));
is.close();
Hi,
Can anyone help me why we are getting “Change this code to not construct the path from user-controlled data.” in the below line of code
FileUtils.copyInputStreamToFile(is, new File(fileName));