You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a Grails controller, there are two forms for the static allowedMethods. static allowedMethods = [ 'actionName': 'POST' ] // for a single verb
or static allowedMethods = [ 'actionName': [ 'POST', 'GET' ] ] // for allowing more than one verb against a single action
The code in Actions.java that reads those verbs currently assumes the value in the allowedMethods map will be a String, and throws a ClassCastException when you use the 2nd form above. methods.add(RequestMethod.valueOf(allowedMethods.get(context.getAction())));
throws
java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.String
at springfox.documentation.grails.Actions.methodOverrides(Actions.java:61)
at springfox.documentation.grails.Actions.methodOverrides(Actions.java:72)
at springfox.documentation.grails.GrailsActionAttributes.httpMethods(GrailsActionAttributes.java:63)
at springfox.documentation.grails.GrailsActionContext.(GrailsActionContext.java:47)
at springfox.documentation.grails.GrailsRequestHandlerProvider.lambda$fromGrailsAction$1(GrailsRequestHandlerProvider.java:57)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1548)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
...
The text was updated successfully, but these errors were encountered:
In a Grails controller, there are two forms for the static allowedMethods.
static allowedMethods = [ 'actionName': 'POST' ] // for a single verb
or
static allowedMethods = [ 'actionName': [ 'POST', 'GET' ] ] // for allowing more than one verb against a single action
The code in Actions.java that reads those verbs currently assumes the value in the allowedMethods map will be a String, and throws a ClassCastException when you use the 2nd form above.
methods.add(RequestMethod.valueOf(allowedMethods.get(context.getAction())));
throws
The text was updated successfully, but these errors were encountered: