mx4j/src/core/javax/management/openmbean CompositeType.java,1.10,1.11
Jeremy Boynes <[email protected]> Tue, 08 Feb 2005 07:46:06 +0000
| Newsgroups | gmane.comp.java.mx4j.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mx4j/mx4j/src/core/javax/management/openmbean
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1211/src/core/javax/management/openmbean
Modified Files:
CompositeType.java
Log Message:
Fix for [ 1115215 ] CompositeType should throw IllegalArg if lengths differ
Bug in code was hidden by a bug in the testcase (description was empty)
Index: CompositeType.java
===================================================================
RCS file: /cvsroot/mx4j/mx4j/src/core/javax/management/openmbean/CompositeType.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** CompositeType.java 13 Nov 2004 16:38:22 -0000 1.10
--- CompositeType.java 8 Feb 2005 07:46:03 -0000 1.11
***************
*** 84,88 ****
* so just get the respective objects at the index
*/
! private void validate(String typeName, String description, String[] itemNames, String[] itemDescriptions, OpenType[] itemTypes) throws OpenDataException
{
if (typeName == null || typeName.length() == 0) throw new IllegalArgumentException("typeName can't be null or empty");
--- 84,88 ----
* so just get the respective objects at the index
*/
! private void validate(String typeName, String description, String[] itemNames, String[] itemDescriptions, OpenType[] itemTypes) throws IllegalArgumentException
{
if (typeName == null || typeName.length() == 0) throw new IllegalArgumentException("typeName can't be null or empty");
***************
*** 91,95 ****
if (itemDescriptions == null || itemDescriptions.length == 0) throw new IllegalArgumentException("The String[] of itemDescriptions cannot be null or empty");
if (itemTypes == null || itemTypes.length == 0) throw new IllegalArgumentException("The OpenType[] of itemTypes cannot be null or empty");
! if (itemDescriptions.length != itemNames.length || itemTypes.length != itemNames.length) throw new OpenDataException("itemNames, itemDescriptions and itemTypes must all be the same length");
for (int i = 0; i < itemNames.length; i++)
{
--- 91,95 ----
if (itemDescriptions == null || itemDescriptions.length == 0) throw new IllegalArgumentException("The String[] of itemDescriptions cannot be null or empty");
if (itemTypes == null || itemTypes.length == 0) throw new IllegalArgumentException("The OpenType[] of itemTypes cannot be null or empty");
! if (itemDescriptions.length != itemNames.length || itemTypes.length != itemNames.length) throw new IllegalArgumentException("itemNames, itemDescriptions and itemTypes must all be the same length");
for (int i = 0; i < itemNames.length; i++)
{
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click