You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2006/08/07 07:58:34 UTC

svn commit: r429246 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni/src: main/java/java/util/GregorianCalendar.java test/java/tests/api/java/util/GregorianCalendarTest.java

Author: pyang
Date: Sun Aug  6 22:58:33 2006
New Revision: 429246

URL: http://svn.apache.org/viewvc?rev=429246&view=rev
Log:
Fix for HARMONY-1073 ( [classlib][luni] Incorrect value of java.util.GregorianCalendar.getMaximum and getMinimum for field ZONE_OFFSET)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/GregorianCalendar.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/GregorianCalendar.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/GregorianCalendar.java?rev=429246&r1=429245&r2=429246&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/GregorianCalendar.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/GregorianCalendar.java Sun Aug  6 22:58:33 2006
@@ -1,4 +1,4 @@
-/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+/* Copyright 1998, 2006 The Apache Software Foundation or its licensors, as applicable
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -56,10 +56,10 @@
 			212, 243, 273, 304, 334 };
 
 	private static int[] maximums = new int[] { 1, 292278994, 11, 53, 6, 31,
-			366, 7, 6, 1, 11, 23, 59, 59, 999, 43200000, 3600000 };
+			366, 7, 6, 1, 11, 23, 59, 59, 999, 14 * 3600 * 1000, 3600000 };
 
 	private static int[] minimums = new int[] { 0, 1, 0, 1, 0, 1, 1, 1, -1, 0,
-			0, 0, 0, 0, 0, -43200000, 0 };
+			0, 0, 0, 0, 0, -13* 3600 * 1000, 0 };
 
 	private static int[] leastMaximums = new int[] { 1, 292269054, 11, 52, 4,
 			28, 365, 7, 4, 1, 11, 23, 59, 59, 999, 43200000, 3600000 };

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java?rev=429246&r1=429245&r2=429246&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/util/GregorianCalendarTest.java Sun Aug  6 22:58:33 2006
@@ -336,7 +336,7 @@
 				.getGreatestMinimum(Calendar.HOUR));
 
 		BitSet result = new BitSet();
-		int[] min = { 0, 1, 0, 1, 0, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0, -43200000,
+		int[] min = { 0, 1, 0, 1, 0, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0, -46800000,
 				0 };
 		for (int i = 0; i < min.length; i++) {
 			if (gc.getGreatestMinimum(i) != min[i])
@@ -410,7 +410,7 @@
 		BitSet result = new BitSet();
 		Vector values = new Vector();
 		int[] max = { 1, 292278994, 11, 53, 6, 31, 366, 7, 6, 1, 11, 23, 59,
-				59, 999, 43200000, 3600000 };
+				59, 999, 50400000, 3600000 };
 		for (int i = 0; i < max.length; i++) {
 			if (gc.getMaximum(i) != max[i]) {
 				result.set(i);
@@ -437,7 +437,7 @@
 				0, gc.getMinimum(Calendar.HOUR));
 
 		BitSet result = new BitSet();
-		int[] min = { 0, 1, 0, 1, 0, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0, -43200000,
+		int[] min = { 0, 1, 0, 1, 0, 1, 1, 1, -1, 0, 0, 0, 0, 0, 0, -46800000,
 				0 };
 		for (int i = 0; i < min.length; i++) {
 			if (gc.getMinimum(i) != min[i])