Merge
authortbell
Thu, 05 Jun 2008 17:43:14 -0700
changeset 632 4b8993fe7c75
parent 631 4e1369a69677 (diff)
parent 572 18dc4ba4739a (current diff)
child 633 e2cd5eaa47dc
child 640 ccf0a4179457
child 690 0bf7af5e8a3b
Merge
jdk/src/solaris/classes/sun/java2d/SurfaceManagerFactory.java
jdk/src/windows/classes/sun/java2d/SurfaceManagerFactory.java
--- a/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Wed Jul 05 16:37:21 2017 +0200
+++ b/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java	Thu Jun 05 17:43:14 2008 -0700
@@ -1696,8 +1696,8 @@
             } catch (Exception e) {
                 // eat exceptions because interface doesn't have an
                 // exception on it
-                if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
-                    MODELMBEAN_LOGGER.logp(Level.WARNING,
+                if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
+                    MODELMBEAN_LOGGER.logp(Level.FINER,
                             RequiredModelMBean.class.getName(),
                         "getAttributes(String[])",
                             "Failed to get \"" + attrNames[i] + "\": ", e);
@@ -1857,8 +1857,8 @@
                                             attrValue.getClass().getName() +
                                                            " received.");
                     } catch (ClassNotFoundException x) {
-                        if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
-                            MODELMBEAN_LOGGER.logp(Level.WARNING,
+                        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
+                            MODELMBEAN_LOGGER.logp(Level.FINER,
                                     RequiredModelMBean.class.getName(),
                                 "setAttribute(Attribute)","Class " +
                                     attrType + " for attribute "
@@ -2224,8 +2224,8 @@
                             ntfyObj.getMessage() + " Severity = " +
                             (String)ntfyDesc.getFieldValue("severity"));
                     } catch (Exception e) {
-                        if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
-                            MODELMBEAN_LOGGER.logp(Level.WARNING,
+                        if (MODELMBEAN_LOGGER.isLoggable(Level.FINE)) {
+                            MODELMBEAN_LOGGER.logp(Level.FINE,
                                     RequiredModelMBean.class.getName(),
                                     "sendNotification(Notification)",
                                     "Failed to log " +
@@ -2618,8 +2618,8 @@
                            " Old value = " + oldv +
                            " New value = " + newv);
                     } catch (Exception e) {
-                        if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
-                            MODELMBEAN_LOGGER.logp(Level.WARNING,
+                        if (MODELMBEAN_LOGGER.isLoggable(Level.FINE)) {
+                            MODELMBEAN_LOGGER.logp(Level.FINE,
                                     RequiredModelMBean.class.getName(),mth,
                                 "Failed to log " + ntfyObj.getType() +
                                     " notification: ", e);
@@ -2644,8 +2644,8 @@
                            " Old value = " + oldv +
                            " New value = " + newv);
                     } catch (Exception e) {
-                        if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) {
-                            MODELMBEAN_LOGGER.logp(Level.WARNING,
+                        if (MODELMBEAN_LOGGER.isLoggable(Level.FINE)) {
+                            MODELMBEAN_LOGGER.logp(Level.FINE,
                                     RequiredModelMBean.class.getName(),mth,
                                 "Failed to log " + ntfyObj.getType() +
                                     " notification: ", e);
--- a/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java	Wed Jul 05 16:37:21 2017 +0200
+++ b/jdk/src/share/classes/sun/security/provider/certpath/OCSPChecker.java	Thu Jun 05 17:43:14 2008 -0700
@@ -102,7 +102,7 @@
      */
     public void init(boolean forward) throws CertPathValidatorException {
         if (!forward) {
-            remainingCerts = certs.length;
+            remainingCerts = certs.length + 1;
         } else {
             throw new CertPathValidatorException(
                 "Forward checking not supported");
@@ -131,14 +131,22 @@
 
         InputStream in = null;
         OutputStream out = null;
+
+        // Decrement the certificate counter
+        remainingCerts--;
+
         try {
-            // Examine OCSP properties
             X509Certificate responderCert = null;
             boolean seekResponderCert = false;
             X500Principal responderSubjectName = null;
             X500Principal responderIssuerName = null;
             BigInteger responderSerialNumber = null;
 
+            boolean seekIssuerCert = true;
+            X509CertImpl issuerCertImpl = null;
+            X509CertImpl currCertImpl =
+                X509CertImpl.toImpl((X509Certificate)cert);
+
             /*
              * OCSP security property values, in the following order:
              *   1. ocsp.responderURL
@@ -148,6 +156,9 @@
              */
             String[] properties = getOCSPProperties();
 
+            // Check whether OCSP is feasible before seeking cert information
+            URL url = getOCSPServerURL(currCertImpl, properties);
+
             // When responder's subject name is set then the issuer/serial
             // properties are ignored
             if (properties[1] != null) {
@@ -172,14 +183,9 @@
                 seekResponderCert = true;
             }
 
-            boolean seekIssuerCert = true;
-            X509CertImpl issuerCertImpl = null;
-            X509CertImpl currCertImpl =
-                X509CertImpl.toImpl((X509Certificate)cert);
-            remainingCerts--;
-
-            // Set the issuer certificate
-            if (remainingCerts != 0) {
+            // Set the issuer certificate to the next cert in the chain
+            // (unless we're processing the final cert).
+            if (remainingCerts < certs.length) {
                 issuerCertImpl = X509CertImpl.toImpl(certs[remainingCerts]);
                 seekIssuerCert = false; // done
 
@@ -312,7 +318,8 @@
             // Construct an OCSP Request
             OCSPRequest ocspRequest =
                 new OCSPRequest(currCertImpl, issuerCertImpl);
-            URL url = getOCSPServerURL(currCertImpl, properties);
+
+            // Use the URL to the OCSP service that was created earlier
             HttpURLConnection con = (HttpURLConnection)url.openConnection();
             if (DEBUG != null) {
                 DEBUG.println("connecting to OCSP service at: " + url);
--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c	Wed Jul 05 16:37:21 2017 +0200
+++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c	Thu Jun 05 17:43:14 2008 -0700
@@ -358,15 +358,28 @@
              * See 6343810.
              */
             while (1) {
-                fd_set wr, ex;
+#ifndef USE_SELECT
+                {
+fprintf(stdout,"\nNATIVE: fd = %d] ", fd);
+                    struct pollfd pfd;
+                    pfd.fd = fd;
+                    pfd.events = POLLOUT;
 
-                FD_ZERO(&wr);
-                FD_SET(fd, &wr);
-                FD_ZERO(&ex);
-                FD_SET(fd, &ex);
+                    connect_rv = NET_Poll(&pfd, 1, -1);
+                }
+#else
+                {
+                    fd_set wr, ex;
 
-                errno = 0;
-                connect_rv = NET_Select(fd+1, 0, &wr, &ex, 0);
+                    FD_ZERO(&wr);
+                    FD_SET(fd, &wr);
+                    FD_ZERO(&ex);
+                    FD_SET(fd, &ex);
+
+                    connect_rv = NET_Select(fd+1, 0, &wr, &ex, 0);
+                }
+#endif
+
                 if (connect_rv == JVM_IO_ERR) {
                     if (errno == EINTR) {
                         continue;
--- a/jdk/test/javax/management/Introspector/LegacyIntrospectorTest.java	Wed Jul 05 16:37:21 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * Copyright 2005 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- */
-
-/*
- * @test
- * @bug 6316460
- * @summary Test that the legacy com.sun.management.jmx.Introspector
- * methods work.
- * @author Eamonn McManus
- * @run clean LegacyIntrospectorTest
- * @run build LegacyIntrospectorTest
- * @run main LegacyIntrospectorTest
- */
-
-import javax.management.*;
-import com.sun.management.jmx.*;
-
-public class LegacyIntrospectorTest {
-    public static interface TestMBean {
-        public int getWhatever();
-    }
-    public static class Test implements TestMBean {
-        public int getWhatever() {return 0;}
-    }
-
-    @SuppressWarnings("deprecation")
-    public static void main(String[] args) throws Exception {
-        MBeanInfo mbi = Introspector.testCompliance(Test.class);
-        MBeanAttributeInfo mbai = mbi.getAttributes()[0];
-        if (!mbai.getName().equals("Whatever"))
-            throw new Exception("Wrong attribute name: " + mbai.getName());
-        Class c = Introspector.getMBeanInterface(Test.class);
-        if (c != TestMBean.class)
-            throw new Exception("Wrong interface: " + c);
-
-        MBeanServer mbs1 = new MBeanServerImpl();
-        if (!mbs1.getDefaultDomain().equals("DefaultDomain"))
-            throw new Exception("Wrong default domain: " + mbs1.getDefaultDomain());
-
-        MBeanServer mbs2 = new MBeanServerImpl("Foo");
-        if (!mbs2.getDefaultDomain().equals("Foo"))
-            throw new Exception("Wrong default domain: " + mbs2.getDefaultDomain());
-
-        ObjectName delegateName =
-            new ObjectName("JMImplementation:type=MBeanServerDelegate");
-        MBeanInfo delegateInfo = mbs2.getMBeanInfo(delegateName);
-        MBeanInfo refDelegateInfo =
-            MBeanServerFactory.newMBeanServer().getMBeanInfo(delegateName);
-        if (!delegateInfo.equals(refDelegateInfo))
-            throw new Exception("Wrong delegate info from MBeanServerImpl: " +
-                                delegateInfo);
-
-        System.out.println("TEST PASSED");
-    }
-}
--- a/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java	Wed Jul 05 16:37:21 2017 +0200
+++ b/jdk/test/sun/security/pkcs11/Cipher/TestSymmCiphers.java	Thu Jun 05 17:43:14 2008 -0700
@@ -2,32 +2,22 @@
  * Copyright 2008 Sun Microsystems, Inc.  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 modi
-fy it
- * under the terms of the GNU General Public License version 2 onl
-y, as
+ * 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, bu
-t WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABIL
-ITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public L
-icense
- * version 2 for more details (a copy is included in the LICENSE f
-ile that
+ * 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 Licen
-se version
- * 2 along with this work; if not, write to the Free Software Foun
-dation,
+ * 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 Sun Microsystems, Inc., 4150 Network Circle, San
-ta Clara,
- * CA 95054 USA or visit www.sun.com if you need additional inform
-ation or
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
  * have any questions.
  */
 
--- a/jdk/test/sun/security/tools/keytool/autotest.sh	Wed Jul 05 16:37:21 2017 +0200
+++ b/jdk/test/sun/security/tools/keytool/autotest.sh	Thu Jun 05 17:43:14 2008 -0700
@@ -1,5 +1,5 @@
 #
-# Copyright 2006 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2006-2008 Sun Microsystems, Inc.  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
@@ -90,7 +90,8 @@
 
 echo | ${TESTJAVA}${FS}bin${FS}java -Dfile -Dnss \
    -Dnss.lib=${NSS}${FS}lib${FS}${PF}${FS}${LIBNAME} \
-   KeyToolTest || exit 12
+   KeyToolTest
+status=$?
 
 rm -f p11-nss.txt
 rm -f cert8.db
@@ -101,4 +102,5 @@
 rm KeyToolTest.class
 rm TestException.class 
 
-exit $?
+exit $status
+