[ 
https://issues.apache.org/jira/browse/GROOVY-7645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14983673#comment-14983673
 ] 

Paul King edited comment on GROOVY-7645 at 10/31/15 12:21 AM:
--------------------------------------------------------------

Thanks for spotting and reporting the issue with a reproducible test case. I 
have a fix in place. If you could do any additional testing using one of the 
snapshot builds, that would be great. Thanks.


was (Author: paulk):
Thanks for spotting the issue and creating the test case. I have a fix in 
place. If you could do any additional testing using one of the snapshot builds, 
that would be great. Thanks.

> Stub generator unescapes escaped backslashes in String annotation values
> ------------------------------------------------------------------------
>
>                 Key: GROOVY-7645
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7645
>             Project: Groovy
>          Issue Type: Bug
>          Components: Stub generator / Joint compiler
>    Affects Versions: 2.4.5
>            Reporter: Shon Vella
>            Assignee: Paul King
>             Fix For: 2.4.6
>
>
> This is very similar to GROOVY-4604 and GROOVY-4601.
> Groovy code:
> {code}
> import javax.ws.rs.GET
> import javax.ws.rs.Path
> @Path('/')
> class GroovyService {
>     @GET
>     @Path('{id:[^.]\\.[^.]}')
>     String getIt(String id) {
>         return id;
>     }
> }
> {code}
> Results in stub:
> {code}
> import java.lang.*;
> import java.io.*;
> import java.net.*;
> import java.util.*;
> import groovy.lang.*;
> import groovy.util.*;
> @javax.ws.rs.Path(value="/") public class GroovyService
>   extends java.lang.Object  implements
>     groovy.lang.GroovyObject {
> ;
> public  groovy.lang.MetaClass getMetaClass() { return 
> (groovy.lang.MetaClass)null;}
> public  void setMetaClass(groovy.lang.MetaClass mc) { }
> public  java.lang.Object invokeMethod(java.lang.String method, 
> java.lang.Object arguments) { return null;}
> public  java.lang.Object getProperty(java.lang.String property) { return 
> null;}
> public  void setProperty(java.lang.String property, java.lang.Object value) { 
> }
> @javax.ws.rs.GET() @javax.ws.rs.Path(value="{id:[^.]\.[^.]}") public  
> java.lang.String getIt(java.lang.String id) { return (java.lang.String)null;}
> }
> {code}
> Which results in error:
> {code}
> GroovyService.java:[17,53] error: illegal escape character
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to