incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spo...@apache.org
Subject svn commit: r892799 - in /incubator/kato/trunk/org.apache.kato: kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/ kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/
Date Mon, 21 Dec 2009 12:38:26 GMT
Author: spoole
Date: Mon Dec 21 12:38:25 2009
New Revision: 892799

URL: http://svn.apache.org/viewvc?rev=892799&view=rev
Log:
fixed bug in IBM  SPI dump initiator which stopped it being used

Modified:
    incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/AbstractIBMSPIBasedDumpInitiatorDelegate.java
    incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/ScenarioLauncher.java
    incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/StandardDumpTrigger.java

Modified: incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/AbstractIBMSPIBasedDumpInitiatorDelegate.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/AbstractIBMSPIBasedDumpInitiatorDelegate.java?rev=892799&r1=892798&r2=892799&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/AbstractIBMSPIBasedDumpInitiatorDelegate.java
(original)
+++ incubator/kato/trunk/org.apache.kato/kato.api.vm/src/main/java/javax/tools/diagnostics/vm/spi/delegates/AbstractIBMSPIBasedDumpInitiatorDelegate.java
Mon Dec 21 12:38:25 2009
@@ -27,14 +27,16 @@
 		try {
 			// does class exist?
 			Class clazz = Class.forName(COM_IBM_JVM_DUMP);
-			// instantiate it for self checking
-			clazz.newInstance();
 			String requiredMethod=getMethodName();
 			// store the dump method for later use
 			dumpMethod = clazz.getMethod(requiredMethod, new Class[0]);
 			return true;
 
-		} catch (Exception e) {
+		} catch(ClassNotFoundException cnfe) {
+			return false;
+		}
+		catch (Exception e) {
+			e.printStackTrace();
 			return false;
 		}
 

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/ScenarioLauncher.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/ScenarioLauncher.java?rev=892799&r1=892798&r2=892799&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/ScenarioLauncher.java
(original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/ScenarioLauncher.java
Mon Dec 21 12:38:25 2009
@@ -90,7 +90,7 @@
 		options.addOption(dumpclass);
 		
 		Option dumptype = OptionBuilder.withArgName(DUMPTYPE).hasArg()
-		.withDescription("dump type to generate").create(CLASS);
+		.withDescription("dump type to generate").create(DUMPTYPE);
 		options.addOption(dumptype);
 
 		return options;

Modified: incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/StandardDumpTrigger.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/StandardDumpTrigger.java?rev=892799&r1=892798&r2=892799&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/StandardDumpTrigger.java
(original)
+++ incubator/kato/trunk/org.apache.kato/kato.tck/harness/src/main/java/org/apache/kato/tck/harness/scenario/StandardDumpTrigger.java
Mon Dec 21 12:38:25 2009
@@ -15,6 +15,8 @@
 package org.apache.kato.tck.harness.scenario;
 
 import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
 
 import javax.tools.diagnostics.vm.DumpFactory;
 import javax.tools.diagnostics.vm.DumpHandle;
@@ -33,7 +35,20 @@
 		if(format!=null) {
 			DumpInitiatorDelegate delegate=d.getInitiator(format);
 			if(delegate==null) {
-				System.out.println("Dump format "+format+" requested but unavailable");
+				Collection available=d.getAvailableInitiators();
+				if(available==null || available.isEmpty()) {
+					System.out.println("!!!No Dump Initiators available");
+				}
+				else {
+					System.out.println("Dump format "+format+" requested but unavailable");
+					System.out.println("available formats are:");
+					Iterator i=available.iterator();
+					while(i.hasNext()) {
+						delegate=(DumpInitiatorDelegate) i.next();
+						System.out.println(delegate.getDumpType());
+					}
+				}
+				
 			}
 			else {
 				handle=delegate.createDumpHandle();



Mime
View raw message