Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.5
-
None
Description
This is very similar to GROOVY-4604 and GROOVY-4601.
Groovy code:
import javax.ws.rs.GET import javax.ws.rs.Path @Path('/') class GroovyService { @GET @Path('{id:[^.]\\.[^.]}') String getIt(String id) { return id; } }
Results in stub:
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;} }
Which results in error:
GroovyService.java:[17,53] error: illegal escape character