Commit c9cf7f39 authored by yanchenyun's avatar yanchenyun

[fix-407] [common] [function] Use "==" to judge whether the values of...

[fix-407] [common] [function] Use "==" to judge whether the values of referenced variables are equal.
parent 684d7fe8
......@@ -34,7 +34,7 @@ public enum JobLifeCycle {
public static JobLifeCycle get(Integer value) {
for (JobLifeCycle item : JobLifeCycle.values()) {
if (item.getValue() == value) {
if (item.getValue().equals(value)) {
return item;
}
}
......@@ -42,7 +42,7 @@ public enum JobLifeCycle {
}
public boolean equalsValue(Integer step) {
if (value == step) {
if (value.equals(step)) {
return true;
}
return false;
......
......@@ -39,13 +39,13 @@ public class Top2WithRetract extends TableAggregateFunction<Tuple2<Integer, Inte
}
}
public void retract(Top2WithRetractAccumulator acc, Integer v){
if (v == acc.first) {
public void retract(Top2WithRetractAccumulator acc, Integer v) {
if (v.equals(acc.first)) {
acc.oldFirst = acc.first;
acc.oldSecond = acc.second;
acc.first = acc.second;
acc.second = Integer.MIN_VALUE;
} else if (v == acc.second) {
} else if (v.equals(acc.second)) {
acc.oldSecond = acc.second;
acc.second = Integer.MIN_VALUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment