Browse Source

Java API change to Date.after causes bug #30471, added check and comment

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@384111 13f79535-47bb-0310-9956-ffa450edef68
master
Kevin Jackson 19 years ago
parent
commit
08f7f02ab3
1 changed files with 18 additions and 1 deletions
  1. +18
    -1
      src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java

+ 18
- 1
src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java View File

@@ -326,7 +326,24 @@ public class ChangeLogTask extends AbstractCvsTask {
for (int i = 0; i < entrySet.length; i++) {
final CVSEntry cvsEntry = entrySet[i];
final Date date = cvsEntry.getDate();

//bug#30471
//this is caused by Date.after throwing a NullPointerException
//for some reason there's no date set in the CVSEntry
//Java 1.3.1 API
//http://java.sun.com/j2se/1.3/docs/api/java/util/Date.html#after(java.util.Date)
//doesn't throw NullPointerException
//Java 1.4.2 + 1.5 API
//http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html#after(java.util.Date)
//according to the docs it doesn't throw, according to the bug report it does
//http://java.sun.com/j2se/1.5.0/docs/api/java/util/Date.html#after(java.util.Date)
//according to the docs it does throw
//for now skip entries which are missing a date
if (null == date) {
continue;
}
if (null != startDate && startDate.after(date)) {
//Skip dates that are too early
continue;


Loading…
Cancel
Save