diff options
author | Keith Seitz <keiths@redhat.com> | 2007-03-29 23:49:48 +0000 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2007-03-29 23:49:48 +0000 |
commit | fac1fcca82be8c3bcc397498e6e9035a3cbd90b2 (patch) | |
tree | 5f424a9395000a49061320d5a959ca95393e47f7 | |
parent | f6235fbbc9fd160c590601762ffd312863e5111e (diff) | |
download | classpath-fac1fcca82be8c3bcc397498e6e9035a3cbd90b2.tar.gz |
* gnu/classpath/jdwp/event/ThreadStartEvent.java (Event):
Event type is "THREAD_START" not "THERAD_END".
* gnu/classpath/jdwp/transport/SocketTransport.java (ITransport):
Handle configure strings ":port" and "port".
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gnu/classpath/jdwp/event/ThreadStartEvent.java | 4 | ||||
-rw-r--r-- | gnu/classpath/jdwp/transport/SocketTransport.java | 40 |
3 files changed, 36 insertions, 16 deletions
@@ -1,3 +1,11 @@ +2007-03-29 Keith Seitz <keiths@redhat.com> + + * gnu/classpath/jdwp/event/ThreadStartEvent.java (Event): + Event type is "THREAD_START" not "THERAD_END". + + * gnu/classpath/jdwp/transport/SocketTransport.java (ITransport): + Handle configure strings ":port" and "port". + 2007-03-29 Francis Kung <fkung@redhat.com> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkToolkit.c diff --git a/gnu/classpath/jdwp/event/ThreadStartEvent.java b/gnu/classpath/jdwp/event/ThreadStartEvent.java index f9c507dfb..4eff4409e 100644 --- a/gnu/classpath/jdwp/event/ThreadStartEvent.java +++ b/gnu/classpath/jdwp/event/ThreadStartEvent.java @@ -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; } diff --git a/gnu/classpath/jdwp/transport/SocketTransport.java b/gnu/classpath/jdwp/transport/SocketTransport.java index 49d9e1f3b..e3875fe06 100644 --- a/gnu/classpath/jdwp/transport/SocketTransport.java +++ b/gnu/classpath/jdwp/transport/SocketTransport.java @@ -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,39 @@ 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) + { + // Assume localhost for non-server case or + // port number for server case + if (_server) + _port = Integer.parseInt(s[0]); + else + _host = "localhost"; + } + else + { + if (s[0].length() == 0) + _host = "localhost"; + else + _host = s[0]; + _port = Integer.parseInt(s[1]); + } } } |