Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr
In directory sc8-pr-cvs1:/tmp/cvs-serv30238/com/sun/xacml/attr
Modified Files:
TimeAttribute.java
Log Message:
fixed a corner case bug with the mod code in init
Index: TimeAttribute.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr/TimeAttribute.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TimeAttribute.java 25 Aug 2003 16:49:17 -0000 1.3
--- TimeAttribute.java 26 Aug 2003 14:39:33 -0000 1.4
***************
*** 235,240 ****
// Check that the date is normalized to 1/1/70
! if ((timeGMT >= DateAttribute.MILLIS_PER_DAY) || (timeGMT < 0))
timeGMT = timeGMT % DateAttribute.MILLIS_PER_DAY;
}
--- 235,245 ----
// Check that the date is normalized to 1/1/70
! if ((timeGMT >= DateAttribute.MILLIS_PER_DAY) || (timeGMT < 0)) {
timeGMT = timeGMT % DateAttribute.MILLIS_PER_DAY;
+
+ // if we had a negative value then we need to shift by a day
+ if (timeGMT < 0)
+ timeGMT += DateAttribute.MILLIS_PER_DAY;
+ }
}
|