This code:

return getBaseURI(info) + UriBuilder.fromResource(SearchResource.class)
                                    .path(pdq.getOwner())
                                    .path(pdq.getName())
                                    .build()
                                    .toString();

dies thusly:

        java.util.regex.Pattern.error(Pattern.java:1713)
        java.util.regex.Pattern.sequence(Pattern.java:1878)
        java.util.regex.Pattern.expr(Pattern.java:1752)
        java.util.regex.Pattern.compile(Pattern.java:1460)
        java.util.regex.Pattern.<init>(Pattern.java:1133)
        java.util.regex.Pattern.compile(Pattern.java:823)
        org.apache.cxf.jaxrs.model.URITemplate.<init>(URITemplate.java:89)
        
org.apache.cxf.jaxrs.impl.UriBuilderImpl.substituteVarargs(UriBuilderImpl.java:131)
        org.apache.cxf.jaxrs.impl.UriBuilderImpl.doBuild(UriBuilderImpl.java:80)
        org.apache.cxf.jaxrs.impl.UriBuilderImpl.build(UriBuilderImpl.java:74)
        
com.cisco.cdets.wsapi.resources.SearchResource.buildURI(SearchResource.java:132)

when the getName() call happens to return something like "** Web Query" (with 
asterisks).  I had assumed that the CXF methods would URL escape the 
information I pass in, in situations like this...  I'm guessing that's either 
not the case, or perhaps there's a bug?

As a best practice, in general, should I be escaping these sorts of values 
myself?

FWIW, I'm using CXF 2.2.3.

Thanks!

Reply via email to