mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Fix:Alibaba Coding Guidelines-Object的equals方法容易抛空指针异常,应使用常量或确定有值的对象来调用equals。 (#2919)
This commit is contained in:
@@ -47,11 +47,11 @@ public class KuduSyncService {
|
||||
public void sync(KuduMappingConfig config, Dml dml) {
|
||||
if (config != null) {
|
||||
String type = dml.getType();
|
||||
if (type != null && type.equalsIgnoreCase("INSERT")) {
|
||||
if (type != null && "INSERT".equalsIgnoreCase(type)) {
|
||||
insert(config, dml);
|
||||
} else if (type != null && type.equalsIgnoreCase("UPDATE")) {
|
||||
} else if (type != null && "UPDATE".equalsIgnoreCase(type)) {
|
||||
upsert(config, dml);
|
||||
} else if (type != null && type.equalsIgnoreCase("DELETE")) {
|
||||
} else if (type != null && "DELETE".equalsIgnoreCase(type)) {
|
||||
delete(config, dml);
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
||||
Reference in New Issue
Block a user