diff options
-rw-r--r-- | plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java | 8 | ||||
-rw-r--r-- | plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/Activator.java | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java index 55f3806aa..3f9939b21 100644 --- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java +++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/protocol/Protocol.java @@ -246,7 +246,7 @@ public final class Protocol { public static synchronized void log(String msg, Throwable x) { if (logger == null) { System.err.println(msg); - x.printStackTrace(); + if (x != null) x.printStackTrace(); } else { logger.log(msg, x); @@ -275,6 +275,12 @@ public final class Protocol { /** * Interface to be implemented by clients willing to be notified when * new TCF communication channel is opened. + * + * The interface allows a client to get pointers to channel objects + * that were opened by somebody else. If a client open a channel itself, it already has + * the pointer and does not need Protocol.ChannelOpenListener. If a channel is created, + * for example, by remote peer connecting to the client, the only way to get the pointer + * is Protocol.ChannelOpenListener. */ public interface ChannelOpenListener { public void onChannelOpen(IChannel channel); diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/Activator.java b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/Activator.java index 53532ecd8..6e5b3c0b4 100644 --- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/Activator.java +++ b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/Activator.java @@ -59,7 +59,7 @@ public class Activator extends Plugin { public void log(String msg, Throwable x) { if (debug) { System.err.println(msg); - x.printStackTrace(); + if (x != null) x.printStackTrace(); } if (plugin != null && getLog() != null) { getLog().log(new Status(IStatus.ERROR, |