You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2025/11/19 08:53:18 UTC
(shardingsphere) branch master updated: Improve EnvironmentPropertiesLoader add check if the InputStream is null. (#37138)
This is an automated email from the ASF dual-hosted git repository.
jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 8338796db38 Improve EnvironmentPropertiesLoader add check if the InputStream is null. (#37138)
8338796db38 is described below
commit 8338796db38c9df67f3cefbaf61941289efbd954
Author: jiangML <10...@qq.com>
AuthorDate: Wed Nov 19 16:53:12 2025 +0800
Improve EnvironmentPropertiesLoader add check if the InputStream is null. (#37138)
---
.../test/e2e/env/runtime/EnvironmentPropertiesLoader.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/EnvironmentPropertiesLoader.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/EnvironmentPropertiesLoader.java
index 8613ce61ffc..67b9dc73a84 100644
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/EnvironmentPropertiesLoader.java
+++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/runtime/EnvironmentPropertiesLoader.java
@@ -53,7 +53,9 @@ public final class EnvironmentPropertiesLoader {
public static Properties loadProperties(final String fileName) {
Properties result = new Properties();
try (InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName)) {
- result.load(inputStream);
+ if (null != inputStream) {
+ result.load(inputStream);
+ }
}
for (String each : System.getProperties().stringPropertyNames()) {
result.setProperty(each, System.getProperty(each));