Commit b7ac5f2e authored by Andy Wilkinson's avatar Andy Wilkinson

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

Closes gh-9893
parent 7c7259be
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment