maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r517192 - in /maven/scm/trunk: maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/changelog/
Date Mon, 12 Mar 2007 12:43:49 GMT
Author: evenisse
Date: Mon Mar 12 05:43:48 2007
New Revision: 517192

URL: http://svn.apache.org/viewvc?view=rev&rev=517192
Log:
[SCM-278] Fix NPE when endDate is null

Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/changelog/VssHistoryCommand.java

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java?view=diff&rev=517192&r1=517191&r2=517192
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/AbstractChangeLogCommand.java
Mon Mar 12 05:43:48 2007
@@ -90,6 +90,10 @@
 
                 endDate = new Date( System.currentTimeMillis() + (long) 1 * 24 * 60 * 60
* 1000 );
             }
+            else if ( endDate == null )
+            {
+                endDate = new Date();
+            }
 
             return executeChangeLogCommand( repository, fileSet, startDate, endDate, branch,
datePattern );
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/changelog/VssHistoryCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/changelog/VssHistoryCommand.java?view=diff&rev=517192&r1=517191&r2=517192
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/changelog/VssHistoryCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-vss/src/main/java/org/apache/maven/scm/provider/vss/commands/changelog/VssHistoryCommand.java
Mon Mar 12 05:43:48 2007
@@ -110,6 +110,11 @@
         //Display only versions that fall within specified data range.
         if ( startDate != null )
         {
+            if ( endDate == null )
+            {
+                endDate = new Date(); // = now
+            }
+
             SimpleDateFormat sdf = new SimpleDateFormat( "dd/MM/yyyy", Locale.ENGLISH );
             String dateRange = sdf.format( endDate ) + "~" + sdf.format( startDate );
             command.createArgument().setValue( VssConstants.FLAG_VERSION_DATE + dateRange
);



Mime
View raw message