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
This should fix the failing JDK8 joint build test. The issue is that since these methods were public they were being configured as controller actions. This happened to work ok with JDK7 and not work with JDK8 because of a difference in the ordering of AST transformation classes at compile time.
When a controller is compiled with JDK7, the getRequest method that we add to that controller looks like this...
public HttpServletRequest getRequest() {
return this.instanceControllerTagLibraryApi.getRequest(this);
}
When that same controller is compiled with JDK8 that method looks like this...
public HttpServletRequest getRequest() {
return this.instanceControllersRestApi.getRequest(this);
}
instanceControllerTagLibraryApi is initialized in the constructor. instanceControllersRestApi is not, at least not directly. I think it relies on injection from the app context and that bean doesn't exist when that particular failing test is run.
Since these methods were being configured as controller action methods code was being added to them to access the request in order to do allowedMethods checking. Because instanceControllersRestApi is used when the controller is compiled with JDK8 and that property is null for this particular test, the test was failing.
Copy file name to clipboardExpand all lines: grails-test-suite-uber/src/test/groovy/org/codehaus/groovy/grails/commons/DefaultGrailsControllerClass2Tests.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ public void testInterceptors() throws Exception {
0 commit comments