Polish "Make JarURLConnection return entry's last modified time"

Closes gh-9893
pull/9926/head
Andy Wilkinson 7 years ago
parent 7c7259beec
commit b7ac5f2eb2

@ -237,16 +237,15 @@ final class JarURLConnection extends java.net.JarURLConnection {
@Override
public long getLastModified() {
int defaultTime = 0;
if (this.jarFile == null || this.jarEntryName.isEmpty()) {
return defaultTime;
return 0;
}
try {
JarEntry entry = getJarEntry();
return (entry == null ? defaultTime : entry.getTime());
return (entry == null ? 0 : entry.getTime());
}
catch (IOException ex) {
return defaultTime;
return 0;
}
}

Loading…
Cancel
Save