Skip to content

Commit 4ea3aec

Browse files
committed
timeZone not null check
1 parent dfe3f6b commit 4ea3aec

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

core/src/main/java/com/dtstack/flink/sql/table/SourceTableInfo.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.apache.flink.calcite.shaded.com.google.common.base.Strings;
2424
import org.apache.flink.calcite.shaded.com.google.common.collect.Lists;
2525
import org.apache.flink.calcite.shaded.com.google.common.collect.Maps;
26+
import org.apache.flink.util.StringUtils;
2627

2728
import java.util.ArrayList;
2829
import java.util.Map;
@@ -41,7 +42,7 @@ public abstract class SourceTableInfo extends TableInfo {
4142

4243
public static final String TIME_ZONE_KEY="timezone";
4344

44-
private String timeZone="Asia/Shanghai";
45+
private String timeZone=TimeZone.getDefault().getID();
4546

4647
private String eventTimeField;
4748

@@ -70,7 +71,6 @@ public void setMaxOutOrderness(Integer maxOutOrderness) {
7071
if(maxOutOrderness == null){
7172
return;
7273
}
73-
7474
this.maxOutOrderness = maxOutOrderness;
7575
}
7676

@@ -114,7 +114,7 @@ public String getTimeZone() {
114114
}
115115

116116
public void setTimeZone(String timeZone) {
117-
if (timeZone==null){
117+
if (StringUtils.isNullOrWhitespaceOnly(timeZone)){
118118
return;
119119
}
120120
timeZoneCheck(timeZone);

0 commit comments

Comments
 (0)