You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Jesse Glick (JIRA)" <ji...@apache.org> on 2018/07/10 19:22:00 UTC
[jira] [Created] (JCLOUDS-1433) IllegalArgumentException from
Strings2.replaceTokens
Jesse Glick created JCLOUDS-1433:
------------------------------------
Summary: IllegalArgumentException from Strings2.replaceTokens
Key: JCLOUDS-1433
URL: https://issues.apache.org/jira/browse/JCLOUDS-1433
Project: jclouds
Issue Type: Bug
Components: jclouds-core
Affects Versions: 2.2.0
Reporter: Jesse Glick
While testing scenarios related to JCLOUDS-1401, I noticed that some operations on blobs with funny filename characters resulted in exceptions like:
{code:none}
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)
{code}
This seems to be due to a failure to notice that {{Matcher.replaceAll}} interprets some metacharacters in its argument.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)