Skip to content

Commit acf0e55

Browse files
tiezhuFlechazoW
authored andcommitted
[hotfix-866][jdbc] Fix the issue that task throw npe when password is empty or null.
1 parent ac6711e commit acf0e55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chunjun-connectors/chunjun-connector-jdbc-base/src/main/java/com/dtstack/chunjun/connector/jdbc/lookup/provider/DruidDataSourceProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ public DataSource getDataSource(JsonObject config) {
4444
String key = entry.getKey();
4545
if (!"provider_class".equals(key)) {
4646
String formattedName = CaseFormat.LOWER_HYPHEN.to(CaseFormat.LOWER_CAMEL, key);
47-
props.setProperty(formattedName, entry.getValue().toString());
47+
props.setProperty(
48+
formattedName, entry.getValue() == null ? "" : entry.getValue().toString());
4849
}
4950
}
5051
dataSource.configFromPropety(props);

0 commit comments

Comments
 (0)