diff options
author | Rafael H. Schloming <rhs@apache.org> | 2008-08-12 15:58:58 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2008-08-12 15:58:58 +0000 |
commit | dd54154fbffaa98477579b0784ec9e33da8f92f2 (patch) | |
tree | 5d6d7cad293fedff415288467b0adb3f62ee9bec /java/systests | |
parent | d7327d3630299b7802a857c70410e4f846b8a046 (diff) | |
download | qpid-python-dd54154fbffaa98477579b0784ec9e33da8f92f2.tar.gz |
QPID-1233: made getStringProperty(nonexistent) return null instead of NPE
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@685207 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests')
-rw-r--r-- | java/systests/src/main/java/org/apache/qpid/test/unit/basic/PropertyValueTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/unit/basic/PropertyValueTest.java b/java/systests/src/main/java/org/apache/qpid/test/unit/basic/PropertyValueTest.java index d9390c33df..48bd722aae 100644 --- a/java/systests/src/main/java/org/apache/qpid/test/unit/basic/PropertyValueTest.java +++ b/java/systests/src/main/java/org/apache/qpid/test/unit/basic/PropertyValueTest.java @@ -35,6 +35,7 @@ import org.apache.qpid.url.AMQBindingURL; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.jms.Connection; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.Message; @@ -90,6 +91,16 @@ public class PropertyValueTest extends QpidTestCase implements MessageListener connection.start(); } + public void testGetNonexistent() throws Exception + { + Connection conn = getConnection(); + Session ssn = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + Message m = ssn.createTextMessage(); + String s = m.getStringProperty("nonexistent"); + assertNull(s); + conn.close(); + } + public void testOnce() { runBatch(1); |