Repository: asterixdb
Updated Branches:
  refs/heads/master bf74a319d -> 254eeaa59


[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 <jenk...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mb...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/254eeaa5
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/254eeaa5
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/254eeaa5

Branch: refs/heads/master
Commit: 254eeaa59f7e2574587c5b3c192724c70d250829
Parents: bf74a31
Author: Murtadha Hubail <mhub...@apache.org>
Authored: Wed Feb 14 06:53:29 2018 +0300
Committer: Michael Blow <mb...@apache.org>
Committed: Tue Feb 13 22:06:27 2018 -0800

----------------------------------------------------------------------
 .../java/org/apache/asterix/common/storage/ResourceReference.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/254eeaa5/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/ResourceReference.java
----------------------------------------------------------------------
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.Path;
 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 @@ public class ResourceReference {
 
     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);
         }

Reply via email to