dockerzhang / incubator-inlong

Apache InLong - a one-stop data streaming platform
https://inlong.apache.org/
Apache License 2.0
0 stars 0 forks source link

[INLONG-127] Fixed a bug & minor changes #127

Closed dockerzhang closed 3 years ago

dockerzhang commented 3 years ago

1. Fixed a bug
Syntax error

map.keySet().iterator(); (1.8 syntax) -> new ArrayList<>(map.keySet()).iterator();

2. Minor changes

if (curToken != null && curToken == usedToken) {
    return true;
}

change to

return curToken != null && curToken == usedToken;
if (isReged == null) {
    return true;
}

change to

return isReged == null;
List<String> partKeys = new ArrayList<>();
partKeys.addAll(partitionUsedMap.keySet());

change to

List<String> partKeys = new ArrayList<>(partitionUsedMap.keySet());

JIRA link - [INLONG-127] created by viviel