提交 a096580f 编写于 作者: E Eric Liu 提交者: yukon

[ROCKETMQ-351] Add a default value to expressionType and polish the judgement. (#214)

上级 d849e0ad
......@@ -59,7 +59,7 @@ public class ExpressionType {
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;
......
......@@ -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 @@ public class SubscriptionData implements Comparable<SubscriptionData> {
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册