Murtadha Hubail has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/2391

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
---
M 
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/ResourceReference.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/91/2391/1

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..ea84285 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.separator);
         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: newchange
Gerrit-Change-Id: Id3d6bae7e35b26c6fd5685757a7c13ea86811f14
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Murtadha Hubail <mhub...@apache.org>

Reply via email to