changeset 68:2c37083730b1

6643094: Test on keytool -startdate forgets about December Reviewed-by: xuelei
author weijun
date Sat, 08 Mar 2008 22:51:14 +0800
parents ac695089ccc5
children 06eb4d224a6b
files test/sun/security/tools/keytool/StartDateTest.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/security/tools/keytool/StartDateTest.java	Sat Mar 08 22:49:45 2008 +0800
+++ b/test/sun/security/tools/keytool/StartDateTest.java	Sat Mar 08 22:51:14 2008 +0800
@@ -52,15 +52,15 @@
         cal.setTime(getIssueDate());
         System.out.println(cal);
         if (cal.get(Calendar.YEAR) != year + 1) {
-            throw new Exception("Function #1 check fails");
+            throw new Exception("Function check #1 fails");
         }
 
         run("-keystore jks -storetype jks -storepass changeit -keypass changeit -alias me " +
                 "-selfcert -startdate +1m");
         cal.setTime(getIssueDate());
         System.out.println(cal);
-        if (cal.get(Calendar.MONTH) != month + 1) {
-            throw new Exception("Function #1 check fails");
+        if (cal.get(Calendar.MONTH) != (month + 1) % 12) {
+            throw new Exception("Function check #2 fails");
         }
 
         new File("jks").delete();