classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] [PATCH/JDWP] Fix CommandSets thinko


From: Keith Seitz
Subject: [cp-patches] [PATCH/JDWP] Fix CommandSets thinko
Date: Thu, 08 Sep 2005 10:21:05 -0700
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Hi,

I've committed the attached patch which changes the return value to *CommandSet.runCommand to abide by the API specified by CommandSet.runCommand.

Keith

ChangeLog
2005-09-08  Keith Seitz  <address@hidden>

        * gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java
        (runCommand): Return value is true to indicate that the back-end
        should shutdown; not whether it should stay alive.
        * gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/ClassTypeCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/EventRequestCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/MethodCommandSet.java (runCommand):
        Likewise
        * gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/StackFrameCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/StringReferenceCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java
        (runCommand): Likewise.
        * gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java
        (runCommand): Likewise.
Index: ArrayReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ArrayReferenceCommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 ArrayReferenceCommandSet.java
--- ArrayReferenceCommandSet.java       25 Aug 2005 22:09:49 -0000      1.2
+++ ArrayReferenceCommandSet.java       8 Sep 2005 16:53:44 -0000
@@ -88,7 +88,8 @@ public class ArrayReferenceCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeLength(ByteBuffer bb, DataOutputStream os)
Index: ArrayTypeCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ArrayTypeCommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 ArrayTypeCommandSet.java
--- ArrayTypeCommandSet.java    25 Aug 2005 22:09:49 -0000      1.2
+++ ArrayTypeCommandSet.java    8 Sep 2005 16:53:44 -0000
@@ -82,7 +82,8 @@ public class ArrayTypeCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   public void executeNewInstance(ByteBuffer bb, DataOutputStream os)
Index: ClassLoaderReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ClassLoaderReferenceCommandSet.java,v
retrieving revision 1.4
diff -u -p -r1.4 ClassLoaderReferenceCommandSet.java
--- ClassLoaderReferenceCommandSet.java 2 Sep 2005 20:48:25 -0000       1.4
+++ ClassLoaderReferenceCommandSet.java 8 Sep 2005 16:53:44 -0000
@@ -86,7 +86,8 @@ public class ClassLoaderReferenceCommand
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+   return false;
   }
 
   public void executeVisibleClasses(ByteBuffer bb, DataOutputStream os)
