diff options
author | Mili Verma <mili.verma@isode.com> | 2012-01-10 15:55:29 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-01-11 13:44:37 (GMT) |
commit | be94e872d9423501c688c84c6cb945a420a5cb18 (patch) | |
tree | 77986e9e30282b526c0246bb6344c175b54ffb5f /src/com/isode/stroke/eventloop | |
parent | c9ff80a46b13b7d1987bf54cae87738a9baf552b (diff) | |
download | stroke-be94e872d9423501c688c84c6cb945a420a5cb18.zip stroke-be94e872d9423501c688c84c6cb945a420a5cb18.tar.bz2 |
Update review comment related stuff
This patch addresses some review comments:
1. Updates the Javadoc.
2. Disallows arguments from being null - throws NullPointerException.
3. Updates each test to use its own DummyEventLoop.
Test-information:
Unit tests pass.
Diffstat (limited to 'src/com/isode/stroke/eventloop')
-rw-r--r-- | src/com/isode/stroke/eventloop/DummyEventLoop.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/isode/stroke/eventloop/DummyEventLoop.java b/src/com/isode/stroke/eventloop/DummyEventLoop.java index 47f8928..dd2911a 100644 --- a/src/com/isode/stroke/eventloop/DummyEventLoop.java +++ b/src/com/isode/stroke/eventloop/DummyEventLoop.java @@ -12,9 +12,8 @@ package com.isode.stroke.eventloop; import java.util.Vector; /** - * Dummy event loop that can be used for tests, etc. - * - * @since 15.2 + * Dummy event loop that can be used for tests, etc. This class is thread-safe + * as it uses {@link Vector} which is thread-safe. */ public class DummyEventLoop extends EventLoop { private Vector<Event> events_ = new Vector<Event>(); @@ -26,7 +25,9 @@ public class DummyEventLoop extends EventLoop { } /** - * Process pending events. + * Process pending events. This method is thread-safe as it is intended to + * be always called from the same thread for an instance of + * {@link DummyEventLoop} */ public void processEvents() { while (!events_.isEmpty()) { |