This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang 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 d9eee07  Refactor ConfigurationFileUtil (#16018)
d9eee07 is described below

commit d9eee0799a2c04433d1c4f7c786193fab67d615d
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Mar 12 07:03:57 2022 +0800

    Refactor ConfigurationFileUtil (#16018)
---
 .../data/pipeline/core/util/ConfigurationFileUtil.java               | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/core/util/ConfigurationFileUtil.java
 
b/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/core/util/ConfigurationFileUtil.java
index 11d2dc7..a47dee1 100644
--- 
a/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/core/util/ConfigurationFileUtil.java
+++ 
b/shardingsphere-test/shardingsphere-pipeline-test/src/test/java/org/apache/shardingsphere/data/pipeline/core/util/ConfigurationFileUtil.java
@@ -17,7 +17,6 @@
 
 package org.apache.shardingsphere.data.pipeline.core.util;
 
-import com.google.common.base.Strings;
 import lombok.AccessLevel;
 import lombok.NoArgsConstructor;
 import lombok.SneakyThrows;
@@ -44,7 +43,7 @@ public final class ConfigurationFileUtil {
     public static String readFile(final String fileName) {
         return String.join(System.lineSeparator(), 
Files.readAllLines(Paths.get(ClassLoader.getSystemResource(fileName).toURI())));
     }
-
+    
     /**
      * Read file and ignore comments.
      * 
@@ -54,6 +53,6 @@ public final class ConfigurationFileUtil {
     @SneakyThrows({IOException.class, URISyntaxException.class})
     public static String readFileAndIgnoreComments(final String fileName) {
         return 
Files.readAllLines(Paths.get(ClassLoader.getSystemResource(fileName).toURI()))
-                .stream().filter(each -> !Strings.isNullOrEmpty(each) && 
!each.startsWith("#")).map(each -> each + 
System.lineSeparator()).collect(Collectors.joining());
+                .stream().filter(each -> !"".equals(each) && 
!each.startsWith("#")).map(each -> each + 
System.lineSeparator()).collect(Collectors.joining());
     }
 }

Reply via email to