This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
Register
Sign In
youys
/
ant
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
1
Code
Releases
0
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
PR 56873 make sure connection is established when reading last modified
master
Stefan Bodewig
11 years ago
parent
0724e3a233
commit
e8b160a938
2 changed files
with
13 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-0
WHATSNEW
+8
-1
src/main/org/apache/tools/ant/types/resources/URLResource.java
+ 5
- 0
WHATSNEW
View File
@@ -27,6 +27,11 @@ Fixed bugs:
cannot determine the local hostname.
Bugzilla Report 56593
* URLResource#getLastModified tried to access the connection to the
URL without making sure it was established, potentially leading to
a NullPointerException.
Bugzilla Report 56873
Other changes:
--------------
+ 8
- 1
src/main/org/apache/tools/ant/types/resources/URLResource.java
View File
@@ -265,7 +265,14 @@ public class URLResource extends Resource implements URLProvider {
if (!isExists(false)) {
return 0L;
}
return conn.getLastModified();
try {
connect();
long lastModified = conn.getLastModified();
close();
return lastModified;
} catch (IOException e) {
return UNKNOWN_DATETIME;
}
}
/**
Write
Preview
Loading…
Cancel
Save