changeset 10359:533ab69df008

Merge
author coffeys
date Fri, 01 Aug 2014 11:05:33 +0100
parents 2325404d9b06 5a32bb851674
children 219a05b62d8a
files .hgtags javax/management/remote/security/CacheMapRemovalTest.java
diffstat 6 files changed, 32 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Jul 30 11:10:38 2014 -0700
+++ b/.hgtags	Fri Aug 01 11:05:33 2014 +0100
@@ -309,6 +309,9 @@
 693025bbc45d683676fa78bb76201b665e0d8f2d jdk8u20-b21
 0c2393744b29175de5204140d4dfbf12ca3d364f jdk8u20-b22
 be30cb2a3088f2b7b334b499f7eddbd5312312a7 jdk8u20-b23
+dfb9f24d56b51e5a2ca26e77fc69a2464d51a4d3 jdk8u20-b24
+dfb9f24d56b51e5a2ca26e77fc69a2464d51a4d3 jdk8u20-b25
+dd229c5f57bff4e75a70908294a13072b9a48385 jdk8u20-b26
 abca9f6f1a10e9f91b2538bbe7870f54f550d986 jdk8u25-b00
 7d0627679c9fdeaaaa9fe15c7cc11af0763621ec jdk8u25-b01
 b0277ec994b751ebb761814675352506cd56bcd6 jdk8u25-b02
@@ -318,4 +321,6 @@
 5b80b4b22b4ca0b630c7f1cec3605da7694168e2 jdk8u25-b06
 0e0a35b0bf0ff5852026c50038d5c2ecb26c075c jdk8u25-b07
 d7d221f56fd17b96bab4440448641a844f9e92cd jdk8u25-b08
+0c6cf43c5bcf0917d07a1bc94adb7a091f18f32c jdk8u25-b09
+1317d94e95861a47fee8258903b652af70a3493c jdk8u25-b10
 f935349e2c065487c745bc41f81ddc7869bd2d2d jdk8u31-b00
--- a/THIRD_PARTY_README	Wed Jul 30 11:10:38 2014 -0700
+++ b/THIRD_PARTY_README	Fri Aug 01 11:05:33 2014 +0100
@@ -2,7 +2,7 @@
 -----------------------------
 
 %% This notice is provided with respect to ASM Bytecode Manipulation 
-Framework v5.0, which may be included with JRE 8, and JDK 8, and 
+Framework v5.0.3, which may be included with JRE 8, and JDK 8, and 
 OpenJDK 8.
 
 --- begin of LICENSE ---
@@ -3349,14 +3349,14 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to zlib v1.2.5, which may be included 
+%% This notice is provided with respect to zlib v1.2.8, which may be included 
 with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
-  version 1.2.5, July 18th, 2005
-
-  Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+  version 1.2.8, April 28th, 2013
+
+  Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -3382,11 +3382,11 @@
 -------------------------------------------------------------------------------
 
 %% This notice is provided with respect to the following which may be 
-included with JRE 8, JDK 8, and OpenJDK 8, except where noted:
-
-  Apache Commons Math 2.2
-  Apache Derby 10.10.1.2        [included with JDK 8]
-  Apache Jakarta BCEL 5.2 
+included with JRE 8, JDK 8, and OpenJDK 8.
+
+  Apache Commons Math 3.2
+  Apache Derby 10.10.1.3        
+  Apache Jakarta BCEL 5.1 
   Apache Jakarta Regexp 1.4 
   Apache Santuario XML Security for Java 1.5.4
   Apache Xalan-Java 2.7.1 
--- a/javax/management/remote/security/CacheMapRemovalTest.java	Wed Jul 30 11:10:38 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2014, 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.
- *
- */
-
-/**
- * @test
- * @bug 8029755
- * @summary Test that class com/sun/jmx/remote/util/CacheMap and fields principalsCache, accCache of SubjectDelegator were removed
- *
- * @compile CacheMapRemovalTest.java
- * @run main CacheMapRemovalTest
- */
-public class CacheMapRemovalTest {
-    public static void main(String[] args) {
-        try {
-            Class.forName("com.sun.jmx.remote.util.CacheMap");
-            throw new AssertionError("Class CacheMap was not removed");
-        } catch (ClassNotFoundException e) {
-            System.out.println("com.sun.jmx.remote.util.CacheMap removal verified");
-        }
-
-        try {
-            com.sun.jmx.remote.security.SubjectDelegator.class.getDeclaredField("principalsCache");
-            throw new AssertionError("principalsCache field of SubjectDelegator was not removed");
-        } catch (NoSuchFieldException e) {
-            System.out.println("principalsCache field of SubjectDelegator removal verified");
-        }
-
-        try {
-            com.sun.jmx.remote.security.SubjectDelegator.class.getDeclaredField("accCache");
-            throw new AssertionError("accCache field of SubjectDelegator was not removed");
-        } catch (NoSuchFieldException e) {
-            System.out.println("accCache field of SubjectDelegator removal verified");
-        }
-    }
-}
--- a/src/share/classes/java/util/Collections.java	Wed Jul 30 11:10:38 2014 -0700
+++ b/src/share/classes/java/util/Collections.java	Fri Aug 01 11:05:33 2014 +0100
@@ -3486,6 +3486,7 @@
          */
         @Override
         public void replaceAll(UnaryOperator<E> operator) {
+            Objects.requireNonNull(operator);
             list.replaceAll(e -> typeCheck(operator.apply(e)));
         }
 
--- a/src/share/classes/sun/security/smartcardio/CardImpl.java	Wed Jul 30 11:10:38 2014 -0700
+++ b/src/share/classes/sun/security/smartcardio/CardImpl.java	Fri Aug 01 11:05:33 2014 +0100
@@ -244,9 +244,6 @@
                     "sun.security.smartcardio.invertCardReset", "false")));
 
     public void disconnect(boolean reset) throws CardException {
-        if (invertReset) {
-            reset = !reset;
-        }
         if (reset) {
             checkSecurity("reset");
         }
@@ -254,6 +251,10 @@
             return;
         }
         checkExclusive();
+        // to preserve old behaviour, don't change flag until here
+        if (invertReset) {
+            reset = !reset;
+        }
         try {
             SCardDisconnect(cardId, (reset ? SCARD_RESET_CARD : SCARD_LEAVE_CARD));
         } catch (PCSCException e) {
--- a/test/java/util/Collections/CheckedListReplaceAll.java	Wed Jul 30 11:10:38 2014 -0700
+++ b/test/java/util/Collections/CheckedListReplaceAll.java	Fri Aug 01 11:05:33 2014 +0100
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug     8047795
+ * @bug     8047795 8053938
  * @summary Ensure that replaceAll operator cannot add bad elements
  * @author  Mike Duigou
  */
@@ -46,5 +46,16 @@
             thwarted.printStackTrace(System.out);
             System.out.println("Curses! Foiled again!");
         }
+
+        unwrapped = Arrays.asList(new Object[]{});  // Empty list
+        wrapped = Collections.checkedList(unwrapped, Integer.class);
+        try {
+            wrapped.replaceAll((UnaryOperator)null);
+            System.out.printf("Bwahaha! I have defeated you! %s\n", wrapped);
+            throw new RuntimeException("NPE not thrown when passed a null operator");
+        } catch (NullPointerException thwarted) {
+            thwarted.printStackTrace(System.out);
+            System.out.println("Curses! Foiled again!");
+        }
     }
 }