From: <ls...@us...> - 2012-08-19 13:34:12
|
Revision: 5928 http://jnode.svn.sourceforge.net/jnode/?rev=5928&view=rev Author: lsantha Date: 2012-08-19 13:34:02 +0000 (Sun, 19 Aug 2012) Log Message: ----------- Integrating OpenJDK 6 build 25. Modified Paths: -------------- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/dynamicany/DynAnyFactoryImpl.java classlib6/core/src/openjdk/com/com/sun/corba/se/impl/dynamicany/DynAnyImpl.java classlib6/core/src/openjdk/com/com/sun/corba/se/impl/io/IIOPInputStream.java classlib6/core/src/openjdk/com/com/sun/media/sound/DirectAudioDevice.java classlib6/core/src/openjdk/com/com/sun/media/sound/SoftMixingSourceDataLine.java classlib6/core/src/openjdk/com/com/sun/net/ssl/HttpsURLConnection.java classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/utils/Base64.java classlib6/core/src/openjdk/com/com/sun/org/omg/SendingContext/_CodeBaseImplBase.java classlib6/core/src/openjdk/com/com/sun/security/auth/LdapPrincipal.java classlib6/core/src/openjdk/com/com/sun/security/sasl/CramMD5Client.java classlib6/core/src/openjdk/com/com/sun/security/sasl/CramMD5Server.java classlib6/core/src/openjdk/com/com/sun/security/sasl/ExternalClient.java classlib6/core/src/openjdk/com/com/sun/security/sasl/gsskerb/GssKrb5Client.java classlib6/core/src/openjdk/com/com/sun/security/sasl/gsskerb/GssKrb5Server.java classlib6/core/src/openjdk/java/java/awt/AWTKeyStroke.java classlib6/core/src/openjdk/java/java/io/InputStream.java classlib6/core/src/openjdk/java/java/io/ObjectStreamClass.java classlib6/core/src/openjdk/java/java/net/URI.java classlib6/core/src/openjdk/java/java/nio/charset/package.html classlib6/core/src/openjdk/java/java/sql/Timestamp.java classlib6/core/src/openjdk/java/java/util/TimeZone.java classlib6/core/src/openjdk/java/java/util/concurrent/atomic/AtomicReferenceArray.java classlib6/core/src/openjdk/javax/javax/management/remote/JMXServiceURL.java classlib6/core/src/openjdk/javax/javax/naming/ldap/LdapName.java classlib6/core/src/openjdk/javax/javax/naming/ldap/Rdn.java classlib6/core/src/openjdk/javax/javax/net/ssl/HttpsURLConnection.java classlib6/core/src/openjdk/javax/javax/net/ssl/SSLContext.java classlib6/core/src/openjdk/javax/javax/print/DocFlavor.java classlib6/core/src/openjdk/javax/javax/swing/ImageIcon.java classlib6/core/src/openjdk/langtools/com/sun/tools/javadoc/JavadocTool.java classlib6/core/src/openjdk/sun/sun/awt/image/PNGImageDecoder.java classlib6/core/src/openjdk/sun/sun/font/FileFontStrike.java classlib6/core/src/openjdk/sun/sun/java2d/pipe/DrawImage.java classlib6/core/src/openjdk/sun/sun/misc/SharedSecrets.java classlib6/core/src/openjdk/sun/sun/net/ResourceManager.java classlib6/core/src/openjdk/sun/sun/net/httpserver/Request.java classlib6/core/src/openjdk/sun/sun/net/httpserver/ServerConfig.java classlib6/core/src/openjdk/sun/sun/net/www/protocol/http/HttpURLConnection.java classlib6/core/src/openjdk/sun/sun/net/www/protocol/https/HttpsClient.java classlib6/core/src/openjdk/sun/sun/reflect/annotation/AnnotationInvocationHandler.java classlib6/core/src/openjdk/sun/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java classlib6/core/src/openjdk/sun/sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java classlib6/core/src/openjdk/sun/sun/reflect/annotation/TypeNotPresentExceptionProxy.java classlib6/core/src/openjdk/sun/sun/rmi/registry/RegistryImpl.java classlib6/core/src/openjdk/sun/sun/rmi/server/LoaderHandler.java classlib6/core/src/openjdk/sun/sun/rmi/server/UnicastServerRef.java classlib6/core/src/openjdk/sun/sun/security/jgss/krb5/InitialToken.java classlib6/core/src/openjdk/sun/sun/security/jgss/spnego/NegTokenInit.java classlib6/core/src/openjdk/sun/sun/security/jgss/spnego/SpNegoContext.java classlib6/core/src/openjdk/sun/sun/security/krb5/internal/ccache/CCacheInputStream.java classlib6/core/src/openjdk/sun/sun/security/krb5/internal/ccache/FileCredentialsCache.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/ForwardBuilder.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/ForwardState.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/PKIXCertPathValidator.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/ReverseBuilder.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/ReverseState.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/SunCertPathBuilder.java classlib6/core/src/openjdk/sun/sun/security/ssl/AppOutputStream.java classlib6/core/src/openjdk/sun/sun/security/ssl/CipherBox.java classlib6/core/src/openjdk/sun/sun/security/ssl/CipherSuite.java classlib6/core/src/openjdk/sun/sun/security/ssl/EngineArgs.java classlib6/core/src/openjdk/sun/sun/security/ssl/EngineOutputRecord.java classlib6/core/src/openjdk/sun/sun/security/ssl/Record.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLEngineImpl.java classlib6/core/src/openjdk/sun/sun/security/ssl/SSLSocketImpl.java classlib6/core/src/openjdk/sun/sun/security/validator/SimpleValidator.java classlib6/core/src/openjdk/sun/sun/security/validator/ValidatorException.java classlib6/core/src/openjdk/sun/sun/tools/jconsole/VMPanel.java Added Paths: ----------- classlib6/core/src/openjdk/sun/sun/misc/JavaAWTAccess.java classlib6/core/src/openjdk/sun/sun/security/provider/certpath/UntrustedChecker.java classlib6/core/src/openjdk/sun/sun/security/util/UntrustedCertificates.java Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/dynamicany/DynAnyFactoryImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/dynamicany/DynAnyFactoryImpl.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/dynamicany/DynAnyFactoryImpl.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 @@ -82,6 +82,6 @@ private String[] __ids = { "IDL:omg.org/DynamicAny/DynAnyFactory:1.0" }; public String[] _ids() { - return __ids; + return (String[])__ids.clone(); } } Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/dynamicany/DynAnyImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/dynamicany/DynAnyImpl.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/dynamicany/DynAnyImpl.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 @@ -195,6 +195,6 @@ private String[] __ids = { "IDL:omg.org/DynamicAny/DynAny:1.0" }; public String[] _ids() { - return __ids; + return (String[])__ids.clone(); } } Modified: classlib6/core/src/openjdk/com/com/sun/corba/se/impl/io/IIOPInputStream.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/corba/se/impl/io/IIOPInputStream.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/corba/se/impl/io/IIOPInputStream.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2011, 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 @@ -2239,6 +2239,10 @@ } try { + Class fieldCl = fields[i].getClazz(); + if (objectValue != null && !fieldCl.isInstance(objectValue)) { + throw new IllegalArgumentException(); + } bridge.putObject( o, fields[i].getFieldID(), objectValue ) ; // reflective code: fields[i].getField().set( o, objectValue ) ; } catch (IllegalArgumentException e) { @@ -2549,6 +2553,10 @@ { try { Field fld = c.getDeclaredField( fieldName ) ; + Class fieldCl = fld.getType(); + if(v != null && !fieldCl.isInstance(v)) { + throw new Exception(); + } long key = bridge.objectFieldOffset( fld ) ; bridge.putObject( o, key, v ) ; } catch (Exception e) { Modified: classlib6/core/src/openjdk/com/com/sun/media/sound/DirectAudioDevice.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/media/sound/DirectAudioDevice.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/media/sound/DirectAudioDevice.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -771,7 +771,7 @@ if (off < 0) { throw new ArrayIndexOutOfBoundsException(off); } - if (off + len > b.length) { + if ((long)off + (long)len > (long)b.length) { throw new ArrayIndexOutOfBoundsException(b.length); } @@ -1000,7 +1000,7 @@ if (off < 0) { throw new ArrayIndexOutOfBoundsException(off); } - if (off + len > b.length) { + if ((long)off + (long)len > (long)b.length) { throw new ArrayIndexOutOfBoundsException(b.length); } if (!isActive() && doIO) { Modified: classlib6/core/src/openjdk/com/com/sun/media/sound/SoftMixingSourceDataLine.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/media/sound/SoftMixingSourceDataLine.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/media/sound/SoftMixingSourceDataLine.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -130,6 +130,12 @@ if (len % framesize != 0) throw new IllegalArgumentException( "Number of bytes does not represent an integral number of sample frames."); + if (off < 0) { + throw new ArrayIndexOutOfBoundsException(off); + } + if ((long)off + (long)len > (long)b.length) { + throw new ArrayIndexOutOfBoundsException(b.length); + } byte[] buff = cycling_buffer; int buff_len = cycling_buffer.length; Modified: classlib6/core/src/openjdk/com/com/sun/net/ssl/HttpsURLConnection.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/net/ssl/HttpsURLConnection.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/net/ssl/HttpsURLConnection.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 @@ -179,6 +179,12 @@ throw new IllegalArgumentException( "no SSLSocketFactory specified"); } + + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkSetFactory(); + } + sslSocketFactory = sf; } Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/utils/Base64.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/utils/Base64.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/utils/Base64.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -48,7 +48,7 @@ * @author Raul Benito(Of the xerces copy, and little adaptations). * @author Anli Shundi * @author Christian Geuer-Pollmann - * @see <A HREF="ftp://ftp.isi.edu/in-notes/rfc2045.txt">RFC 2045</A> + * @see <A HREF="http://www.ietf.org/rfc/rfc2045.txt">RFC 2045</A> * @see com.sun.org.apache.xml.internal.security.transforms.implementations.TransformBase64Decode */ public class Base64 { Modified: classlib6/core/src/openjdk/com/com/sun/org/omg/SendingContext/_CodeBaseImplBase.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/omg/SendingContext/_CodeBaseImplBase.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/org/omg/SendingContext/_CodeBaseImplBase.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 @@ -138,7 +138,7 @@ public String[] _ids () { - return __ids; + return (String[])__ids.clone(); } Modified: classlib6/core/src/openjdk/com/com/sun/security/auth/LdapPrincipal.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/security/auth/LdapPrincipal.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/security/auth/LdapPrincipal.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2012, 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 @@ -31,7 +31,7 @@ /** * A principal identified by a distinguished name as specified by - * <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a>. + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>. * * <p> * After successful authentication, a user {@link java.security.Principal} @@ -122,7 +122,7 @@ /** * Creates a string representation of this principal's name in the format - * defined by <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>. + * defined by <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>. * If the name has zero components an empty string is returned. * * @return The principal's string name. Modified: classlib6/core/src/openjdk/com/com/sun/security/sasl/CramMD5Client.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/security/sasl/CramMD5Client.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/security/sasl/CramMD5Client.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2012, 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 @@ -33,7 +33,7 @@ /** * Implements the CRAM-MD5 SASL client-side mechanism. - * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2195.txt">RFC 2195</A>). + * (<A HREF="http://www.ietf.org/rfc/rfc2195.txt">RFC 2195</A>). * CRAM-MD5 has no initial response. It receives bytes from * the server as a challenge, which it hashes by using MD5 and the password. * It concatenates the authentication ID with this result and returns it Modified: classlib6/core/src/openjdk/com/com/sun/security/sasl/CramMD5Server.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/security/sasl/CramMD5Server.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/security/sasl/CramMD5Server.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, 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 @@ -38,7 +38,7 @@ /** * Implements the CRAM-MD5 SASL server-side mechanism. - * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2195.txt">RFC 2195</A>). + * (<A HREF="http://www.ietf.org/rfc/rfc2195.txt">RFC 2195</A>). * CRAM-MD5 has no initial response. * * client <---- M={random, timestamp, server-fqdn} ------- server Modified: classlib6/core/src/openjdk/com/com/sun/security/sasl/ExternalClient.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/security/sasl/ExternalClient.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/security/sasl/ExternalClient.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2012, 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 @@ -29,7 +29,7 @@ /** * Implements the EXTERNAL SASL client mechanism. - * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2222.txt">RFC 2222</A>). + * (<A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>). * The EXTERNAL mechanism returns the optional authorization ID as * the initial response. It processes no challenges. * Modified: classlib6/core/src/openjdk/com/com/sun/security/sasl/gsskerb/GssKrb5Client.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/security/sasl/gsskerb/GssKrb5Client.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/security/sasl/gsskerb/GssKrb5Client.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2012, 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 @@ -39,10 +39,10 @@ /** * Implements the GSSAPI SASL client mechanism for Kerberos V5. - * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2222.txt">RFC 2222</A>, + * (<A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>, * <a HREF="http://www.ietf.org/internet-drafts/draft-ietf-cat-sasl-gssapi-04.txt">draft-ietf-cat-sasl-gssapi-04.txt</a>). * It uses the Java Bindings for GSSAPI - * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2853.txt">RFC 2853</A>) + * (<A HREF="http://www.ietf.org/rfc/rfc2853.txt">RFC 2853</A>) * for getting GSSAPI/Kerberos V5 support. * * The client/server interactions are: Modified: classlib6/core/src/openjdk/com/com/sun/security/sasl/gsskerb/GssKrb5Server.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/security/sasl/gsskerb/GssKrb5Server.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/com/com/sun/security/sasl/gsskerb/GssKrb5Server.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2012, 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 @@ -39,7 +39,7 @@ /** * Implements the GSSAPI SASL server mechanism for Kerberos V5. - * (<A HREF="ftp://ftp.isi.edu/in-notes/rfc2222.txt">RFC 2222</A>, + * (<A HREF="http://www.ietf.org/rfc/rfc2222.txt">RFC 2222</A>, * <a HREF="http://www.ietf.org/internet-drafts/draft-ietf-cat-sasl-gssapi-00.txt">draft-ietf-cat-sasl-gssapi-00.txt</a>). * * Expects thread's Subject to contain server's Kerberos credentials Modified: classlib6/core/src/openjdk/java/java/awt/AWTKeyStroke.java =================================================================== --- classlib6/core/src/openjdk/java/java/awt/AWTKeyStroke.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/java/java/awt/AWTKeyStroke.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, 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 @@ -25,6 +25,7 @@ package java.awt; import java.awt.event.KeyEvent; +import sun.awt.AppContext; import java.awt.event.InputEvent; import java.util.Collections; import java.util.HashMap; @@ -66,9 +67,6 @@ public class AWTKeyStroke implements Serializable { static final long serialVersionUID = -6430539691155161871L; - private static Map cache; - private static AWTKeyStroke cacheKey; - private static Constructor ctor = getCtor(AWTKeyStroke.class); private static Map modifierKeywords; /** * Associates VK_XXX (as a String) with code (as Integer). This is @@ -77,6 +75,25 @@ */ private static VKCollection vks; + //A key for the collection of AWTKeyStrokes within AppContext. + private static Object APP_CONTEXT_CACHE_KEY = new Object(); + //A key withing the cache + private static AWTKeyStroke APP_CONTEXT_KEYSTROKE_KEY = new AWTKeyStroke(); + + /* + * Reads keystroke class from AppContext and if null, puts there the + * AWTKeyStroke class. + * Must be called under locked AWTKeyStroke.class + */ + private static Class getAWTKeyStrokeClass() { + Class clazz = (Class)AppContext.getAppContext().get(AWTKeyStroke.class); + if (clazz == null) { + clazz = AWTKeyStroke.class; + AppContext.getAppContext().put(AWTKeyStroke.class, AWTKeyStroke.class); + } + return clazz; + } + private char keyChar = KeyEvent.CHAR_UNDEFINED; private int keyCode = KeyEvent.VK_UNDEFINED; private int modifiers; @@ -164,10 +181,13 @@ if (subclass == null) { throw new IllegalArgumentException("subclass cannot be null"); } - if (AWTKeyStroke.ctor.getDeclaringClass().equals(subclass)) { + synchronized (AWTKeyStroke.class) { + Class keyStrokeClass = (Class)AppContext.getAppContext().get(AWTKeyStroke.class); + if (keyStrokeClass != null && keyStrokeClass.equals(subclass)){ // Already registered return; } + } if (!AWTKeyStroke.class.isAssignableFrom(subclass)) { throw new ClassCastException("subclass is not derived from AWTKeyStroke"); } @@ -197,9 +217,9 @@ } synchronized (AWTKeyStroke.class) { - AWTKeyStroke.ctor = ctor; - cache = null; - cacheKey = null; + AppContext.getAppContext().put(AWTKeyStroke.class, subclass); + AppContext.getAppContext().remove(APP_CONTEXT_CACHE_KEY); + AppContext.getAppContext().remove(APP_CONTEXT_KEYSTROKE_KEY); } } @@ -229,13 +249,19 @@ private static synchronized AWTKeyStroke getCachedStroke (char keyChar, int keyCode, int modifiers, boolean onKeyRelease) { + Map cache = (Map)AppContext.getAppContext().get(APP_CONTEXT_CACHE_KEY); + AWTKeyStroke cacheKey = (AWTKeyStroke)AppContext.getAppContext().get(APP_CONTEXT_KEYSTROKE_KEY); + if (cache == null) { cache = new HashMap(); + AppContext.getAppContext().put(APP_CONTEXT_CACHE_KEY, cache); } if (cacheKey == null) { try { - cacheKey = (AWTKeyStroke)ctor.newInstance((Object[]) null); + Class clazz = getAWTKeyStrokeClass(); + cacheKey = (AWTKeyStroke)getCtor(clazz).newInstance((Object[]) null); + AppContext.getAppContext().put(APP_CONTEXT_KEYSTROKE_KEY, cacheKey); } catch (InstantiationException e) { assert(false); } catch (IllegalAccessException e) { @@ -253,9 +279,8 @@ if (stroke == null) { stroke = cacheKey; cache.put(stroke, stroke); - cacheKey = null; + AppContext.getAppContext().remove(APP_CONTEXT_KEYSTROKE_KEY); } - return stroke; } @@ -775,7 +800,8 @@ protected Object readResolve() throws java.io.ObjectStreamException { synchronized (AWTKeyStroke.class) { Class newClass = getClass(); - if (!newClass.equals(ctor.getDeclaringClass())) { + Class awtKeyStrokeClass = getAWTKeyStrokeClass(); + if (!newClass.equals(awtKeyStrokeClass)) { registerSubclass(newClass); } return getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease); Modified: classlib6/core/src/openjdk/java/java/io/InputStream.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/InputStream.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/java/java/io/InputStream.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2011, 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 @@ -44,10 +44,9 @@ */ public abstract class InputStream implements Closeable { - // SKIP_BUFFER_SIZE is used to determine the size of skipBuffer - private static final int SKIP_BUFFER_SIZE = 2048; - // skipBuffer is initialized in skip(long), if needed. - private static byte[] skipBuffer; + // MAX_SKIP_BUFFER_SIZE is used to determine the maximum buffer skip to + // use when skipping. + private static final int MAX_SKIP_BUFFER_SIZE = 2048; /** * Reads the next byte of data from the input stream. The value byte is @@ -212,18 +211,15 @@ long remaining = n; int nr; - if (skipBuffer == null) - skipBuffer = new byte[SKIP_BUFFER_SIZE]; - - byte[] localSkipBuffer = skipBuffer; if (n <= 0) { return 0; } + int size = (int)Math.min(MAX_SKIP_BUFFER_SIZE, remaining); + byte[] skipBuffer = new byte[size]; while (remaining > 0) { - nr = read(localSkipBuffer, 0, - (int) Math.min(SKIP_BUFFER_SIZE, remaining)); + nr = read(skipBuffer, 0, (int)Math.min(size, remaining)); if (nr < 0) { break; } Modified: classlib6/core/src/openjdk/java/java/io/ObjectStreamClass.java =================================================================== --- classlib6/core/src/openjdk/java/java/io/ObjectStreamClass.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/java/java/io/ObjectStreamClass.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 @@ -730,7 +730,6 @@ InvalidClassException ice = new InvalidClassException(deserializeEx.classname, deserializeEx.getMessage()); - ice.initCause(deserializeEx); throw ice; } } @@ -745,7 +744,6 @@ InvalidClassException ice = new InvalidClassException(serializeEx.classname, serializeEx.getMessage()); - ice.initCause(serializeEx); throw ice; } } @@ -762,7 +760,6 @@ InvalidClassException ice = new InvalidClassException(defaultSerializeEx.classname, defaultSerializeEx.getMessage()); - ice.initCause(defaultSerializeEx); throw ice; } } Modified: classlib6/core/src/openjdk/java/java/net/URI.java =================================================================== --- classlib6/core/src/openjdk/java/java/net/URI.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/java/java/net/URI.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2012, 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 @@ -457,7 +457,7 @@ * @author Mark Reinhold * @since 1.4 * - * @see <a href="http://ietf.org/rfc/rfc2279.txt"><i>RFC 2279: UTF-8, a + * @see <a href="http://www.ietf.org/rfc/rfc2279.txt"><i>RFC 2279: UTF-8, a * transformation format of ISO 10646</i></a>, <br><a * href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC 2373: IPv6 Addressing * Architecture</i></a>, <br><a Modified: classlib6/core/src/openjdk/java/java/nio/charset/package.html =================================================================== --- classlib6/core/src/openjdk/java/java/nio/charset/package.html 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/java/java/nio/charset/package.html 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ <!-- - Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2001, 2012, 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 @@ -48,7 +48,7 @@ <p> A <i>charset</i> is named mapping between sequences of sixteen-bit Unicode characters and sequences of bytes, in the sense defined in <a -href="http://ietf.org/rfc/rfc2278.txt"><i>RFC 2278</i></a>. A +href="http://www.ietf.org/rfc/rfc2278.txt"><i>RFC 2278</i></a>. A <i>decoder</i> is an engine which transforms bytes in a specific charset into characters, and an <i>encoder</i> is an engine which transforms characters into bytes. Encoders and decoders operate on byte and character buffers. They are Modified: classlib6/core/src/openjdk/java/java/sql/Timestamp.java =================================================================== --- classlib6/core/src/openjdk/java/java/sql/Timestamp.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/java/java/sql/Timestamp.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 Modified: classlib6/core/src/openjdk/java/java/util/TimeZone.java =================================================================== --- classlib6/core/src/openjdk/java/java/util/TimeZone.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/java/java/util/TimeZone.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2011, 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 @@ -43,6 +43,8 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.concurrent.ConcurrentHashMap; +import sun.misc.SharedSecrets; +import sun.misc.JavaAWTAccess; import sun.security.action.GetPropertyAction; import sun.util.TimeZoneNameUtility; import sun.util.calendar.ZoneInfo; @@ -542,7 +544,7 @@ * method doesn't create a clone. */ static TimeZone getDefaultRef() { - TimeZone defaultZone = defaultZoneTL.get(); + TimeZone defaultZone = getDefaultInAppContext(); if (defaultZone == null) { defaultZone = defaultTimeZone; if (defaultZone == null) { @@ -633,10 +635,53 @@ if (hasPermission()) { synchronized (TimeZone.class) { defaultTimeZone = zone; - defaultZoneTL.set(null); + setDefaultInAppContext(null); } } else { - defaultZoneTL.set(zone); + setDefaultInAppContext(zone); + } + } + + /** + * Returns the default TimeZone in an AppContext if any AppContext + * has ever used. null is returned if any AppContext hasn't been + * used or if the AppContext doesn't have the default TimeZone. + */ + private synchronized static TimeZone getDefaultInAppContext() { + javaAWTAccess = SharedSecrets.getJavaAWTAccess(); + if (javaAWTAccess == null) { + return mainAppContextDefault; + } else { + if (!javaAWTAccess.isDisposed()) { + TimeZone tz = (TimeZone) + javaAWTAccess.get(TimeZone.class); + if (tz == null && javaAWTAccess.isMainAppContext()) { + return mainAppContextDefault; + } else { + return tz; + } + } + } + return null; + } + + /** + * Sets the default TimeZone in the AppContext to the given + * tz. null is handled special: do nothing if any AppContext + * hasn't been used, remove the default TimeZone in the + * AppContext otherwise. + */ + private synchronized static void setDefaultInAppContext(TimeZone tz) { + javaAWTAccess = SharedSecrets.getJavaAWTAccess(); + if (javaAWTAccess == null) { + mainAppContextDefault = tz; + } else { + if (!javaAWTAccess.isDisposed()) { + javaAWTAccess.put(TimeZone.class, tz); + if (javaAWTAccess.isMainAppContext()) { + mainAppContextDefault = null; + } + } } } @@ -687,12 +732,24 @@ */ private String ID; private static volatile TimeZone defaultTimeZone; - private static final InheritableThreadLocal<TimeZone> defaultZoneTL - = new InheritableThreadLocal<TimeZone>(); static final String GMT_ID = "GMT"; private static final int GMT_ID_LENGTH = 3; + /* + * Provides access implementation-private methods without using reflection + * + * Note that javaAWTAccess may be null if sun.awt.AppContext class hasn't + * been loaded. If so, it implies that AWTSecurityManager is not our + * SecurityManager and we can use a local static variable. + * This works around a build time issue. + */ + private static JavaAWTAccess javaAWTAccess; + + // a static TimeZone we can reference if no AppContext is in place + private static TimeZone mainAppContextDefault; + + /** * Parses a custom time zone identifier and returns a corresponding zone. * This method doesn't support the RFC 822 time zone format. (e.g., +hhmm) Modified: classlib6/core/src/openjdk/java/java/util/concurrent/atomic/AtomicReferenceArray.java =================================================================== --- classlib6/core/src/openjdk/java/java/util/concurrent/atomic/AtomicReferenceArray.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/java/java/util/concurrent/atomic/AtomicReferenceArray.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -34,8 +34,9 @@ */ package java.util.concurrent.atomic; +import java.lang.reflect.Array; +import java.util.Arrays; import sun.misc.Unsafe; -import java.util.*; /** * An array of object references in which elements may be updated @@ -49,26 +50,45 @@ public class AtomicReferenceArray<E> implements java.io.Serializable { private static final long serialVersionUID = -6209656149925076980L; - private static final Unsafe unsafe = Unsafe.getUnsafe(); - private static final int base = unsafe.arrayBaseOffset(Object[].class); - private static final int scale = unsafe.arrayIndexScale(Object[].class); - private final Object[] array; + private static final Unsafe unsafe; + private static final int base; + private static final int shift; + private static final long arrayFieldOffset; + private final Object[] array; // must have exact type Object[] - private long rawIndex(int i) { + static { + int scale; + try { + unsafe = Unsafe.getUnsafe(); + arrayFieldOffset = unsafe.objectFieldOffset + (AtomicReferenceArray.class.getDeclaredField("array")); + base = unsafe.arrayBaseOffset(Object[].class); + scale = unsafe.arrayIndexScale(Object[].class); + } catch (Exception e) { + throw new Error(e); + } + if ((scale & (scale - 1)) != 0) + throw new Error("data type scale not a power of two"); + shift = 31 - Integer.numberOfLeadingZeros(scale); + } + + private long checkedByteOffset(int i) { if (i < 0 || i >= array.length) throw new IndexOutOfBoundsException("index " + i); - return base + (long) i * scale; + + return byteOffset(i); } + private static long byteOffset(int i) { + return ((long) i << shift) + base; + } + /** * Creates a new AtomicReferenceArray of given length. * @param length the length of the array */ public AtomicReferenceArray(int length) { array = new Object[length]; - // must perform at least one volatile write to conform to JMM - if (length > 0) - unsafe.putObjectVolatile(array, rawIndex(0), null); } /** @@ -79,18 +99,8 @@ * @throws NullPointerException if array is null */ public AtomicReferenceArray(E[] array) { - if (array == null) - throw new NullPointerException(); - int length = array.length; - this.array = new Object[length]; - if (length > 0) { - int last = length-1; - for (int i = 0; i < last; ++i) - this.array[i] = array[i]; - // Do the last write as volatile - E e = array[last]; - unsafe.putObjectVolatile(this.array, rawIndex(last), e); - } + // Visibility guaranteed by final field guarantees + this.array = Arrays.copyOf(array, array.length, Object[].class); } /** @@ -109,9 +119,13 @@ * @return the current value */ public final E get(int i) { - return (E) unsafe.getObjectVolatile(array, rawIndex(i)); + return getRaw(checkedByteOffset(i)); } + private E getRaw(long offset) { + return (E) unsafe.getObjectVolatile(array, offset); + } + /** * Sets the element at position {@code i} to the given value. * @@ -119,7 +133,7 @@ * @param newValue the new value */ public final void set(int i, E newValue) { - unsafe.putObjectVolatile(array, rawIndex(i), newValue); + unsafe.putObjectVolatile(array, checkedByteOffset(i), newValue); } /** @@ -130,7 +144,7 @@ * @since 1.6 */ public final void lazySet(int i, E newValue) { - unsafe.putOrderedObject(array, rawIndex(i), newValue); + unsafe.putOrderedObject(array, checkedByteOffset(i), newValue); } @@ -143,9 +157,10 @@ * @return the previous value */ public final E getAndSet(int i, E newValue) { + long offset = checkedByteOffset(i); while (true) { - E current = get(i); - if (compareAndSet(i, current, newValue)) + E current = getRaw(offset); + if (compareAndSetRaw(offset, current, newValue)) return current; } } @@ -153,6 +168,7 @@ /** * Atomically sets the element at position {@code i} to the given * updated value if the current value {@code ==} the expected value. + * * @param i the index * @param expect the expected value * @param update the new value @@ -160,10 +176,13 @@ * the actual value was not equal to the expected value. */ public final boolean compareAndSet(int i, E expect, E update) { - return unsafe.compareAndSwapObject(array, rawIndex(i), - expect, update); + return compareAndSetRaw(checkedByteOffset(i), expect, update); } + private boolean compareAndSetRaw(long offset, E expect, E update) { + return unsafe.compareAndSwapObject(array, offset, expect, update); + } + /** * Atomically sets the element at position {@code i} to the given * updated value if the current value {@code ==} the expected value. @@ -186,9 +205,33 @@ * @return the String representation of the current values of array. */ public String toString() { - if (array.length > 0) // force volatile read - get(0); - return Arrays.toString(array); + int iMax = array.length - 1; + if (iMax == -1) + return "[]"; + + StringBuilder b = new StringBuilder(); + b.append('['); + for (int i = 0; ; i++) { + b.append(getRaw(byteOffset(i))); + if (i == iMax) + return b.append(']').toString(); + b.append(',').append(' '); + } } + /** + * Reconstitutes the instance from a stream (that is, deserializes it). + * @param s the stream + */ + private void readObject(java.io.ObjectInputStream s) + throws java.io.IOException, ClassNotFoundException { + // Note: This must be changed if any additional fields are defined + Object a = s.readFields().get("array", null); + if (a == null || !a.getClass().isArray()) + throw new java.io.InvalidObjectException("Not array type"); + if (a.getClass() != Object[].class) + a = Arrays.copyOf((Object[])a, Array.getLength(a), Object[].class); + unsafe.putObjectVolatile(this, arrayFieldOffset, a); + } + } Modified: classlib6/core/src/openjdk/javax/javax/management/remote/JMXServiceURL.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/management/remote/JMXServiceURL.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/javax/javax/management/remote/JMXServiceURL.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2012, 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 @@ -107,10 +107,10 @@ * significant in the <code><em>url-path</em></code>.</p> * * @see <a - * href="ftp://ftp.rfc-editor.org/in-notes/rfc2609.txt">RFC 2609, + * href="http://www.ietf.org/rfc/rfc2609.txt">RFC 2609, * "Service Templates and <code>Service:</code> Schemes"</a> * @see <a - * href="ftp://ftp.rfc-editor.org/in-notes/rfc3111.txt">RFC 3111, + * href="http://www.ietf.org/rfc/rfc3111.txt">RFC 3111, * "Service Location Protocol Modifications for IPv6"</a> * * @since 1.5 Modified: classlib6/core/src/openjdk/javax/javax/naming/ldap/LdapName.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/naming/ldap/LdapName.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/javax/javax/naming/ldap/LdapName.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, 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 @@ -42,7 +42,7 @@ /** * This class represents a distinguished name as specified by - * <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a>. + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>. * A distinguished name, or DN, is composed of an ordered list of * components called <em>relative distinguished name</em>s, or RDNs. * Details of a DN's syntax are described in RFC 2253. @@ -115,7 +115,7 @@ * * @param name This is a non-null distinguished name formatted * according to the rules defined in - * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>. + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>. * * @throws InvalidNameException if a syntax violation is detected. * @see Rdn#escapeValue(Object value) @@ -614,7 +614,7 @@ /** * Returns a string representation of this LDAP name in a format - * defined by <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a> + * defined by <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a> * and described in the class description. If the name has zero * components an empty string is returned. * Modified: classlib6/core/src/openjdk/javax/javax/naming/ldap/Rdn.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/naming/ldap/Rdn.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/javax/javax/naming/ldap/Rdn.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, 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 @@ -45,7 +45,7 @@ /** * This class represents a relative distinguished name, or RDN, which is a * component of a distinguished name as specified by - * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>. + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>. * An example of an RDN is "OU=Sales+CN=J.Smith". In this example, * the RDN consist of multiple attribute type/value pairs. The * RDN is parsed as described in the class description for @@ -117,7 +117,7 @@ * {@link javax.naming.directory.Attributes Attributes}. * <p> * The string attribute values are not interpretted as - * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a> + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a> * formatted RDN strings. That is, the values are used * literally (not parsed) and assumed to be unescaped. * @@ -152,7 +152,7 @@ /** * Constructs an Rdn from the given string. * This constructor takes a string formatted according to the rules - * defined in <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a> + * defined in <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a> * and described in the class description for * {@link javax.naming.ldap.LdapName}. * @@ -180,7 +180,7 @@ * Constructs an Rdn from the given attribute type and * value. * The string attribute values are not interpretted as - * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a> + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a> * formatted RDN strings. That is, the values are used * literally (not parsed) and assumed to be unescaped. * @@ -216,7 +216,7 @@ /* * Adds the given attribute type and value to this Rdn. * The string attribute values are not interpretted as - * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a> + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a> * formatted RDN strings. That is the values are used * literally (not parsed) and assumed to be unescaped. * @@ -280,7 +280,7 @@ /** * Returns this Rdn as a string represented in a format defined by - * <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a> and described + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a> and described * in the class description for {@link javax.naming.ldap.LdapName LdapName}. * * @return The string representation of the Rdn. @@ -503,7 +503,7 @@ /** * Given the value of an attribute, returns a string escaped according * to the rules specified in - * <a href="http://ietf.org/rfc/rfc2253.txt">RFC 2253</a>. + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>. * <p> * For example, if the val is "Sue, Grabbit and Runn", the escaped * value returned by this method is "Sue\, Grabbit and Runn". @@ -582,7 +582,7 @@ /** * Given an attribute value string formated according to the rules * specified in - * <a href="http://ietf.org//rfc/rfc2253.txt">RFC 2253</a>, + * <a href="http://www.ietf.org/rfc/rfc2253.txt">RFC 2253</a>, * returns the unformated value. Escapes and quotes are * stripped away, and hex-encoded UTF-8 is converted to equivalent * UTF-16 characters. Returns a string value as a String, and a Modified: classlib6/core/src/openjdk/javax/javax/net/ssl/HttpsURLConnection.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/net/ssl/HttpsURLConnection.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/javax/javax/net/ssl/HttpsURLConnection.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2011, 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 @@ -368,6 +368,10 @@ "no SSLSocketFactory specified"); } + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkSetFactory(); + } sslSocketFactory = sf; } Modified: classlib6/core/src/openjdk/javax/javax/net/ssl/SSLContext.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/net/ssl/SSLContext.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/javax/javax/net/ssl/SSLContext.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2012, 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 @@ -159,7 +159,7 @@ * * @param protocol the standard name of the requested protocol. * See Appendix A in the <a href= - * "{@docRoot}/../technotes/guides//security/jsse/JSSERefGuide.html#AppA"> + * "{@docRoot}/../technotes/guides/security/jsse/JSSERefGuide.html#AppA"> * Java Secure Socket Extension Reference Guide </a> * for information about standard protocol names. * Modified: classlib6/core/src/openjdk/javax/javax/print/DocFlavor.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/print/DocFlavor.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/javax/javax/print/DocFlavor.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2012, 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 @@ -451,7 +451,7 @@ /** * A String representing the host operating system encoding. * This will follow the conventions documented in - * <a href="http://ietf.org/rfc/rfc2278.txt"> + * <a href="http://www.ietf.org/rfc/rfc2278.txt"> * <i>RFC 2278: IANA Charset Registration Procedures</i></a> * except where historical names are returned for compatibility with * previous versions of the Java platform. Modified: classlib6/core/src/openjdk/javax/javax/swing/ImageIcon.java =================================================================== --- classlib6/core/src/openjdk/javax/javax/swing/ImageIcon.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/javax/javax/swing/ImageIcon.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 Modified: classlib6/core/src/openjdk/langtools/com/sun/tools/javadoc/JavadocTool.java =================================================================== --- classlib6/core/src/openjdk/langtools/com/sun/tools/javadoc/JavadocTool.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/langtools/com/sun/tools/javadoc/JavadocTool.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 @@ -260,24 +260,15 @@ for (String p: excludedPackages) includedPackages.put(p, false); - if (docenv.fileManager.hasLocation(StandardLocation.SOURCE_PATH)) { + StandardLocation path = docenv.fileManager.hasLocation(StandardLocation.SOURCE_PATH) + ? StandardLocation.SOURCE_PATH : StandardLocation.CLASS_PATH; + searchSubPackages(subPackages, includedPackages, packages, packageFiles, - StandardLocation.SOURCE_PATH, + path, EnumSet.of(JavaFileObject.Kind.SOURCE)); - searchSubPackages(subPackages, - includedPackages, - packages, packageFiles, - StandardLocation.CLASS_PATH, - EnumSet.of(JavaFileObject.Kind.CLASS)); - } else { - searchSubPackages(subPackages, - includedPackages, - packages, packageFiles, - StandardLocation.CLASS_PATH, - EnumSet.of(JavaFileObject.Kind.SOURCE, JavaFileObject.Kind.CLASS)); - } + return packageFiles; } Modified: classlib6/core/src/openjdk/sun/sun/awt/image/PNGImageDecoder.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/awt/image/PNGImageDecoder.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/sun/sun/awt/image/PNGImageDecoder.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2012, 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 @@ -32,7 +32,7 @@ import java.awt.Color; /** PNG - Portable Network Graphics - image file reader. - See <a href=ftp://ds.internic.net/rfc/rfc2083.txt>RFC2083</a> for details. */ + See <a href=http://www.ietf.org/rfc/rfc2083.txt>RFC2083</a> for details. */ /* this is changed public class PNGImageDecoder extends FilterInputStream implements Runnable Modified: classlib6/core/src/openjdk/sun/sun/font/FileFontStrike.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/font/FileFontStrike.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/sun/sun/font/FileFontStrike.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2012, 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 @@ -56,7 +56,7 @@ private static final int SEGINTARRAY = 3; private static final int SEGLONGARRAY = 4; - private int glyphCacheFormat = UNINITIALISED; + private volatile int glyphCacheFormat = UNINITIALISED; /* segmented arrays are blocks of 256 */ private static final int SEGSHIFT = 8; @@ -426,32 +426,34 @@ } /* Called only from synchronized code or constructor */ - private void initGlyphCache() { + private synchronized void initGlyphCache() { int numGlyphs = mapper.getNumGlyphs(); + int tmpFormat = UNINITIALISED; if (segmentedCache) { int numSegments = (numGlyphs + SEGSIZE-1)/SEGSIZE; if (FontManager.longAddresses) { - glyphCacheFormat = SEGLONGARRAY; + tmpFormat = SEGLONGARRAY; segLongGlyphImages = new long[numSegments][]; this.disposer.segLongGlyphImages = segLongGlyphImages; } else { - glyphCacheFormat = SEGINTARRAY; + tmpFormat = SEGINTARRAY; segIntGlyphImages = new int[numSegments][]; this.disposer.segIntGlyphImages = segIntGlyphImages; } } else { if (FontManager.longAddresses) { - glyphCacheFormat = LONGARRAY; + tmpFormat = LONGARRAY; longGlyphImages = new long[numGlyphs]; this.disposer.longGlyphImages = longGlyphImages; } else { - glyphCacheFormat = INTARRAY; + tmpFormat = INTARRAY; intGlyphImages = new int[numGlyphs]; this.disposer.intGlyphImages = intGlyphImages; } } + glyphCacheFormat = tmpFormat; } /* Metrics info is always retrieved. If the GlyphInfo address is non-zero Modified: classlib6/core/src/openjdk/sun/sun/java2d/pipe/DrawImage.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/java2d/pipe/DrawImage.java 2012-08-19 10:27:29 UTC (rev 5927) +++ classlib6/core/src/openjdk/sun/sun/java2d/pipe/DrawImage.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2011, 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 Added: classlib6/core/src/openjdk/sun/sun/misc/JavaAWTAccess.java =================================================================== --- classlib6/core/src/openjdk/sun/sun/misc/JavaAWTAccess.java (rev 0) +++ classlib6/core/src/openjdk/sun/sun/misc/JavaAWTAccess.java 2012-08-19 13:34:02 UTC (rev 5928) @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2011, 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 us... [truncated message content] |