diff --git a/src/share/classes/javax/management/AttributeList.java b/src/share/classes/javax/management/AttributeList.java
index 1ce3004a337594dfe4c9d5a76f0394bf14a662e7..a629d57ccd4fdaa5c7cc34f759dc0016e51eabeb 100644
--- a/src/share/classes/javax/management/AttributeList.java
+++ b/src/share/classes/javax/management/AttributeList.java
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,17 +27,23 @@ package javax.management;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
/**
- * Represents a list of values for attributes of an MBean. The methods
- * used for the insertion of {@link javax.management.Attribute
- * Attribute} objects in the AttributeList
overrides the
- * corresponding methods in the superclass
- * ArrayList
. This is needed in order to insure that the
- * objects contained in the AttributeList
are only
- * Attribute
objects. This avoids getting an exception
- * when retrieving elements from the AttributeList
.
+ *
Represents a list of values for attributes of an MBean. See the + * {@link MBeanServerConnection#getAttributes getAttributes} and + * {@link MBeanServerConnection#setAttributes setAttributes} methods of + * {@link MBeanServer} and {@link MBeanServerConnection}.
+ * + *For compatibility reasons, it is possible, though + * highly discouraged, to add objects to an {@code AttributeList} that are + * not instances of {@code Attribute}. However, an {@code AttributeList} + * can be made type-safe, which means that an attempt to add + * an object that is not an {@code Attribute} will produce an {@code + * IllegalArgumentException}. An {@code AttributeList} becomes type-safe + * when the method {@link #asList()} is called on it.
* * @since 1.5 */ @@ -58,8 +64,8 @@ import java.util.List; */ public class AttributeList extends ArrayList