Commit 60e656f5 by Keith Seitz Committed by Keith Seitz

ThreadStartEvent.java (Event): Event type is "THREAD_START" not "THREAD_END".

        * 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
parent c3b7031d
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> 2007-03-30 Andrew Haley <aph@redhat.com>
* javax/management/ObjectName.java: Handle 0-length names. * javax/management/ObjectName.java: Handle 0-length names.
/* ThreadStartEvent.java -- An event specifying that a new thread /* ThreadStartEvent.java -- An event specifying that a new thread
has started in the virtual machine 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. This file is part of GNU Classpath.
...@@ -75,7 +75,7 @@ public class ThreadStartEvent ...@@ -75,7 +75,7 @@ public class ThreadStartEvent
* @param thread the thread ID in which event occurred * @param thread the thread ID in which event occurred
*/ */
public ThreadStartEvent (Thread thread) { public ThreadStartEvent (Thread thread) {
super (JdwpConstants.EventKind.THREAD_END); super (JdwpConstants.EventKind.THREAD_START);
_thread = thread; _thread = thread;
} }
......
/* SocketTransport.java -- a socket transport /* 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. This file is part of GNU Classpath.
...@@ -89,27 +89,36 @@ class SocketTransport ...@@ -89,27 +89,36 @@ class SocketTransport
* @param properties the properties of the JDWP session * @param properties the properties of the JDWP session
* @throws TransportException for any configury errors * @throws TransportException for any configury errors
*/ */
public void configure (HashMap properties) public void configure(HashMap properties)
throws TransportException throws TransportException
{ {
// Get address [form: "hostname:port"] // Get server [form: "y" or "n"]
String p = (String) properties.get (_PROPERTY_ADDRESS); String p = (String) properties.get(_PROPERTY_SERVER);
if (p != null) if (p != null)
{ {
String[] s = p.split (":"); if (p.toLowerCase().equals("y"))
if (s.length == 2) _server = true;
{
_host = s[0];
_port = Integer.parseInt (s[1]);
}
} }
// Get server [form: "y" or "n"] // Get address [form: "hostname:port"]
p = (String) properties.get (_PROPERTY_SERVER); p = (String) properties.get(_PROPERTY_ADDRESS);
if (p != null) if (p != null)
{ {
if (p.toLowerCase().equals ("y")) String[] s = p.split(":");
_server = true; 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]);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment