< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2004, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 30,39 **** --- 30,40 ---- import java.io.ObjectInputStream; import java.io.Serializable; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; + import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.Locale; import java.util.TimeZone;
*** 188,198 **** * @author Kohsuke Kawaguchi * @author Joseph Fialli * @author Sunitha Reddy * @see javax.xml.datatype.Duration * @since 1.5 ! * @LastModified: June 2018 */ public class XMLGregorianCalendarImpl extends XMLGregorianCalendar implements Serializable, Cloneable { --- 189,199 ---- * @author Kohsuke Kawaguchi * @author Joseph Fialli * @author Sunitha Reddy * @see javax.xml.datatype.Duration * @since 1.5 ! * @LastModified: Aug 2020 */ public class XMLGregorianCalendarImpl extends XMLGregorianCalendar implements Serializable, Cloneable {
*** 1718,1729 **** } XMLGregorianCalendar gc = this; if (timezone != 0) { gc = this.normalizeToTimezone(getTimezone()); } ! return gc.getYear() + gc.getMonth() + gc.getDay() + ! gc.getHour() + gc.getMinute() + gc.getSecond(); } /** * <p>Constructs a new XMLGregorianCalendar object by --- 1719,1732 ---- } XMLGregorianCalendar gc = this; if (timezone != 0) { gc = this.normalizeToTimezone(getTimezone()); } ! ! int[] elements = {gc.getYear(), gc.getMonth(), gc.getDay(), gc.getHour(), ! gc.getMinute(), gc.getSecond(), gc.getMillisecond()}; ! return Arrays.hashCode(elements); } /** * <p>Constructs a new XMLGregorianCalendar object by
< prev index next >