You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2015/10/31 01:21:27 UTC

[jira] [Resolved] (GROOVY-7645) Stub generator unescapes escaped backslashes in String annotation values

     [ https://issues.apache.org/jira/browse/GROOVY-7645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King resolved GROOVY-7645.
-------------------------------
       Resolution: Fixed
    Fix Version/s: 2.4.6

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)