activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-6130 - java beans @Transient annotation
Date Mon, 18 Jan 2016 08:42:04 GMT
Repository: activemq
Updated Branches:
  refs/heads/master df868fe4a -> a3fa0da6e


https://issues.apache.org/jira/browse/AMQ-6130 - java beans @Transient annotation


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/a3fa0da6
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/a3fa0da6
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/a3fa0da6

Branch: refs/heads/master
Commit: a3fa0da6ec67d8b052b52e55b77e41007e787809
Parents: df868fe
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Mon Jan 18 09:35:45 2016 +0100
Committer: Dejan Bosanac <dejan@nighttale.net>
Committed: Mon Jan 18 09:38:09 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/activemq/command/Message.java    | 2 ++
 .../org/apache/activemq/command/ActiveMQTextMessageTest.java  | 7 +++++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a3fa0da6/activemq-client/src/main/java/org/apache/activemq/command/Message.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/command/Message.java b/activemq-client/src/main/java/org/apache/activemq/command/Message.java
index 4c57feb..b2640b3 100755
--- a/activemq-client/src/main/java/org/apache/activemq/command/Message.java
+++ b/activemq-client/src/main/java/org/apache/activemq/command/Message.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.command;
 
+import java.beans.Transient;
 import java.io.DataInputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -628,6 +629,7 @@ public abstract class Message extends BaseCommand implements MarshallAware,
Mess
     }
 
     @Override
+    @Transient
 	public MessageDestination getRegionDestination() {
         return regionDestination;
     }

http://git-wip-us.apache.org/repos/asf/activemq/blob/a3fa0da6/activemq-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQTextMessageTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQTextMessageTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQTextMessageTest.java
index 28fc307..174e20b 100755
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQTextMessageTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQTextMessageTest.java
@@ -16,8 +16,10 @@
  */
 package org.apache.activemq.command;
 
+import java.beans.Transient;
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.lang.reflect.Method;
 
 import javax.jms.JMSException;
 import javax.jms.MessageNotReadableException;
@@ -148,6 +150,11 @@ public class ActiveMQTextMessageTest extends TestCase {
     	setContent(nullMessage, null);
     	assertTrue(nullMessage.toString().contains("text = null"));
     }
+
+    public void testTransient() throws Exception {
+        Method method = ActiveMQTextMessage.class.getMethod("getRegionDestination", null);
+        assertTrue(method.isAnnotationPresent(Transient.class));
+    }
     
     protected void setContent(Message message, String text) throws Exception {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();


Mime
View raw message