incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spo...@apache.org
Subject svn commit: r785521 - /incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tck.harness/src/main/java/org/apache/kato/tck/harness/TCKJavaRuntimeTestcase.java
Date Wed, 17 Jun 2009 09:21:13 GMT
Author: spoole
Date: Wed Jun 17 09:21:13 2009
New Revision: 785521

URL: http://svn.apache.org/viewvc?rev=785521&view=rev
Log:
small change to get TCKTestcaseRunner to compile

Modified:
    incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tck.harness/src/main/java/org/apache/kato/tck/harness/TCKJavaRuntimeTestcase.java

Modified: incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tck.harness/src/main/java/org/apache/kato/tck/harness/TCKJavaRuntimeTestcase.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tck.harness/src/main/java/org/apache/kato/tck/harness/TCKJavaRuntimeTestcase.java?rev=785521&r1=785520&r2=785521&view=diff
==============================================================================
--- incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tck.harness/src/main/java/org/apache/kato/tck/harness/TCKJavaRuntimeTestcase.java
(original)
+++ incubator/kato/branches/experimental/maven_restructure/org.apache.kato/kato.tck.harness/src/main/java/org/apache/kato/tck/harness/TCKJavaRuntimeTestcase.java
Wed Jun 17 09:21:13 2009
@@ -16,6 +16,7 @@
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 
 import org.apache.kato.image.CorruptData;
 import org.apache.kato.image.CorruptDataException;
@@ -55,9 +56,8 @@
 			throws CorruptDataException {
 				JavaField foundField = null;
 				
-				for(Iterator fields = javaClass.getDeclaredFields(); fields.hasNext();) {
-					Object nextField = fields.next();
-					
+				for(JavaField nextField : javaClass.getDeclaredFields()) {
+										
 					if (nextField instanceof CorruptData) {
 						continue;
 					}
@@ -136,7 +136,7 @@
 		// Find the bootstrap loader using the idea that it it the only loader to have loaded itself
 		JavaClassLoader bootLoader = null;
 		HashMap loaders = new HashMap();
-		for (Iterator i = run.getJavaClassLoaders(); i.hasNext();) {
+		for (Iterator i = run.getJavaClassLoaders().iterator(); i.hasNext();) {
 			Object next = i.next();
 			if (next instanceof CorruptData) {
 				continue;
@@ -215,13 +215,13 @@
 	private JavaClassLoader getClassLoader2(JavaClass j1) throws CorruptDataException {		
 		JavaClassLoader load = null;
 		JavaRuntime run = getJavaRuntime();
-		for (Iterator i = run.getJavaClassLoaders(); i.hasNext();) {
+		for (Iterator i = run.getJavaClassLoaders().iterator(); i.hasNext();) {
 			Object next = i.next();
 			if (next instanceof CorruptData) {
 				continue;
 			}
 			JavaClassLoader jcl = (JavaClassLoader)next;
-			for (Iterator j = jcl.getDefinedClasses();j.hasNext();) {
+			for (Iterator j = jcl.getDefinedClasses().iterator();j.hasNext();) {
 				Object next2 = j.next();
 				if (next2 instanceof CorruptData) {
 					continue;
@@ -255,7 +255,7 @@
 	public JavaObject getJavaObjectByClassname(String className) {
 		JavaRuntime run = getJavaRuntime();
 		
-		for(Iterator heaps = run.getHeaps(); heaps.hasNext();) {
+		for(Iterator heaps = run.getHeaps().iterator(); heaps.hasNext();) {
 			Object nextHeap = heaps.next(); 
 			
 			if (nextHeap instanceof CorruptData) {
@@ -264,7 +264,7 @@
 			
 			JavaHeap heap = (JavaHeap) nextHeap;
 			
-			for(Iterator objects = heap.getObjects(); objects.hasNext();) {
+			for(Iterator objects = heap.getObjects().iterator(); objects.hasNext();) {
 				Object nextObject = objects.next();
 				
 				if (nextObject instanceof CorruptData) {



Mime
View raw message