Skip to content

Commit c1af4f5

Browse files
fix: use forward slash literal and remove unused import in DFSPropertiesConfiguration (#18454)
Replaces File.separator with "/" (HDFS paths always use forward slash) and removes the now-unused import java.io.File. Fixes #14922
1 parent 2b33f5d commit c1af4f5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

hudi-hadoop-common/src/main/java/org/apache/hudi/common/config/DFSPropertiesConfiguration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import javax.annotation.Nullable;
3636

3737
import java.io.BufferedReader;
38-
import java.io.File;
3938
import java.io.IOException;
4039
import java.io.InputStreamReader;
4140
import java.net.URI;
@@ -258,7 +257,7 @@ private static Option<StoragePath> getConfPathFromEnv() {
258257
if (StringUtils.isNullOrEmpty(URI.create(confDir).getScheme())) {
259258
confDir = "file://" + confDir;
260259
}
261-
return Option.of(new StoragePath(confDir + File.separator + DEFAULT_PROPERTIES_FILE));
260+
return Option.of(new StoragePath(confDir + "/" + DEFAULT_PROPERTIES_FILE));
262261
}
263262

264263
private String[] splitProperty(String line) {

0 commit comments

Comments
 (0)