small bugfixes
This commit is contained in:
parent
e72f409197
commit
3dc635c6fd
2 changed files with 4 additions and 1 deletions
|
@ -470,6 +470,9 @@ public class Message extends AbstractEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private String extractRelevantExtension(URL url) {
|
private String extractRelevantExtension(URL url) {
|
||||||
|
if (url == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
String path = url.getPath();
|
String path = url.getPath();
|
||||||
return extractRelevantExtension(path);
|
return extractRelevantExtension(path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ public class FileUtils {
|
||||||
final int lastDotPosition = filename.lastIndexOf('.');
|
final int lastDotPosition = filename.lastIndexOf('.');
|
||||||
final int secondToLastDotPosition = filename.lastIndexOf('.', lastDotPosition - 1);
|
final int secondToLastDotPosition = filename.lastIndexOf('.', lastDotPosition - 1);
|
||||||
final String secondToLastPart = secondToLastDotPosition != -1 ?
|
final String secondToLastPart = secondToLastDotPosition != -1 ?
|
||||||
filename.substring(secondToLastDotPosition + 1, lastDotPosition - 1) : "";
|
filename.substring(secondToLastDotPosition + 1, lastDotPosition) : "";
|
||||||
return secondToLastPart;
|
return secondToLastPart;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue