You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-cvs@xml.apache.org by mr...@apache.org on 2007/07/14 19:25:12 UTC
svn commit: r556301 -
/xml/commons/trunk/java/external/src/javax/xml/datatype/XMLGregorianCalendar.java
Author: mrglavas
Date: Sat Jul 14 10:25:11 2007
New Revision: 556301
URL: http://svn.apache.org/viewvc?view=rev&rev=556301
Log:
Fixing indentation.
Modified:
xml/commons/trunk/java/external/src/javax/xml/datatype/XMLGregorianCalendar.java
Modified: xml/commons/trunk/java/external/src/javax/xml/datatype/XMLGregorianCalendar.java
URL: http://svn.apache.org/viewvc/xml/commons/trunk/java/external/src/javax/xml/datatype/XMLGregorianCalendar.java?view=diff&rev=556301&r1=556300&r2=556301
==============================================================================
--- xml/commons/trunk/java/external/src/javax/xml/datatype/XMLGregorianCalendar.java (original)
+++ xml/commons/trunk/java/external/src/javax/xml/datatype/XMLGregorianCalendar.java Sat Jul 14 10:25:11 2007
@@ -395,7 +395,6 @@
* in <a href="#datetimefieldmapping">date/time field mapping table</a>.
*/
public abstract void setFractionalSecond(BigDecimal fractional);
-
/**
* <p>Set time as one unit, including the optional infinite precision
@@ -425,7 +424,6 @@
setSecond(second);
setFractionalSecond(fractional);
}
-
/**
* <p>Set time as one unit, including optional milliseconds.</p>
@@ -684,25 +682,25 @@
*/
public int hashCode() {
- // Following two dates compare to EQUALS since in different timezones.
- // 2000-01-15T12:00:00-05:00 == 2000-01-15T13:00:00-04:00
- //
- // Must ensure both instances generate same hashcode by normalizing
- // this to UTC timezone.
- int timezone = getTimezone();
- if (timezone == DatatypeConstants.FIELD_UNDEFINED) {
- timezone = 0;
- }
- XMLGregorianCalendar gc = this;
- if (timezone != 0) {
- gc = this.normalize();
- }
- return gc.getYear()
- + gc.getMonth()
- + gc.getDay()
- + gc.getHour()
- + gc.getMinute()
- + gc.getSecond();
+ // Following two dates compare to EQUALS since in different timezones.
+ // 2000-01-15T12:00:00-05:00 == 2000-01-15T13:00:00-04:00
+ //
+ // Must ensure both instances generate same hashcode by normalizing
+ // this to UTC timezone.
+ int timezone = getTimezone();
+ if (timezone == DatatypeConstants.FIELD_UNDEFINED) {
+ timezone = 0;
+ }
+ XMLGregorianCalendar gc = this;
+ if (timezone != 0) {
+ gc = this.normalize();
+ }
+ return gc.getYear()
+ + gc.getMonth()
+ + gc.getDay()
+ + gc.getHour()
+ + gc.getMinute()
+ + gc.getSecond();
}
/**
@@ -1036,12 +1034,10 @@
*/
public abstract TimeZone getTimeZone(int defaultZoneoffset);
-
-
/**
* <p>Creates and returns a copy of this object.</p>
*
* @return copy of this <code>Object</code>
*/
- public abstract Object clone();
+ public abstract Object clone();
}