File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
spring-web/src/main/java/org/springframework/web/multipart/support Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2022 the original author or authors.
2
+ * Copyright 2002-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -116,13 +116,10 @@ public MultipartHttpServletRequest resolveMultipart(HttpServletRequest request)
116
116
public void cleanupMultipart (MultipartHttpServletRequest request ) {
117
117
if (!(request instanceof AbstractMultipartHttpServletRequest abstractMultipartHttpServletRequest ) ||
118
118
abstractMultipartHttpServletRequest .isResolved ()) {
119
- // To be on the safe side: explicitly delete the parts,
120
- // but only actual file parts (for Resin compatibility)
119
+
121
120
try {
122
121
for (Part part : request .getParts ()) {
123
- if (request .getFile (part .getName ()) != null ) {
124
- part .delete ();
125
- }
122
+ part .delete ();
126
123
}
127
124
}
128
125
catch (Throwable ex ) {
You can’t perform that action at this time.
0 commit comments