From: <ls...@us...> - 2011-03-05 11:38:25
|
Revision: 5800 http://jnode.svn.sourceforge.net/jnode/?rev=5800&view=rev Author: lsantha Date: 2011-03-05 11:38:17 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMReference.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java classlib6/core/src/openjdk/org/org/omg/CORBA/ORB.java classlib6/core/src/openjdk/org/org/omg/CORBA/SetOverrideType.java classlib6/core/src/openjdk/org/org/omg/CORBA/TCKind.java classlib6/core/src/openjdk/org/org/omg/CORBA/UnknownUserException.java classlib6/core/src/openjdk/org/org/omg/CORBA/portable/ServantObject.java classlib6/core/src/openjdk/org/org/xml/sax/AttributeList.java classlib6/core/src/openjdk/org/org/xml/sax/Attributes.java classlib6/core/src/openjdk/org/org/xml/sax/ContentHandler.java classlib6/core/src/openjdk/org/org/xml/sax/DTDHandler.java classlib6/core/src/openjdk/org/org/xml/sax/DocumentHandler.java classlib6/core/src/openjdk/org/org/xml/sax/EntityResolver.java classlib6/core/src/openjdk/org/org/xml/sax/ErrorHandler.java classlib6/core/src/openjdk/org/org/xml/sax/HandlerBase.java classlib6/core/src/openjdk/org/org/xml/sax/InputSource.java classlib6/core/src/openjdk/org/org/xml/sax/Locator.java classlib6/core/src/openjdk/org/org/xml/sax/Parser.java classlib6/core/src/openjdk/org/org/xml/sax/SAXException.java classlib6/core/src/openjdk/org/org/xml/sax/SAXNotRecognizedException.java classlib6/core/src/openjdk/org/org/xml/sax/SAXNotSupportedException.java classlib6/core/src/openjdk/org/org/xml/sax/SAXParseException.java classlib6/core/src/openjdk/org/org/xml/sax/XMLFilter.java classlib6/core/src/openjdk/org/org/xml/sax/XMLReader.java classlib6/core/src/openjdk/org/org/xml/sax/helpers/XMLReaderFactory.java classlib6/core/src/openjdk/org/org/xml/sax/package.html Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMDigestMethod.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 2007, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ /* * $Id: DOMDigestMethod.java,v 1.17 2005/05/10 18:15:32 mullan Exp $ Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMHMACSignatureMethod.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 2009, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ /* * $Id: DOMHMACSignatureMethod.java,v 1.17 2005/09/15 14:29:04 mullan Exp $ @@ -59,6 +59,7 @@ Logger.getLogger("org.jcp.xml.dsig.internal.dom"); private Mac hmac; private int outputLength; + private boolean outputLengthSet; /** * Creates a <code>DOMHMACSignatureMethod</code> with the specified params @@ -88,13 +89,12 @@ ("params must be of type HMACParameterSpec"); } outputLength = ((HMACParameterSpec) params).getOutputLength(); + outputLengthSet = true; if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Setting outputLength from HMACParameterSpec to: " + outputLength); } - } else { - outputLength = -1; } } @@ -102,6 +102,7 @@ throws MarshalException { outputLength = new Integer (paramsElem.getFirstChild().getNodeValue()).intValue(); + outputLengthSet = true; if (log.isLoggable(Level.FINE)) { log.log(Level.FINE, "unmarshalled outputLength: " + outputLength); } @@ -136,23 +137,13 @@ throw new XMLSignatureException(nsae); } } - if (log.isLoggable(Level.FINE)) { - log.log(Level.FINE, "outputLength = " + outputLength); + if (outputLengthSet && outputLength < getDigestLength()) { + throw new XMLSignatureException + ("HMACOutputLength must not be less than " + getDigestLength()); } hmac.init((SecretKey) key); si.canonicalize(context, new MacOutputStream(hmac)); byte[] result = hmac.doFinal(); - if (log.isLoggable(Level.FINE)) { - log.log(Level.FINE, "resultLength = " + result.length); - } - if (outputLength != -1) { - int byteLength = outputLength/8; - if (result.length > byteLength) { - byte[] truncated = new byte[byteLength]; - System.arraycopy(result, 0, truncated, 0, byteLength); - result = truncated; - } - } return MessageDigest.isEqual(sig, result); } @@ -172,18 +163,13 @@ throw new XMLSignatureException(nsae); } } + if (outputLengthSet && outputLength < getDigestLength()) { + throw new XMLSignatureException + ("HMACOutputLength must not be less than " + getDigestLength()); + } hmac.init((SecretKey) key); si.canonicalize(context, new MacOutputStream(hmac)); - byte[] result = hmac.doFinal(); - if (outputLength != -1) { - int byteLength = outputLength/8; - if (result.length > byteLength) { - byte[] truncated = new byte[byteLength]; - System.arraycopy(result, 0, truncated, 0, byteLength); - result = truncated; - } - } - return result; + return hmac.doFinal(); } boolean paramsEqual(AlgorithmParameterSpec spec) { @@ -198,6 +184,11 @@ return (outputLength == ospec.getOutputLength()); } + /** + * Returns the output length of the hash/digest. + */ + abstract int getDigestLength(); + static final class SHA1 extends DOMHMACSignatureMethod { SHA1(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException { @@ -212,6 +203,9 @@ String getSignatureAlgorithm() { return "HmacSHA1"; } + int getDigestLength() { + return 160; + } } static final class SHA256 extends DOMHMACSignatureMethod { @@ -228,6 +222,9 @@ String getSignatureAlgorithm() { return "HmacSHA256"; } + int getDigestLength() { + return 256; + } } static final class SHA384 extends DOMHMACSignatureMethod { @@ -244,6 +241,9 @@ String getSignatureAlgorithm() { return "HmacSHA384"; } + int getDigestLength() { + return 384; + } } static final class SHA512 extends DOMHMACSignatureMethod { @@ -260,5 +260,8 @@ String getSignatureAlgorithm() { return "HmacSHA512"; } + int getDigestLength() { + return 512; + } } } Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMReference.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMReference.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMReference.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 2006, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMRetrievalMethod.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMSignatureMethod.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 2007, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ /* * Copyright 1999-2004 The Apache Software Foundation. Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignature.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXMLSignatureFactory.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2005-2007 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 2007, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ /* * $Id: DOMXMLSignatureFactory.java,v 1.21 2005/09/23 19:59:11 mullan Exp $ Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/DOMXPathFilter2Transform.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java =================================================================== --- classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/jcp/xml/dsig/internal/dom/XMLDSigRI.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Portions Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ /* Modified: classlib6/core/src/openjdk/org/org/omg/CORBA/ORB.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/ORB.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/ORB.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2010, 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/org/org/omg/CORBA/SetOverrideType.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/SetOverrideType.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/SetOverrideType.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2010, 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/org/org/omg/CORBA/TCKind.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/TCKind.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/TCKind.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2004, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, 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/org/org/omg/CORBA/UnknownUserException.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/UnknownUserException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/UnknownUserException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, 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/org/org/omg/CORBA/portable/ServantObject.java =================================================================== --- classlib6/core/src/openjdk/org/org/omg/CORBA/portable/ServantObject.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/omg/CORBA/portable/ServantObject.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2010, 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/org/org/xml/sax/AttributeList.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/AttributeList.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/AttributeList.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX Attribute List Interface. Modified: classlib6/core/src/openjdk/org/org/xml/sax/Attributes.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/Attributes.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/Attributes.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // Attributes.java - attribute list with Namespace support Modified: classlib6/core/src/openjdk/org/org/xml/sax/ContentHandler.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/ContentHandler.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/ContentHandler.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // ContentHandler.java - handle main document content. Modified: classlib6/core/src/openjdk/org/org/xml/sax/DTDHandler.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/DTDHandler.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/DTDHandler.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX DTD handler. Modified: classlib6/core/src/openjdk/org/org/xml/sax/DocumentHandler.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/DocumentHandler.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/DocumentHandler.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX document handler. Modified: classlib6/core/src/openjdk/org/org/xml/sax/EntityResolver.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/EntityResolver.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/EntityResolver.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX entity resolver. Modified: classlib6/core/src/openjdk/org/org/xml/sax/ErrorHandler.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/ErrorHandler.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/ErrorHandler.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX error handler. Modified: classlib6/core/src/openjdk/org/org/xml/sax/HandlerBase.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/HandlerBase.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/HandlerBase.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2006, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX default handler base class. Modified: classlib6/core/src/openjdk/org/org/xml/sax/InputSource.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/InputSource.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/InputSource.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX input source. Modified: classlib6/core/src/openjdk/org/org/xml/sax/Locator.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/Locator.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/Locator.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX locator interface for document events. Modified: classlib6/core/src/openjdk/org/org/xml/sax/Parser.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/Parser.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/Parser.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX parser interface. Modified: classlib6/core/src/openjdk/org/org/xml/sax/SAXException.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/SAXException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/SAXException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX exception class. @@ -56,6 +56,7 @@ * * @since SAX 1.0 * @author David Megginson + * @version 2.0.1 (sax2r2) * @see org.xml.sax.SAXParseException */ public class SAXException extends Exception { @@ -145,6 +146,14 @@ return exception; } + /** + * Return the cause of the exception + * + * @return Return the cause of the exception + */ + public Throwable getCause() { + return exception; + } /** * Override toString to pick up any embedded exception. @@ -154,7 +163,7 @@ public String toString () { if (exception != null) { - return exception.toString(); + return super.toString() + "\n" + exception.toString(); } else { return super.toString(); } Modified: classlib6/core/src/openjdk/org/org/xml/sax/SAXNotRecognizedException.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/SAXNotRecognizedException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/SAXNotRecognizedException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAXNotRecognizedException.java - unrecognized feature or value. Modified: classlib6/core/src/openjdk/org/org/xml/sax/SAXNotSupportedException.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/SAXNotSupportedException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/SAXNotSupportedException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAXNotSupportedException.java - unsupported feature or value. Modified: classlib6/core/src/openjdk/org/org/xml/sax/SAXParseException.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/SAXParseException.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/SAXParseException.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // SAX exception class. @@ -54,6 +54,7 @@ * * @since SAX 1.0 * @author David Megginson + * @version 2.0.1 (sax2r2) * @see org.xml.sax.SAXException * @see org.xml.sax.Locator * @see org.xml.sax.ErrorHandler @@ -255,6 +256,23 @@ return this.columnNumber; } + /** + * Override toString to provide more detailed error message. + * + * @return A string representation of this exception. + */ + public String toString() { + StringBuilder buf = new StringBuilder(getClass().getName()); + String message = getLocalizedMessage(); + if (publicId!=null) buf.append("publicId: ").append(publicId); + if (systemId!=null) buf.append("; systemId: ").append(systemId); + if (lineNumber!=-1) buf.append("; lineNumber: ").append(lineNumber); + if (columnNumber!=-1) buf.append("; columnNumber: ").append(columnNumber); + + //append the exception message at the end + if (message!=null) buf.append("; ").append(message); + return buf.toString(); + } ////////////////////////////////////////////////////////////////////// // Internal state. Modified: classlib6/core/src/openjdk/org/org/xml/sax/XMLFilter.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/XMLFilter.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/XMLFilter.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // XMLFilter.java - filter SAX2 events. Modified: classlib6/core/src/openjdk/org/org/xml/sax/XMLReader.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/XMLReader.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/XMLReader.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -1,12 +1,12 @@ /* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2000, 2005, 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. Sun designates this + * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. + * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -18,9 +18,9 @@ * 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. + * 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. */ // XMLReader.java - read an XML document. Modified: classlib6/core/src/openjdk/org/org/xml/sax/helpers/XMLReaderFactory.java =================================================================== --- classlib6/core/src/openjdk/org/org/xml/sax/helpers/XMLReaderFactory.java 2011-03-05 11:36:39 UTC (rev 5799) +++ classlib6/core/src/openjdk/org/org/xml/sax/helpers/XMLReaderFactory.java 2011-03-05 11:38:17 UTC (rev 5800) @@ -34,6 +34,8 @@ import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; +import java.security.AccessController; +import java.security.PrivilegedAction; import org.xml.sax.XMLReader; import org.xml.sax.SAXException; @@ -69,6 +71,7 @@ * * @since SAX 2.0 * @author David Megginson, David Brownell + * @version 2.0.1 (sax2r2) */ final public class XMLReaderFactory { @@ -83,6 +86,8 @@ private static final String property = "org.xml.sax.driver"; + private static String _clsFromJar = null; + private static boolean _jarread = false; /** * Attempt to create an XMLReader from system defaults. * In environments which can support it, the name of the XMLReader @@ -137,24 +142,35 @@ // 2. if that fails, try META-INF/services/ if (className == null) { + if (!_jarread) { + final ClassLoader loader1 = loader; + _jarread = true; + _clsFromJar = (String) + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + String clsName = null; try { String service = "META-INF/services/" + property; InputStream in; BufferedReader reader; - - if (loader == null) + if (loader1 == null) in = ClassLoader.getSystemResourceAsStream (service); else - in = loader.getResourceAsStream (service); + in = loader1.getResourceAsStream (service); if (in != null) { reader = new BufferedReader ( new InputStreamReader (in, "UTF8")); - className = reader.readLine (); + clsName = reader.readLine (); in.close (); } } catch (Excep... [truncated message content] |