ThreadStartEvent.java (Event): Event type is "THREAD_START" not "THREAD_END".
authorKeith Seitz <keiths@redhat.com>
Mon, 2 Apr 2007 21:32:10 +0000 (21:32 +0000)
committerKeith Seitz <kseitz@gcc.gnu.org>
Mon, 2 Apr 2007 21:32:10 +0000 (21:32 +0000)
        * gnu/classpath/jdwp/event/ThreadStartEvent.java (Event):
        Event type is "THREAD_START" not "THREAD_END".

        * gnu/classpath/jdwp/transport/SocketTransport.java (ITransport):
        Handle configure strings ":port" and "port".

From-SVN: r123436

libjava/classpath/ChangeLog
libjava/classpath/gnu/classpath/jdwp/event/ThreadStartEvent.java
libjava/classpath/gnu/classpath/jdwp/transport/SocketTransport.java

index 280af2b..569c260 100644 (file)
@@ -1,3 +1,11 @@
+2007-04-02  Keith Seitz  <keiths@redhat.com>
+
+       * gnu/classpath/jdwp/event/ThreadStartEvent.java (Event):
+       Event type is "THREAD_START" not "THREAD_END".
+
+       * gnu/classpath/jdwp/transport/SocketTransport.java (ITransport):
+       Handle configure strings ":port" and "port".
+
 2007-03-30  Andrew Haley  <aph@redhat.com>
 
        * javax/management/ObjectName.java: Handle 0-length names.
index f9c507d..4eff440 100644 (file)
@@ -1,6 +1,6 @@
 /* ThreadStartEvent.java -- An event specifying that a new thread
    has started in the virtual machine
-   Copyright (C) 2005 Free Software Foundation
+   Copyright (C) 2005, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -75,7 +75,7 @@ public class ThreadStartEvent
    * @param thread  the thread ID in which event occurred
    */
   public ThreadStartEvent (Thread thread) {
-    super (JdwpConstants.EventKind.THREAD_END);
+    super (JdwpConstants.EventKind.THREAD_START);
     _thread = thread;
   }
 
index 49d9e1f..3b0a8e7 100644 (file)
@@ -1,5 +1,5 @@
 /* SocketTransport.java -- a socket transport
-   Copyright (C) 2005 Free Software Foundation
+   Copyright (C) 2005, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -89,27 +89,36 @@ class SocketTransport
    * @param  properties  the properties of the JDWP session
    * @throws TransportException for any configury errors
    */
-  public void configure (HashMap properties)
+  public void configure(HashMap properties)
     throws TransportException
   {
-    // Get address [form: "hostname:port"]
-    String p = (String) properties.get (_PROPERTY_ADDRESS);
+    // Get server [form: "y" or "n"]
+    String p = (String) properties.get(_PROPERTY_SERVER);
     if (p != null)
       {
-       String[] s = p.split (":");
-       if (s.length == 2)
-         {
-           _host = s[0];
-           _port = Integer.parseInt (s[1]);
-         }
+       if (p.toLowerCase().equals("y"))
+         _server = true;
       }
 
-    // Get server [form: "y" or "n"]
-    p = (String) properties.get (_PROPERTY_SERVER);
+    // Get address [form: "hostname:port"]
+    p = (String) properties.get(_PROPERTY_ADDRESS);
     if (p != null)
       {
-       if (p.toLowerCase().equals ("y"))
-         _server = true;
+       String[] s = p.split(":");
+       if (s.length == 1)
+         {
+           // Port number only. Assume "localhost"
+           _port = Integer.parseInt(s[0]);
+           _host = "localhost";
+         }
+       else
+         {
+           if (s[0].length() == 0)
+             _host = "localhost";
+           else
+             _host = s[0];
+           _port = Integer.parseInt(s[1]);
+         }
       }
   }