JDK-6752563 : Allow CompositeDataSupport to have zero items
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-09-25
  • Updated: 2017-05-16
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b41Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
RFE 6405862 changed CompositeType so that it can now have zero items. This follows 5072004, which allows a CompositeData to have additional items beyond the ones that are declared in the CompositeType, and that is the principal intended use of the change. Nevertheless, it seems odd to require that a CompositeType with zero items *must* be associated with additional items in the CompositeData. In other words, there is now a corner case where if the set of additional items happens to be zero the CompositeData will be rejected.

The proposed change is to remove the constraint whereby the items given to either of the CompositeDataSupport constructors must not be empty.

Comments
SUGGESTED FIX In the three places where the CompositeDataSupport constructors say "must not be null or empty", change it to "must not be null", and in the two @throws clauses for IllegalArgumentException change "itemNames[] or itemValues[] is null or empty" to "itemNames[] or itemValues[] is null" and change "items is null or empty" to "items is null".
25-09-2008

EVALUATION Simple and consistent fix.
25-09-2008