arshadmohammad commented on code in PR #189:
URL: https://github.com/apache/seatunnel-web/pull/189#discussion_r1730289075


##########
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/DatasourceServiceImpl.java:
##########
@@ -138,6 +145,13 @@ public String createDatasource(
         throw new 
SeatunnelException(SeatunnelErrorEnum.DATASOURCE_CREATE_FAILED);
     }
 
+    private void encryptDatasource(Map<String, String> datasourceConfig) {
+        datasourceConfig.replace(
+                Constants.PASSWORD,
+                ConfigShadeUtils.encryptOption(
+                        datasourceEncryptionType, 
datasourceConfig.get(Constants.PASSWORD)));

Review Comment:
   password is not a mandatory field,  it can be empty also, then this code 
will throw NPE. Encrypt only if passord is not empty.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to