Index: ClassObjectReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ClassObjectReferenceCommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 ClassObjectReferenceCommandSet.java
--- ClassObjectReferenceCommandSet.java 25 Aug 2005 22:09:49 -0000      1.2
+++ ClassObjectReferenceCommandSet.java 8 Sep 2005 16:53:44 -0000
@@ -79,7 +79,8 @@ public class ClassObjectReferenceCommand
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   public void executeReflectedType(ByteBuffer bb, DataOutputStream os)
Index: ClassTypeCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ClassTypeCommandSet.java,v
retrieving revision 1.4
diff -u -p -r1.4 ClassTypeCommandSet.java
--- ClassTypeCommandSet.java    2 Sep 2005 20:48:25 -0000       1.4
+++ ClassTypeCommandSet.java    8 Sep 2005 16:53:44 -0000
@@ -95,7 +95,8 @@ public class ClassTypeCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeSuperclass(ByteBuffer bb, DataOutputStream os)
Index: EventRequestCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/EventRequestCommandSet.java,v
retrieving revision 1.3
diff -u -p -r1.3 EventRequestCommandSet.java
--- EventRequestCommandSet.java 25 Aug 2005 22:22:35 -0000      1.3
+++ EventRequestCommandSet.java 8 Sep 2005 16:53:44 -0000
@@ -102,7 +102,8 @@ public class EventRequestCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeSet(ByteBuffer bb, DataOutputStream os)
Index: MethodCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/MethodCommandSet.java,v
retrieving revision 1.3
diff -u -p -r1.3 MethodCommandSet.java
--- MethodCommandSet.java       2 Sep 2005 20:48:25 -0000       1.3
+++ MethodCommandSet.java       8 Sep 2005 16:53:44 -0000
@@ -94,7 +94,8 @@ public class MethodCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeLineTable(ByteBuffer bb, DataOutputStream os)
Index: ObjectReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ObjectReferenceCommandSet.java,v
retrieving revision 1.5
diff -u -p -r1.5 ObjectReferenceCommandSet.java
--- ObjectReferenceCommandSet.java      2 Sep 2005 20:48:25 -0000       1.5
+++ ObjectReferenceCommandSet.java      8 Sep 2005 16:53:44 -0000
@@ -106,7 +106,8 @@ public class ObjectReferenceCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeReferenceType(ByteBuffer bb, DataOutputStream os)
Index: ReferenceTypeCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java,v
retrieving revision 1.4
diff -u -p -r1.4 ReferenceTypeCommandSet.java
--- ReferenceTypeCommandSet.java        2 Sep 2005 20:48:25 -0000       1.4
+++ ReferenceTypeCommandSet.java        8 Sep 2005 16:53:44 -0000
@@ -128,7 +128,8 @@ public class ReferenceTypeCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeSignature(ByteBuffer bb, DataOutputStream os)
Index: StackFrameCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/StackFrameCommandSet.java,v
retrieving revision 1.5
diff -u -p -r1.5 StackFrameCommandSet.java
--- StackFrameCommandSet.java   2 Sep 2005 20:48:25 -0000       1.5
+++ StackFrameCommandSet.java   8 Sep 2005 16:53:44 -0000
@@ -91,7 +91,8 @@ public class StackFrameCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeGetValues(ByteBuffer bb, DataOutputStream os)
Index: StringReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/StringReferenceCommandSet.java,v
retrieving revision 1.3
diff -u -p -r1.3 StringReferenceCommandSet.java
--- StringReferenceCommandSet.java      25 Aug 2005 22:09:49 -0000      1.3
+++ StringReferenceCommandSet.java      8 Sep 2005 16:53:44 -0000
@@ -84,7 +84,8 @@ public class StringReferenceCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeValue(ByteBuffer bb, DataOutputStream os)
Index: ThreadGroupReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ThreadGroupReferenceCommandSet.java,v
retrieving revision 1.2
diff -u -p -r1.2 ThreadGroupReferenceCommandSet.java
--- ThreadGroupReferenceCommandSet.java 25 Aug 2005 22:09:49 -0000      1.2
+++ ThreadGroupReferenceCommandSet.java 8 Sep 2005 16:53:44 -0000
@@ -85,7 +85,8 @@ public class ThreadGroupReferenceCommand
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeName(ByteBuffer bb, DataOutputStream os)
Index: ThreadReferenceCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/ThreadReferenceCommandSet.java,v
retrieving revision 1.5
diff -u -p -r1.5 ThreadReferenceCommandSet.java
--- ThreadReferenceCommandSet.java      2 Sep 2005 20:48:25 -0000       1.5
+++ ThreadReferenceCommandSet.java      8 Sep 2005 16:53:44 -0000
@@ -118,7 +118,8 @@ public class ThreadReferenceCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return true;
+
+    return false;
   }
 
   private void executeName(ByteBuffer bb, DataOutputStream os)
Index: VirtualMachineCommandSet.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/gnu/classpath/jdwp/processor/VirtualMachineCommandSet.java,v
retrieving revision 1.4
diff -u -p -r1.4 VirtualMachineCommandSet.java
--- VirtualMachineCommandSet.java       2 Sep 2005 20:48:25 -0000       1.4
+++ VirtualMachineCommandSet.java       8 Sep 2005 16:53:44 -0000
@@ -67,7 +67,7 @@ public class VirtualMachineCommandSet
   public boolean runCommand(ByteBuffer bb, DataOutputStream os, byte command)
     throws JdwpException
   {
-    boolean keepRunning = true;
+    boolean shutdown = false;
     try
       {
         switch (command)
@@ -91,7 +91,7 @@ public class VirtualMachineCommandSet
             executeIDsizes(bb, os);
             break;
           case JdwpConstants.CommandSet.VirtualMachine.DISPOSE:
-            keepRunning = false;
+            shutdown = true;
             executeDispose(bb, os);
             break;
           case JdwpConstants.CommandSet.VirtualMachine.SUSPEND:
@@ -101,7 +101,7 @@ public class VirtualMachineCommandSet
             executeResume(bb, os);
             break;
           case JdwpConstants.CommandSet.VirtualMachine.EXIT:
-            keepRunning = false;
+           shutdown = true;
             executeExit(bb, os);
             break;
           case JdwpConstants.CommandSet.VirtualMachine.CREATE_STRING:
@@ -145,7 +145,8 @@ public class VirtualMachineCommandSet
         // So if we throw an IOException we're in serious trouble
         throw new JdwpInternalErrorException(ex);
       }
-    return keepRunning;
+
+    return shutdown;
   }
 
   private void executeVersion(ByteBuffer bb, DataOutputStream os)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]