Skip to content

Commit

Permalink
Revert "Change to use new Spring 3 generics to lookup ViewResolver"
Browse files Browse the repository at this point in the history
This reverts commit 839bbbb.
  • Loading branch information
Jeff Brown committed Apr 27, 2010
1 parent cf85114 commit 8499e55
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/java/org/codehaus/groovy/grails/web/util/WebUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ public class WebUtils extends org.springframework.web.util.WebUtils {
public static ViewResolver lookupViewResolver(ServletContext servletContext) {
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);

return wac.getBean(ViewResolver.class);
String[] beanNames = wac.getBeanNamesForType(ViewResolver.class);
if (beanNames.length > 0) {
String beanName = beanNames[0];
return (ViewResolver)wac.getBean(beanName);
}
return null;
}

/**
Expand Down

0 comments on commit 8499e55

Please sign in to comment.