File tree Expand file tree Collapse file tree 2 files changed +3
-27
lines changed
spring-test/src/main/java/org/springframework/mock/web
spring-web/src/test/java/org/springframework/mock/web/test Expand file tree Collapse file tree 2 files changed +3
-27
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2014 the original author or authors.
2
+ * Copyright 2002-2015 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.
@@ -291,7 +291,7 @@ public int getEffectiveMinorVersion() {
291
291
*/
292
292
@ Override
293
293
public String getMimeType (String filePath ) {
294
- String mimeType = MimeTypeResolver . getMimeType (filePath );
294
+ String mimeType = FileTypeMap . getDefaultFileTypeMap (). getContentType (filePath );
295
295
return ("application/octet-stream" .equals (mimeType ) ? null : mimeType );
296
296
}
297
297
@@ -680,16 +680,4 @@ public <T extends EventListener> T createListener(Class<T> c) throws ServletExce
680
680
throw new UnsupportedOperationException ();
681
681
}
682
682
683
-
684
- /**
685
- * Inner factory class used to introduce a Java Activation Framework
686
- * dependency when actually asked to resolve a MIME type.
687
- */
688
- private static class MimeTypeResolver {
689
-
690
- public static String getMimeType (String filePath ) {
691
- return FileTypeMap .getDefaultFileTypeMap ().getContentType (filePath );
692
- }
693
- }
694
-
695
683
}
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ public int getEffectiveMinorVersion() {
291
291
*/
292
292
@ Override
293
293
public String getMimeType (String filePath ) {
294
- String mimeType = MimeTypeResolver . getMimeType (filePath );
294
+ String mimeType = FileTypeMap . getDefaultFileTypeMap (). getContentType (filePath );
295
295
return ("application/octet-stream" .equals (mimeType ) ? null : mimeType );
296
296
}
297
297
@@ -680,16 +680,4 @@ public <T extends EventListener> T createListener(Class<T> c) throws ServletExce
680
680
throw new UnsupportedOperationException ();
681
681
}
682
682
683
-
684
- /**
685
- * Inner factory class used to introduce a Java Activation Framework
686
- * dependency when actually asked to resolve a MIME type.
687
- */
688
- private static class MimeTypeResolver {
689
-
690
- public static String getMimeType (String filePath ) {
691
- return FileTypeMap .getDefaultFileTypeMap ().getContentType (filePath );
692
- }
693
- }
694
-
695
683
}
You can’t perform that action at this time.
0 commit comments