Michael Blow has submitted this change and it was merged. Change subject: [NO ISSUE][STO] Platform Independent File Path Split ......................................................................
[NO ISSUE][STO] Platform Independent File Path Split - user model changes: no - storage format changes: no - interface changes: no Details: - Avoid regex while splitting file paths to eliminate invalid regex on Windows platform. Change-Id: Id3d6bae7e35b26c6fd5685757a7c13ea86811f14 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2391 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Reviewed-by: Michael Blow <[email protected]> --- M asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/ResourceReference.java 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins: Verified; No violations found Michael Blow: Looks good to me, approved Objections: Anon. E. Moose #1000171: Violations found diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/ResourceReference.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/ResourceReference.java index 52cf4a0..81d311d 100644 --- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/ResourceReference.java +++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/ResourceReference.java @@ -23,6 +23,7 @@ import java.nio.file.Paths; import org.apache.asterix.common.utils.StorageConstants; +import org.apache.commons.lang3.StringUtils; public class ResourceReference { @@ -77,7 +78,7 @@ protected static void parse(ResourceReference ref, String path) { // format: root/partition/dataverse/dataset/rebalanceCount/index/fileName - final String[] tokens = path.split(File.separator); + final String[] tokens = StringUtils.split(path, File.separatorChar); if (tokens.length < 6) { throw new IllegalStateException("Unrecognized path structure: " + path); } -- To view, visit https://asterix-gerrit.ics.uci.edu/2391 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3d6bae7e35b26c6fd5685757a7c13ea86811f14 Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Murtadha Hubail <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: Michael Blow <[email protected]> Gerrit-Reviewer: Till Westmann <[email protected]>
