Skip to content

Commit 81d99ab

Browse files
authored
Avoid usage of deprecated method (jenkinsci#275)
1 parent 63fbe77 commit 81d99ab

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/main/java/jenkins/scm/api/SCMFile.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,11 +418,7 @@ private static String getMimeType(@NonNull String fileName) {
418418

419419
WebApp webApp = WebApp.getCurrent();
420420

421-
String extension = fileName.substring(fileName.lastIndexOf('.') + 1);
422-
String mimeType = webApp.mimeTypes.get(extension);
423-
if (mimeType == null) {
424-
mimeType = webApp.context.getMimeType(fileName);
425-
}
421+
String mimeType = webApp.context.getMimeType(fileName);
426422
if (mimeType == null) {
427423
mimeType = "application/octet-stream";
428424
}

0 commit comments

Comments
 (0)