Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.2.0
-
None
-
Patch
Description
While testing scenarios related to JCLOUDS-1401, I noticed that some operations on blobs with funny filename characters resulted in exceptions like:
java.lang.IllegalArgumentException: Illegal group reference at java.util.regex.Matcher.appendReplacement(Matcher.java:857) at java.util.regex.Matcher.replaceAll(Matcher.java:955) at org.jclouds.util.Strings2.replaceTokens(Strings2.java:185) at org.jclouds.rest.internal.RestAnnotationProcessor.addHeader(RestAnnotationProcessor.java:763) at org.jclouds.rest.internal.RestAnnotationProcessor.addHeaderIfAnnotationPresentOnMethod(RestAnnotationProcessor.java:756) at org.jclouds.rest.internal.RestAnnotationProcessor.buildHeaders(RestAnnotationProcessor.java:719) at org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:268) at org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:137) at org.jclouds.rest.internal.InvokeHttpMethod.toCommand(InvokeHttpMethod.java:189) at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:85) at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74) at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45) at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156) at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123) at com.sun.proxy.$Proxy98.copyObject(Unknown Source) at org.jclouds.s3.blobstore.S3BlobStore.copyBlob(S3BlobStore.java:324)
This seems to be due to a failure to notice that Matcher.replaceAll interprets some metacharacters in its argument.
Attachments
Issue Links
- relates to
-
JCLOUDS-1401 S3 SignatureDoesNotMatch when listing keys using prefix with ampersand
- Resolved
- links to