summaryrefslogtreecommitdiff
path: root/javax/management/MBeanConstructorInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'javax/management/MBeanConstructorInfo.java')
-rw-r--r--javax/management/MBeanConstructorInfo.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/javax/management/MBeanConstructorInfo.java b/javax/management/MBeanConstructorInfo.java
index 832a3296d..9ddd432a8 100644
--- a/javax/management/MBeanConstructorInfo.java
+++ b/javax/management/MBeanConstructorInfo.java
@@ -89,10 +89,11 @@ public class MBeanConstructorInfo
* Constructs a @link{MBeanConstructorInfo} with the specified
* name, description and parameter information. A <code>null</code>
* value for the parameter information is the same as passing in
- * an empty array.
+ * an empty array. A copy of the parameter array is taken, so
+ * later changes have no effect.
*
* @param name the name of the constructor.
- * @param desc a description of the attribute.
+ * @param desc a description of the constructor.
* @param sig the signature of the constructor, as a series
* of {@link MBeanParameterInfo} objects, one for
* each parameter.
@@ -104,7 +105,10 @@ public class MBeanConstructorInfo
if (sig == null)
signature = new MBeanParameterInfo[0];
else
- signature = sig;
+ {
+ signature = new MBeanParameterInfo[sig.length];
+ System.arraycopy(sig, 0, signature, 0, sig.length);
+ }
}
/**