Skip to content

Commit

Permalink
Avoid usage of deprecated method (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jul 26, 2024
1 parent 63fbe77 commit 81d99ab
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main/java/jenkins/scm/api/SCMFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,7 @@ private static String getMimeType(@NonNull String fileName) {

WebApp webApp = WebApp.getCurrent();

String extension = fileName.substring(fileName.lastIndexOf('.') + 1);
String mimeType = webApp.mimeTypes.get(extension);
if (mimeType == null) {
mimeType = webApp.context.getMimeType(fileName);
}
String mimeType = webApp.context.getMimeType(fileName);

Check warning on line 421 in src/main/java/jenkins/scm/api/SCMFile.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 421 is not covered by tests
if (mimeType == null) {
mimeType = "application/octet-stream";
}
Expand Down

0 comments on commit 81d99ab

Please sign in to comment.