zhouxinyu closed pull request #214: [ROCKETMQ-351] Add a default value to 
expressionType and polish the j?
URL: https://github.com/apache/rocketmq/pull/214
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/common/src/main/java/org/apache/rocketmq/common/filter/ExpressionType.java 
b/common/src/main/java/org/apache/rocketmq/common/filter/ExpressionType.java
index 3b7940abc..bc37733ed 100644
--- a/common/src/main/java/org/apache/rocketmq/common/filter/ExpressionType.java
+++ b/common/src/main/java/org/apache/rocketmq/common/filter/ExpressionType.java
@@ -59,7 +59,7 @@
     public static final String TAG = "TAG";
 
     public static boolean isTagType(String type) {
-        if (type == null || TAG.equals(type)) {
+        if (type == null || "".equals(type) || TAG.equals(type)) {
             return true;
         }
         return false;
diff --git 
a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/SubscriptionData.java
 
b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/SubscriptionData.java
index e456b7e60..83e254f22 100644
--- 
a/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/SubscriptionData.java
+++ 
b/common/src/main/java/org/apache/rocketmq/common/protocol/heartbeat/SubscriptionData.java
@@ -21,6 +21,8 @@
 package org.apache.rocketmq.common.protocol.heartbeat;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import org.apache.rocketmq.common.filter.ExpressionType;
+
 import java.util.HashSet;
 import java.util.Set;
 
@@ -32,7 +34,7 @@
     private Set<String> tagsSet = new HashSet<String>();
     private Set<Integer> codeSet = new HashSet<Integer>();
     private long subVersion = System.currentTimeMillis();
-    private String expressionType;
+    private String expressionType = ExpressionType.TAG;
 
     @JSONField(serialize = false)
     private String filterClassSource;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to