-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Ed Belisle opened SPR-7112 and commented
Using an Enumeration class as items in a select tag throws an exception:
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Type [java.lang.Class] is not valid for option items
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
...
This is caused by a bug at Line 138 in class org.springframework.web.servlet.tags.form.OptionWriter:
Current line with error:
else if (this.optionSource instanceof Class && this.optionSource.getClass().isEnum()) {
Suggested Correction:
else if (this.optionSource instanceof Class && ((Class)this.optionSource).isEnum()) {
Affects: 3.0.2
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug