harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r627723 - in /harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp: DebuggerOnDemand/ Events/ ThreadReference/ share/
Date Thu, 14 Feb 2008 12:27:31 GMT
Author: odeakin
Date: Thu Feb 14 04:27:29 2008
New Revision: 627723

URL: http://svn.apache.org/viewvc?rev=627723&view=rev
Log:
Clean up some compiler warnings.

Modified:
    harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/DebuggerOnDemand/OnthowDebuggerLaunchDebuggee.java
    harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ClassUnloadDebuggee.java
    harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents002Test.java
    harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents003Test.java
    harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTest.java
    harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTestCase.java
    harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionTest.java
    harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java
    harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/share/JDWPUnitDebuggeeProcessWrapper.java

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/DebuggerOnDemand/OnthowDebuggerLaunchDebuggee.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/DebuggerOnDemand/OnthowDebuggerLaunchDebuggee.java?rev=627723&r1=627722&r2=627723&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/DebuggerOnDemand/OnthowDebuggerLaunchDebuggee.java
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/DebuggerOnDemand/OnthowDebuggerLaunchDebuggee.java
Thu Feb 14 04:27:29 2008
@@ -91,5 +91,6 @@
     protected JPDADebuggeeSynchronizer synchronizer;
 }
 
+@SuppressWarnings("serial")
 class ExceptionForDebugger extends Exception {
 }

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ClassUnloadDebuggee.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ClassUnloadDebuggee.java?rev=627723&r1=627722&r2=627723&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ClassUnloadDebuggee.java
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ClassUnloadDebuggee.java
Thu Feb 14 04:27:29 2008
@@ -29,7 +29,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
-import java.util.LinkedList;
 
 import org.apache.harmony.jpda.tests.framework.LogWriter;
 import org.apache.harmony.jpda.tests.framework.TestErrorException;
@@ -94,7 +93,6 @@
      */
     protected void createMemoryStress(int arrayLength_0, int arrayLength_1) {
         Runtime currentRuntime = Runtime.getRuntime();
-        boolean isOutOfMemory = false;
         long freeMemory = currentRuntime.freeMemory();
         logWriter.println
         ("--> Debuggee: createMemoryStress: freeMemory (bytes) before memory stress =
" + freeMemory);
@@ -109,7 +107,6 @@
             }
             logWriter.println("--> Debuggee: createMemoryStress: NO OutOfMemoryError!!!");
         } catch ( OutOfMemoryError outOfMem ) {
-            isOutOfMemory = true;
             longArrayForCreatingMemoryStress = null;
             logWriter.println("--> Debuggee: createMemoryStress: OutOfMemoryError!!!");
         }
@@ -168,16 +165,16 @@
             this.logWriter = writer;
         }
 
-        public Class loadClass(String name) throws ClassNotFoundException {
-    		if (TESTED_CLASS_NAME.equals(name)) {
-    			// load only tested class with this loader
-    			return findClass(name);
-        	}
-			return getParent().loadClass(name);
+        public Class<?> loadClass(String name) throws ClassNotFoundException {
+            if (TESTED_CLASS_NAME.equals(name)) {
+                // load only tested class with this loader
+                return findClass(name);
+            }
+            return getParent().loadClass(name);
         }
 
-        public Class findClass(String name) throws ClassNotFoundException {
-    		try {
+        public Class<?> findClass(String name) throws ClassNotFoundException {
+            try {
                 logWriter.println("-->> CustomClassLoader: Find class: " + name);
 	        	String res = name.replace('.', '/') + ".class";
 	            URL url = getResource(res);

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents002Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents002Test.java?rev=627723&r1=627722&r2=627723&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents002Test.java
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents002Test.java
Thu Feb 14 04:27:29 2008
@@ -97,7 +97,6 @@
                 + TESTED_METHOD_NAME + "' ";
             printErrorAndFail(failureMessage);
         }
-        boolean expectColocatedEvents = (testedMethodStartCodeIndex == testedMethodEndCodeIndex);
 
         logWriter.println("==> ");
         logWriter.println("==> Set request for METHOD_ENTRY event for '" + TESTED_CLASS_NAME
+ "'... ");

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents003Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents003Test.java?rev=627723&r1=627722&r2=627723&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents003Test.java
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEvents003Test.java
Thu Feb 14 04:27:29 2008
@@ -50,7 +50,6 @@
         "org.apache.harmony.jpda.tests.jdwp.Events.CombinedEvents003Debuggee";
     
     private boolean eventVmDeathReceived = false;
-    private boolean eventMethodExitReceived = false;
 
     protected String getDebuggeeClassName() {
         return CombinedEvents003Debuggee.class.getName();
@@ -73,7 +72,6 @@
                 JDWPConstants.EventKind.BREAKPOINT,
                 JDWPConstants.EventKind.SINGLE_STEP,
                 JDWPConstants.EventKind.METHOD_EXIT};
-        int EXPECTED_EVENTS_COUNT = EXPECTED_EVENTS_ARRAY.length;
 
         String debuggeeMainThreadName = synchronizer.receiveMessage();
 
@@ -210,9 +208,6 @@
                         + parsedEvents[i].getRequestID());
                 if ( parsedEvents[i].getEventKind() == JDWPConstants.EventKind.VM_DEATH )
{
                     eventVmDeathReceived = true;
-                }
-                if ( parsedEvents[i].getEventKind() == JDWPConstants.EventKind.METHOD_EXIT
) {
-                    eventMethodExitReceived = true;
                 }
             }
             if ( eventVmDeathReceived ) {

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTest.java?rev=627723&r1=627722&r2=627723&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTest.java
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTest.java
Thu Feb 14 04:27:29 2008
@@ -81,7 +81,6 @@
                 JDWPConstants.EventKind.SINGLE_STEP,
                 JDWPConstants.EventKind.BREAKPOINT,
             };
-        int EXPECTED_EVENTS_COUNT = EXPECTED_EVENTS_ARRAY.length;
 
         String debuggeeMainThreadName = synchronizer.receiveMessage();
 
@@ -209,7 +208,6 @@
                 JDWPConstants.EventKind.BREAKPOINT,
                 JDWPConstants.EventKind.METHOD_EXIT,
             };
-        int EXPECTED_EVENTS_COUNT = EXPECTED_EVENTS_ARRAY.length;
 
         synchronizer.receiveMessage(JPDADebuggeeSynchronizer.SGNL_READY);
 
@@ -345,7 +343,6 @@
                 JDWPConstants.EventKind.METHOD_ENTRY,
                 JDWPConstants.EventKind.SINGLE_STEP,
             };
