You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by we...@apache.org on 2023/04/04 04:22:48 UTC
[dolphinscheduler] branch dev updated: Fix trim might cause NPE in PropertyUtils (#13853)
This is an automated email from the ASF dual-hosted git repository.
wenjun pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 69fc217ab2 Fix trim might cause NPE in PropertyUtils (#13853)
69fc217ab2 is described below
commit 69fc217ab2536c826456ba62c41554183248ef53
Author: Wenjun Ruan <we...@apache.org>
AuthorDate: Tue Apr 4 12:22:34 2023 +0800
Fix trim might cause NPE in PropertyUtils (#13853)
---
.../java/org/apache/dolphinscheduler/common/utils/PropertyUtils.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/PropertyUtils.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/PropertyUtils.java
index 87278cdfae..972f17a8d5 100644
--- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/PropertyUtils.java
+++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/PropertyUtils.java
@@ -88,6 +88,9 @@ public class PropertyUtils {
* @return property value
*/
public static String getString(String key) {
+ if (key == null) {
+ return null;
+ }
return properties.getProperty(key.trim());
}