File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
spring-web/src/main/java/org/springframework/http Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -861,7 +861,7 @@ public List<String> getConnection() {
861861 public void setContentDispositionFormData (String name , @ Nullable String filename ) {
862862 Assert .notNull (name , "Name must not be null" );
863863 ContentDisposition .Builder disposition = ContentDisposition .builder ("form-data" ).name (name );
864- if (filename != null ) {
864+ if (StringUtils . hasText ( filename ) ) {
865865 disposition .filename (filename );
866866 }
867867 setContentDisposition (disposition .build ());
@@ -888,7 +888,7 @@ public void setContentDisposition(ContentDisposition contentDisposition) {
888888 */
889889 public ContentDisposition getContentDisposition () {
890890 String contentDisposition = getFirst (CONTENT_DISPOSITION );
891- if (contentDisposition != null ) {
891+ if (StringUtils . hasText ( contentDisposition ) ) {
892892 return ContentDisposition .parse (contentDisposition );
893893 }
894894 return ContentDisposition .empty ();
You can’t perform that action at this time.
0 commit comments