fix:代码坏味道修改

dev
wangxy 11 months ago
parent 6b0a027bed
commit be765dda3c

@ -29,6 +29,7 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.List;
import java.util.Objects;
@ -99,7 +100,7 @@ public class FileRelationController extends BaseController {
public void fileView(@PathVariable String fileId, HttpServletResponse response) throws IOException {
String filePath = fileRelationManager.getFilePath(fileId);
String fileName = fileRelationManager.getRealName(fileId);
String encodedFileName = new String(fileName.getBytes("UTF-8"),"ISO-8859-1");
String encodedFileName = new String(fileName.getBytes(StandardCharsets.UTF_8),StandardCharsets.ISO_8859_1);
InputStream in = null;
OutputStream out = null;
try {

Loading…
Cancel
Save