String lastVendor = null;
String lastVersion = null;
while ( iter.hasNext() )
{
final JVM jvm = (JVM)iter.next();
// the ObjectName of the Node must match the String version for "node"
assert( jvm.getnode() != null );
// the JVMs should all have the same vendor (presumably)
assert( jvm.getjavaVendor() != null );
if ( lastVendor == null )
{
lastVendor = jvm.getjavaVendor();
}
else
{
assert( lastVendor.equals( jvm.getjavaVendor() ) );
}
// the JVMs should all have the same version (presumably)
assert( jvm.getjavaVersion() != null );
if ( lastVersion == null )
{
lastVersion = jvm.getjavaVersion();
}
else
{
assert( lastVersion.equals( jvm.getjavaVersion() ) );
}
}
}