grails/grails-gsp

g:checkBox does not properly enforce the requirement of the name attribute

Closed this issue · 0 comments

Steps to Reproduce

  1. Add a checkBox element to a gsp without providing the name attribute.
    e.g. <g:checkBox />

  2. Load the modified page

Expected Behaviour

The page throws a GrailsTagException specifying that the name attribute in the checkBox tag is missing

Actual Behaviour

Inside the tag, name is assumed to be non-null, and results in a NullPointerException when indexOf is called on name

Environment Information

  • Operating System: Arch Linux 5.3.13
  • Grails Version: 4.0.0
  • JDK Version: 1.8.0_232