Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
c9cf7f39
Commit
c9cf7f39
authored
Apr 16, 2022
by
yanchenyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix-407] [common] [function] Use "==" to judge whether the values of referenced…
[fix-407] [common] [function] Use "==" to judge whether the values of referenced variables are equal.
parent
684d7fe8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
JobLifeCycle.java
dlink-common/src/main/java/com/dlink/model/JobLifeCycle.java
+2
-2
Top2WithRetract.java
...ion/src/main/java/com/dlink/ud/udtaf/Top2WithRetract.java
+3
-3
No files found.
dlink-common/src/main/java/com/dlink/model/JobLifeCycle.java
View file @
c9cf7f39
...
...
@@ -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
;
...
...
dlink-function/src/main/java/com/dlink/ud/udtaf/Top2WithRetract.java
View file @
c9cf7f39
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment