Merge
authorduke
Wed, 05 Jul 2017 21:09:40 +0200
changeset 34746 be3fcc9b7a78
parent 34745 995895614a53 (diff)
parent 34741 6f034bebd711 (current diff)
child 34748 3b2cde99bd99
Merge
hotspot/src/cpu/x86/vm/templateInterpreter_x86_32.cpp
hotspot/src/cpu/x86/vm/templateInterpreter_x86_64.cpp
hotspot/src/os/aix/vm/thread_aix.inline.hpp
hotspot/src/os/bsd/vm/thread_bsd.inline.hpp
hotspot/src/os/linux/vm/thread_linux.inline.hpp
hotspot/src/os/solaris/vm/thread_solaris.inline.hpp
hotspot/src/os/windows/vm/thread_windows.inline.hpp
hotspot/src/os_cpu/aix_ppc/vm/threadLS_aix_ppc.cpp
hotspot/src/os_cpu/aix_ppc/vm/threadLS_aix_ppc.hpp
hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.cpp
hotspot/src/os_cpu/bsd_x86/vm/threadLS_bsd_x86.hpp
hotspot/src/os_cpu/bsd_zero/vm/threadLS_bsd_zero.cpp
hotspot/src/os_cpu/bsd_zero/vm/threadLS_bsd_zero.hpp
hotspot/src/os_cpu/linux_aarch64/vm/threadLS_linux_aarch64.cpp
hotspot/src/os_cpu/linux_aarch64/vm/threadLS_linux_aarch64.hpp
hotspot/src/os_cpu/linux_ppc/vm/threadLS_linux_ppc.cpp
hotspot/src/os_cpu/linux_ppc/vm/threadLS_linux_ppc.hpp
hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.cpp
hotspot/src/os_cpu/linux_sparc/vm/threadLS_linux_sparc.hpp
hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.cpp
hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.cpp
hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.hpp
hotspot/src/os_cpu/solaris_sparc/vm/threadLS_solaris_sparc.cpp
hotspot/src/os_cpu/solaris_sparc/vm/threadLS_solaris_sparc.hpp
hotspot/src/os_cpu/solaris_x86/vm/threadLS_solaris_x86.cpp
hotspot/src/os_cpu/solaris_x86/vm/threadLS_solaris_x86.hpp
hotspot/src/os_cpu/windows_x86/vm/threadLS_windows_x86.cpp
hotspot/src/os_cpu/windows_x86/vm/threadLS_windows_x86.hpp
hotspot/src/share/vm/gc/g1/g1RootClosures.inline.hpp
hotspot/src/share/vm/runtime/threadLocalStorage.cpp
hotspot/test/runtime/logging/SafepointTestMain.java
hotspot/test/runtime/logging/VMOperationTestMain.java
jdk/src/java.base/share/classes/sun/misc/BASE64Decoder.java
jdk/src/java.base/share/classes/sun/misc/BASE64Encoder.java
jdk/src/java.base/share/classes/sun/misc/CharacterDecoder.java
jdk/src/java.base/share/classes/sun/misc/CharacterEncoder.java
jdk/src/java.base/share/classes/sun/misc/HexDumpEncoder.java
jdk/src/java.base/share/classes/sun/misc/ProxyGenerator.java
jdk/src/java.base/share/classes/sun/misc/Queue.java
jdk/src/java.base/share/classes/sun/misc/Request.java
jdk/src/java.base/share/classes/sun/misc/RequestProcessor.java
jdk/src/java.base/share/classes/sun/misc/UCDecoder.java
jdk/src/java.base/share/classes/sun/misc/UCEncoder.java
jdk/src/java.base/share/classes/sun/misc/UUDecoder.java
jdk/src/java.base/share/classes/sun/misc/UUEncoder.java
jdk/src/java.base/share/native/libzip/ZipFile.c
jdk/test/sun/misc/Encode/DecodeBuffer.java
jdk/test/sun/misc/Encode/Encode.java
jdk/test/sun/misc/Encode/GetBytes.java
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/arrays/LongArrayData.java
--- a/jaxp/.hgtags	Wed Jul 05 21:09:35 2017 +0200
+++ b/jaxp/.hgtags	Wed Jul 05 21:09:40 2017 +0200
@@ -340,3 +340,4 @@
 c8d0845877a811ab4350935892f826929359a3ff jdk-9+95
 1f3182529f2c474e5506955ccb3820cfa5822265 jdk-9+96
 9c107c050335d7ee63b2a8b38ca5d498f19713a2 jdk-9+97
+52b01339235f24c93b679bd6b8fb36a1072ad0ac jdk-9+98
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java	Wed Jul 05 21:09:35 2017 +0200
+++ b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java	Wed Jul 05 21:09:40 2017 +0200
@@ -357,7 +357,7 @@
      *      The length of the duration in milliseconds.
      */
     protected DurationImpl(final long durationInMilliSeconds) {
-
+        boolean is0x8000000000000000L = false;
         long l = durationInMilliSeconds;
 
         if (l > 0) {
@@ -368,6 +368,7 @@
             if (l == 0x8000000000000000L) {
                 // negating 0x8000000000000000L causes an overflow
                 l++;
+                is0x8000000000000000L = true;
             }
             l *= -1;
         }
@@ -406,7 +407,8 @@
 
         // seconds & milliseconds
         int2long = (gregorianCalendar.get(Calendar.SECOND) * 1000)
-                    + gregorianCalendar.get(Calendar.MILLISECOND);
+                    + gregorianCalendar.get(Calendar.MILLISECOND)
+                    + (is0x8000000000000000L ? 1 : 0);
         this.seconds = BigDecimal.valueOf(int2long, 3);
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/jaxp/test/javax/xml/jaxp/unittest/datatype/JDK8068839Test.java	Wed Jul 05 21:09:40 2017 +0200
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package datatype;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/*
+ * @bug 8068839
+ * @summary Verifies that Duration's edge cases
+ */
+public class JDK8068839Test {
+
+    @Test
+    public void test() throws DatatypeConfigurationException {
+        DatatypeFactory df = DatatypeFactory.newInstance();
+        Duration durationx = df.newDuration(Long.MIN_VALUE);
+        Assert.assertEquals(durationx.toString(), "-P292277024Y7M16DT7H12M55.808S");
+        durationx = df.newDuration(Long.MAX_VALUE);
+        Assert.assertEquals(durationx.toString(), "P292277024Y7M16DT7H12M55.807S");
+    }
+
+}