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/serializer/xml | |
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/serializer/xml')
-rw-r--r-- | src/com/isode/stroke/serializer/xml/XMLTextNode.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/isode/stroke/serializer/xml/XMLTextNode.java b/src/com/isode/stroke/serializer/xml/XMLTextNode.java index 22a6785..b6940c4 100644 --- a/src/com/isode/stroke/serializer/xml/XMLTextNode.java +++ b/src/com/isode/stroke/serializer/xml/XMLTextNode.java @@ -31,6 +31,10 @@ public class XMLTextNode implements XMLNode { * @return new object, will never be null */ public static XMLTextNode create(String text) { + if (text == null) { + throw new NullPointerException("'text' must not be null"); + } + return new XMLTextNode(text); } } |