-        int EXPECTED_EVENTS_COUNT = EXPECTED_EVENTS_ARRAY.length;
 
         String debuggeeMainThreadName = synchronizer.receiveMessage();
 
@@ -729,8 +726,7 @@
                 
         }
         if ( (! success) || (! locationsOK) ) {
-            String failureMessage = "## FAILURE during checking events! !";
-            //DBG__printErrorAndFail(failureMessage);
+            logWriter.println("## FAILURE during checking events!");
         }
         logWriter.println("");
         logWriter.println("=> Clean request for METHOD_ENTRY event...");
@@ -891,7 +887,7 @@
                 
         }
         if ( (! success) || (! locationsOK) ) {
-            String failureMessage = "## FAILURE during checking events !";
+            logWriter.println("## FAILURE during checking events!");
             //DBG__printErrorAndFail(failureMessage);
         }
         if ( eventMethodExitReceived ) {

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTestCase.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTestCase.java?rev=627723&r1=627722&r2=627723&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTestCase.java
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/CombinedEventsTestCase.java
Thu Feb 14 04:27:29 2008
@@ -112,7 +112,8 @@
         long methodStartCodeIndex = lineTableReply.getNextValueAsLong();
         return methodStartCodeIndex;
     }
-    
+
+    @SuppressWarnings("unused")
     long getMethodEndCodeIndex(long classID, String methodName) {
         long methodID = debuggeeWrapper.vmMirror.getMethodID(classID, methodName);
         if ( methodID == -1 ) {
@@ -165,6 +166,7 @@
         return location;
     }
 
+    @SuppressWarnings("unused")
     protected Location getMethodEndLocation(long classID, String methodName) {
         long methodID = debuggeeWrapper.vmMirror.getMethodID(classID, methodName);
         if ( methodID == -1 ) {

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionTest.java?rev=627723&r1=627722&r2=627723&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionTest.java
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/Events/ExceptionTest.java
Thu Feb 14 04:27:29 2008
@@ -169,6 +169,7 @@
         debuggeeWrapper.vmMirror.resume();
     }
 
+    @SuppressWarnings("unused")
     private Location getTopFrameLocation(long threadID) {
 
         // getting frames of the thread

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java?rev=627723&r1=627722&r2=627723&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/ThreadReference/FramesTest.java
Thu Feb 14 04:27:29 2008
@@ -421,7 +421,7 @@
 
     private Vector getFrames(int startFrame, int length) {
 
-        Vector frames = new Vector();
+        Vector<FrameStruct> frames = new Vector<FrameStruct>();
         
         logWriter.println("startFrame=" + startFrame
                 + "; length=" + length);

Modified: harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/share/JDWPUnitDebuggeeProcessWrapper.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/share/JDWPUnitDebuggeeProcessWrapper.java?rev=627723&r1=627722&r2=627723&view=diff
==============================================================================
--- harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/share/JDWPUnitDebuggeeProcessWrapper.java
(original)
+++ harmony/enhanced/jdktools/trunk/modules/jpda/src/test/java/org/apache/harmony/jpda/tests/jdwp/share/JDWPUnitDebuggeeProcessWrapper.java
Thu Feb 14 04:27:29 2008
@@ -202,7 +202,7 @@
 
         int len = cmd.length();
         char chars[] = new char[len];
-        Vector argv = new Vector();
+        Vector<String> argv = new Vector<String>();
 
         if (len > 0) {
             for (int arg = 0; arg < len;) {
@@ -250,7 +250,7 @@
     	logWriter.println("Splitted command line: " + argv);
         int size = argv.size();
         String args[] = new String[size];
-        return (String[])argv.toArray(args);
+        return (String[])argv.toArray((String[])args);
 	}
 
     /**



Mime
View raw message