From 9eb93842464171335f464fbf7fa759d3e5e209cf Mon Sep 17 00:00:00 2001
From: alanb
Date: Thu, 24 Jan 2013 09:47:09 +0000
Subject: [PATCH] 8006524: JSR-3: Allows java.beans to be optional Reviewed-by:
dfuchs, mchung
---
src/share/classes/javax/management/MXBean.java | 8 ++++++++
.../classes/javax/management/monitor/package.html | 15 ++++++++-------
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/share/classes/javax/management/MXBean.java b/src/share/classes/javax/management/MXBean.java
index c69143873..4ff10d360 100644
--- a/src/share/classes/javax/management/MXBean.java
+++ b/src/share/classes/javax/management/MXBean.java
@@ -907,6 +907,14 @@ public interface ModuleMXBean {
Otherwise, J is not reconstructible.
+ Rule 2 is not applicable to subset Profiles of Java SE that do not
+ include the {@code java.beans} package. When targeting a runtime that does
+ not include the {@code java.beans} package, and where there is a mismatch
+ between the compile-time and runtime environment whereby J is
+ compiled with a public constructor and the {@code ConstructorProperties}
+ annotation, then J is not reconstructible unless another rule
+ applies.
+
Here are examples showing different ways to code a type {@code
NamedNumber} that consists of an {@code int} and a {@code
String}. In each case, the {@code CompositeType} looks like this:
diff --git a/src/share/classes/javax/management/monitor/package.html b/src/share/classes/javax/management/monitor/package.html
index 282dd9263..a5050d77f 100644
--- a/src/share/classes/javax/management/monitor/package.html
+++ b/src/share/classes/javax/management/monitor/package.html
@@ -60,19 +60,20 @@ questions.
v. A value x is extracted from v as follows:
+
- If v is a {@link javax.management.openmbean.CompositeData
CompositeData} and if v.{@link
javax.management.openmbean.CompositeData#get(String) get}(e)
returns a value then x is that value.
- If v is an array and e is the string "length"
then x is the length of the array.
- - If the above rules do not produce a value, and if {@link
- java.beans.Introspector#getBeanInfo(Class) Introspector.getBeanInfo}
- for the class of v (v.getClass()) contains a
- {@link java.beans.PropertyDescriptor PropertyDescriptor} with the name
- e, then x is the result of calling the property's {@link
- java.beans.PropertyDescriptor#getReadMethod() read method} on
- v.
+
+ - If the above rules do not produce a value, and if introspection, as
+ if by calling {@link java.beans.Introspector#getBeanInfo(Class)
+ Introspector.getBeanInfo}, for the class of v
+ (v.getClass()) identifies a property with the name
+ e, then x is the result of reading the property value.
+
The third rule means for example that if the attribute
--
GitLab