From: <ls...@us...> - 2011-03-05 11:01:21
|
Revision: 5796 http://jnode.svn.sourceforge.net/jnode/?rev=5796&view=rev Author: lsantha Date: 2011-03-05 11:01:11 +0000 (Sat, 05 Mar 2011) Log Message: ----------- Integrating OpenJDK 6 b22. Modified Paths: -------------- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/transforms/Transform.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/AbstractLauncher.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/BaseLineInfo.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassLoaderReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassObjectReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/CommandSender.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConcreteMethodImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConnectorImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventQueueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventRequestManagerImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventSetImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/FieldImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/FloatTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/FloatValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/GenericAttachingConnector.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/GenericListeningConnector.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/IntegerTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/IntegerValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/InterfaceTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/InternalEventHandler.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/JDWPException.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/JNITypeParser.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LineInfo.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LinkedHashMap.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LocalVariableImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LocationImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LockObject.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LongTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/LongValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/MethodImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/MirrorImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/MonitorInfoImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/NonConcreteMethodImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ObjectReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ObsoleteMethodImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/Packet.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/PacketStream.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/PrimitiveTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/PrimitiveValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/RawCommandLineLauncher.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ReferenceTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SDE.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ShortTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ShortValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SocketAttachingConnector.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SocketListeningConnector.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SocketTransportService.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/StackFrameImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/StratumLineInfo.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/StringReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/SunCommandLineLauncher.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/TargetVM.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ThreadAction.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ThreadGroupReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ThreadListener.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ThreadReferenceImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/TypeComponentImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/TypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VMAction.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VMListener.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VMModifiers.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VMState.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ValueContainer.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/ValueImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VirtualMachineImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VirtualMachineManagerImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VirtualMachineManagerService.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VoidTypeImpl.java classlib6/core/src/openjdk/com/com/sun/tools/jdi/VoidValueImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/Entity.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/XMLEntityReader.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/XMLEventReaderImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/XMLInputFactoryImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/AttributeImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/CharacterEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/CommentEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/DTDEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/DummyEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/EndDocumentEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/EndElementEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/EntityDeclarationImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/EntityReferenceEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/NamedEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/NotationDeclarationImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/ProcessingInstructionEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/StartDocumentEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/events/StartElementEvent.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/UTF8OutputStreamWriter.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/XMLDOMWriterImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/XMLOutputSource.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java classlib6/core/src/openjdk/com/com/sun/xml/internal/stream/writers/XMLWriter.java Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -20,6 +20,8 @@ package com.sun.org.apache.xerces.internal.jaxp.validation; +import java.util.HashMap; + import javax.xml.validation.Schema; import javax.xml.validation.Validator; import javax.xml.validation.ValidatorHandler; @@ -33,6 +35,16 @@ abstract class AbstractXMLSchema extends Schema implements XSGrammarPoolContainer { + /** + * Map containing the initial values of features for + * validators created using this grammar pool container. + */ + private final HashMap fFeatures; + + public AbstractXMLSchema() { + fFeatures = new HashMap(); + } + /* * Schema methods */ @@ -51,4 +63,25 @@ return new ValidatorHandlerImpl(this); } + /* + * XSGrammarPoolContainer methods + */ + + /** + * Returns the initial value of a feature for validators created + * using this grammar pool container or null if the validators + * should use the default value. + */ + public final Boolean getFeature(String featureId) { + return (Boolean) fFeatures.get(featureId); + } + + /* + * Other methods + */ + + final void setFeature(String featureId, boolean state) { + fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE); + } + } // AbstractXMLSchema Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -33,18 +33,11 @@ */ final class EmptyXMLSchema extends AbstractXMLSchema implements XMLGrammarPool { - private static EmptyXMLSchema EMPTY_XML_SCHEMA_INSTANCE = new EmptyXMLSchema(); - /** Zero length grammar array. */ private static final Grammar [] ZERO_LENGTH_GRAMMAR_ARRAY = new Grammar [0]; - /** Returns the one and only instance of this class. */ - public static EmptyXMLSchema getInstance() { - return EMPTY_XML_SCHEMA_INSTANCE; - } + public EmptyXMLSchema() {} - private EmptyXMLSchema() {} - /* * XMLGrammarPool methods */ Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -228,21 +228,26 @@ // Select Schema implementation based on grammar count. final int grammarCount = pool.getGrammarCount(); + AbstractXMLSchema schema = null; if (grammarCount > 1) { - return new XMLSchema(new ReadOnlyGrammarPool(pool)); + schema = new XMLSchema(new ReadOnlyGrammarPool(pool)); } else if (grammarCount == 1) { Grammar[] grammars = pool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA); - return new SimpleXMLSchema(grammars[0]); + schema = new SimpleXMLSchema(grammars[0]); } else { - return EmptyXMLSchema.getInstance(); + schema = new EmptyXMLSchema(); } + propagateFeatures(schema); + return schema; } public Schema newSchema() throws SAXException { // Use a Schema that uses the system id as the equality source. - return new WeakReferenceXMLSchema(); + AbstractXMLSchema schema = new WeakReferenceXMLSchema(); + propagateFeatures(schema); + return schema; } public boolean getFeature(String name) @@ -372,6 +377,15 @@ } } + private void propagateFeatures(AbstractXMLSchema schema) { + schema.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, fSecurityManager != null); + String[] features = fXMLSchemaLoader.getRecognizedFeatures(); + for (int i = 0; i < features.length; ++i) { + boolean state = fXMLSchemaLoader.getFeature(features[i]); + schema.setFeature(features[i], state); + } + } + /** * Extension of XMLGrammarPoolImpl which exposes the number of * grammars stored in the grammar pool. Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -22,6 +22,8 @@ import java.util.HashMap; import java.util.Locale; +import java.util.Iterator; +import java.util.Map; import javax.xml.XMLConstants; @@ -161,6 +163,19 @@ private ValidationManager fValidationManager; // + // Configuration + // + + /** Stores initial feature values for validator reset. */ + private final HashMap fInitFeatures = new HashMap(); + + /** Stores initial property values for validator reset. */ + private final HashMap fInitProperties = new HashMap(); + + /** Stores the initial security manager. */ + private final SecurityManager fInitSecurityManager; + + // // User Objects // @@ -211,9 +226,20 @@ fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter()); // add all recognized features and properties and apply their defaults - addRecognizedParamsAndSetDefaults(fEntityManager); - addRecognizedParamsAndSetDefaults(fErrorReporter); - addRecognizedParamsAndSetDefaults(fSchemaValidator); + addRecognizedParamsAndSetDefaults(fEntityManager, grammarContainer); + addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer); + addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer); + + // if the secure processing feature is set to true, add a security manager to the configuration + Boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); + if (Boolean.TRUE.equals(secureProcessing)) { + fInitSecurityManager = new SecurityManager(); + } + else { + fInitSecurityManager = null; + } + fComponents.put(SECURITY_MANAGER, fInitSecurityManager); + } /** @@ -266,7 +292,6 @@ else if (USE_GRAMMAR_POOL_ONLY.equals(featureId) && value != fUseGrammarPoolOnly) { throw new XMLConfigurationException(XMLConfigurationException.NOT_SUPPORTED, featureId); } - fConfigUpdated = true; if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) { if (_isSecureMode && !value) { throw new XMLConfigurationException(XMLConfigurationException.NOT_ALLOWED, XMLConstants.FEATURE_SECURE_PROCESSING); @@ -274,9 +299,14 @@ setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null); return; } + fConfigUpdated = true; fEntityManager.setFeature(featureId, value); fErrorReporter.setFeature(featureId, value); fSchemaValidator.setFeature(featureId, value); + if (!fInitFeatures.containsKey(featureId)) { + boolean current = super.getFeature(featureId); + fInitFeatures.put(featureId, current ? Boolean.TRUE : Boolean.FALSE); + } super.setFeature(featureId, value); } @@ -336,6 +366,9 @@ fComponents.put(propertyId, value); return; } + if (!fInitProperties.containsKey(propertyId)) { + fInitProperties.put(propertyId, super.getProperty(propertyId)); + } super.setProperty(propertyId, value); } @@ -348,7 +381,7 @@ * @param component The component whose recognized features * and properties will be added to the configuration */ - public void addRecognizedParamsAndSetDefaults(XMLComponent component) { + public void addRecognizedParamsAndSetDefaults(XMLComponent component, XSGrammarPoolContainer grammarContainer) { // register component's recognized features final String[] recognizedFeatures = component.getRecognizedFeatures(); @@ -359,7 +392,7 @@ addRecognizedProperties(recognizedProperties); // set default values - setFeatureDefaults(component, recognizedFeatures); + setFeatureDefaults(component, recognizedFeatures, grammarContainer); setPropertyDefaults(component, recognizedProperties); } @@ -406,10 +439,6 @@ void restoreInitialState() { fConfigUpdated = true; - // Clear feature and property tables. - fFeatures.clear(); - fProperties.clear(); - // Remove error resolver and error handler fComponents.put(ENTITY_RESOLVER, null); fComponents.put(ERROR_HANDLER, null); @@ -418,21 +447,46 @@ setLocale(null); fComponents.put(LOCALE, null); - // Restore component defaults. - setFeatureDefaults(fEntityManager, fEntityManager.getRecognizedFeatures()); - setPropertyDefaults(fEntityManager, fEntityManager.getRecognizedProperties()); - setFeatureDefaults(fErrorReporter, fErrorReporter.getRecognizedFeatures()); - setPropertyDefaults(fErrorReporter, fErrorReporter.getRecognizedProperties()); - setFeatureDefaults(fSchemaValidator, fSchemaValidator.getRecognizedFeatures()); - setPropertyDefaults(fSchemaValidator, fSchemaValidator.getRecognizedProperties()); + // Restore initial security manager + fComponents.put(SECURITY_MANAGER, fInitSecurityManager); + + // Set the Locale back to null. + setLocale(null); + fComponents.put(LOCALE, null); + + // Reset feature and property values to their initial values + if (!fInitFeatures.isEmpty()) { + Iterator iter = fInitFeatures.entrySet().iterator(); + while (iter.hasNext()) { + Map.Entry entry = (Map.Entry) iter.next(); + String name = (String) entry.getKey(); + boolean value = ((Boolean) entry.getValue()).booleanValue(); + super.setFeature(name, value); + } + fInitFeatures.clear(); + } + if (!fInitProperties.isEmpty()) { + Iterator iter = fInitProperties.entrySet().iterator(); + while (iter.hasNext()) { + Map.Entry entry = (Map.Entry) iter.next(); + String name = (String) entry.getKey(); + Object value = entry.getValue(); + super.setProperty(name, value); + } + fInitProperties.clear(); + } } /** Sets feature defaults for the given component on this configuration. */ - private void setFeatureDefaults(final XMLComponent component, final String [] recognizedFeatures) { + private void setFeatureDefaults(final XMLComponent component, + final String [] recognizedFeatures, XSGrammarPoolContainer grammarContainer) { if (recognizedFeatures != null) { for (int i = 0; i < recognizedFeatures.length; ++i) { String featureId = recognizedFeatures[i]; - Boolean state = component.getFeatureDefault(featureId); + Boolean state = grammarContainer.getFeature(featureId); + if (state == null) { + state = component.getFeatureDefault(featureId); + } if (state != null) { // Do not overwrite values already set on the configuration. if (!fFeatures.containsKey(featureId)) { Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -48,4 +48,11 @@ */ public boolean isFullyComposed(); + /** + * Returns the initial value of a feature for validators created + * using this grammar pool container or null if the validators + * should use the default value. + */ + public Boolean getFeature(String featureId); + } Modified: classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/transforms/Transform.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/transforms/Transform.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/org/apache/xml/internal/security/transforms/Transform.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -247,6 +247,8 @@ if (!_alreadyInitialized) { _transformHash = new HashMap(10); + // make sure builtin algorithms are all registered first + com.sun.org.apache.xml.internal.security.Init.init(); _alreadyInitialized = true; } } @@ -274,19 +276,13 @@ "algorithm.alreadyRegistered", exArgs); } - ClassLoader cl = (ClassLoader) AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { - return Thread.currentThread().getContextClassLoader(); - } - }); + ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { Transform._transformHash.put (algorithmURI, Class.forName(implementingClass, true, cl)); } catch (ClassNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + throw new RuntimeException(e); } } } Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/AbstractLauncher.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/AbstractLauncher.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/AbstractLauncher.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 2008, 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. */ package com.sun.tools.jdi; @@ -119,7 +119,7 @@ String[] tokenArray = new String[tokenList.size()]; for (int i = 0; i < tokenList.size(); i++) { - tokenArray[i] = (String)tokenList.get(i); + tokenArray[i] = tokenList.get(i); } return tokenArray; } Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayReferenceImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayReferenceImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayReferenceImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2004, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ArrayTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2001, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/BaseLineInfo.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/BaseLineInfo.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/BaseLineInfo.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 2001, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanValueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanValueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/BooleanValueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteValueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteValueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ByteValueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2004, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharValueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharValueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/CharValueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2004, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassLoaderReferenceImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassLoaderReferenceImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassLoaderReferenceImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2003, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassObjectReferenceImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassObjectReferenceImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassObjectReferenceImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1999-2000 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 2000, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ClassTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2008, 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. */ package com.sun.tools.jdi; @@ -95,11 +95,8 @@ } public List<ClassType> subclasses() { - List<ReferenceType> all = vm.allClasses(); List<ClassType> subs = new ArrayList<ClassType>(); - Iterator iter = all.iterator(); - while (iter.hasNext()) { - ReferenceType refType = (ReferenceType)iter.next(); + for (ReferenceType refType : vm.allClasses()) { if (refType instanceof ClassType) { ClassType clazz = (ClassType)refType; ClassType superclass = clazz.superclass(); @@ -223,7 +220,7 @@ List<? extends Value> arguments = method.validateAndPrepareArgumentsForInvoke(origArguments); - ValueImpl[] args = (ValueImpl[])arguments.toArray(new ValueImpl[0]); + ValueImpl[] args = arguments.toArray(new ValueImpl[0]); JDWP.ClassType.InvokeMethod ret; try { PacketStream stream = @@ -271,7 +268,7 @@ List<Value> arguments = method.validateAndPrepareArgumentsForInvoke( origArguments); - ValueImpl[] args = (ValueImpl[])arguments.toArray(new ValueImpl[0]); + ValueImpl[] args = arguments.toArray(new ValueImpl[0]); JDWP.ClassType.NewInstance ret = null; try { PacketStream stream = @@ -301,11 +298,8 @@ } public Method concreteMethodByName(String name, String signature) { - List methods = visibleMethods(); Method method = null; - Iterator iter = methods.iterator(); - while (iter.hasNext()) { - Method candidate = (Method)iter.next(); + for (Method candidate : visibleMethods()) { if (candidate.name().equals(name) && candidate.signature().equals(signature) && !candidate.isAbstract()) { @@ -330,9 +324,7 @@ * Avoid duplicate checking on each method by iterating through * duplicate-free allInterfaces() rather than recursing */ - Iterator iter = allInterfaces().iterator(); - while (iter.hasNext()) { - InterfaceType interfaze = (InterfaceType)iter.next(); + for (InterfaceType interfaze : allInterfaces()) { list.addAll(interfaze.methods()); } Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/CommandSender.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/CommandSender.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/CommandSender.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1999, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConcreteMethodImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConcreteMethodImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConcreteMethodImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2008, 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 @@ -22,6 +22,7 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package com.sun.tools.jdi; import com.sun.jdi.*; @@ -246,7 +247,7 @@ public byte[] bytecodes() { byte[] bytecodes = (bytecodesRef == null) ? null : - (byte[])bytecodesRef.get(); + bytecodesRef.get(); if (bytecodes == null) { try { bytecodes = JDWP.Method.Bytecodes. @@ -261,7 +262,7 @@ * to return the cached bytecodes directly; instead, we * make a clone at the cost of using more memory. */ - return (byte[])bytecodes.clone(); + return bytecodes.clone(); } int argSlotCount() throws AbsentInformationException { @@ -278,7 +279,7 @@ String stratumID = stratum.id(); SoftLocationXRefs info = (softOtherLocationXRefsRef == null) ? null : - (SoftLocationXRefs)softOtherLocationXRefsRef.get(); + softOtherLocationXRefsRef.get(); if (info != null && info.stratumID.equals(stratumID)) { return info; } @@ -347,7 +348,7 @@ private SoftLocationXRefs getBaseLocations() { SoftLocationXRefs info = (softBaseLocationXRefsRef == null) ? null : - (SoftLocationXRefs)softBaseLocationXRefsRef.get(); + softBaseLocationXRefsRef.get(); if (info != null) { return info; } Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConnectorImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConnectorImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/ConnectorImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2003, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleTypeImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleTypeImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleTypeImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-1999 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 1999, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleValueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleValueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/DoubleValueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2004 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 2004, 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. */ package com.sun.tools.jdi; Modified: classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventQueueImpl.java =================================================================== --- classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventQueueImpl.java 2011-02-28 21:24:15 UTC (rev 5795) +++ classlib6/core/src/openjdk/com/com/sun/tools/jdi/EventQueueImpl.java 2011-03-05 11:01:11 UTC (rev 5796) @@ -1,12 +1,12 @@ /* - * Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved. + * Copyright (c) 1998, 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. ... [truncated message content] |