You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by an...@apache.org on 2014/07/22 19:36:33 UTC
[1/2] git commit: Addressing a Checkstyle violation
Repository: jclouds
Updated Branches:
refs/heads/master d1bd551ed -> 5732bdcd9
Addressing a Checkstyle violation
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/365ac21f
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/365ac21f
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/365ac21f
Branch: refs/heads/master
Commit: 365ac21f1e1b010efba115812b5100877b4911a7
Parents: d1bd551
Author: Andrew Phillips <an...@apache.org>
Authored: Tue Jul 22 12:33:22 2014 -0400
Committer: Andrew Phillips <an...@apache.org>
Committed: Tue Jul 22 13:35:43 2014 -0400
----------------------------------------------------------------------
.../filesystem/integration/FilesystemBlobIntegrationTest.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds/blob/365ac21f/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java
----------------------------------------------------------------------
diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java
index de8516c..53bca5b 100644
--- a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java
+++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemBlobIntegrationTest.java
@@ -18,7 +18,6 @@ package org.jclouds.filesystem.integration;
import java.io.IOException;
import java.util.Properties;
-import java.util.concurrent.ExecutionException;
import org.jclouds.blobstore.domain.Blob;
import org.jclouds.blobstore.domain.BlobMetadata;
[2/2] git commit: Escaping regex special chars (esp. '\') in
delimiter matching
Posted by an...@apache.org.
Escaping regex special chars (esp. '\') in delimiter matching
Uncovered by 370194b
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/5732bdcd
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/5732bdcd
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/5732bdcd
Branch: refs/heads/master
Commit: 5732bdcd941088b36ba3a4614860d2c3c2abf56b
Parents: 365ac21
Author: Andrew Phillips <an...@apache.org>
Authored: Tue Jul 22 10:25:51 2014 -0400
Committer: Andrew Phillips <an...@apache.org>
Committed: Tue Jul 22 13:35:52 2014 -0400
----------------------------------------------------------------------
.../main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds/blob/5732bdcd/blobstore/src/main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java
----------------------------------------------------------------------
diff --git a/blobstore/src/main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java
index 88117e4..a411e21 100644
--- a/blobstore/src/main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java
+++ b/blobstore/src/main/java/org/jclouds/blobstore/LocalAsyncBlobStore.java
@@ -33,6 +33,7 @@ import java.io.IOException;
import java.util.Date;
import java.util.Set;
import java.util.SortedSet;
+import java.util.regex.Pattern;
import javax.annotation.Resource;
import javax.inject.Inject;
@@ -332,7 +333,7 @@ public class LocalAsyncBlobStore extends BaseAsyncBlobStore {
// ensure we don't accidentally append twice
String toMatch = prefix.endsWith("/") ? prefix : prefix + delimiter;
if (metadata.getName().startsWith(toMatch)) {
- String unprefixedName = metadata.getName().replaceFirst(toMatch, "");
+ String unprefixedName = metadata.getName().replaceFirst(Pattern.quote(toMatch), "");
if (unprefixedName.equals("")) {
// we are the prefix in this case, return false
return false;
@@ -359,7 +360,7 @@ public class LocalAsyncBlobStore extends BaseAsyncBlobStore {
// ensure we don't accidentally append twice
String toMatch = prefix.endsWith("/") ? prefix : prefix + delimiter;
if (working.startsWith(toMatch)) {
- working = working.replaceFirst(toMatch, "");
+ working = working.replaceFirst(Pattern.quote(toMatch), "");
}
}
if (working.contains(delimiter)) {