Browse Source

revert e8b160a which didn't fix anything but rather broke stuff

master
Stefan Bodewig 10 years ago
parent
commit
ad72b9a920
2 changed files with 2 additions and 13 deletions
  1. +0
    -5
      WHATSNEW
  2. +2
    -8
      src/main/org/apache/tools/ant/types/resources/URLResource.java

+ 0
- 5
WHATSNEW View File

@@ -27,11 +27,6 @@ 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:
--------------



+ 2
- 8
src/main/org/apache/tools/ant/types/resources/URLResource.java View File

@@ -263,16 +263,10 @@ public class URLResource extends Resource implements URLProvider {
return ((Resource) getCheckedRef()).getLastModified();
}
if (!isExists(false)) {
return 0L;
}
try {
connect();
long lastModified = conn.getLastModified();
close();
return lastModified;
} catch (IOException e) {
return UNKNOWN_DATETIME;
}
// isExists has already opened the connection
return conn.getLastModified();
}

/**


Loading…
Cancel
Save