Skip to content

Commit b7ac5f2

Browse files
committed
Polish "Make JarURLConnection return entry's last modified time"
Closes gh-9893
1 parent 7c7259b commit b7ac5f2

File tree

1 file changed

+3
-4
lines changed
  • spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar

1 file changed

+3
-4
lines changed

spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarURLConnection.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,16 +237,15 @@ public Permission getPermission() throws IOException {
237237

238238
@Override
239239
public long getLastModified() {
240-
int defaultTime = 0;
241240
if (this.jarFile == null || this.jarEntryName.isEmpty()) {
242-
return defaultTime;
241+
return 0;
243242
}
244243
try {
245244
JarEntry entry = getJarEntry();
246-
return (entry == null ? defaultTime : entry.getTime());
245+
return (entry == null ? 0 : entry.getTime());
247246
}
248247
catch (IOException ex) {
249-
return defaultTime;
248+
return 0;
250249
}
251250
}
252251

0 commit comments

Comments
 (0)