Ticket #307: Added a specific check to make sure that the value is set for boolean parameters.

This commit is contained in:
James Muehlner
2013-04-22 22:05:45 -07:00
parent bd4a09a6ab
commit 9106d60518

View File

@@ -62,8 +62,13 @@ public class ParamTagHandler implements TagHandler {
protocolParameter.setType(ProtocolParameter.Type.ENUM); protocolParameter.setType(ProtocolParameter.Type.ENUM);
// Boolean field // Boolean field
else if ("boolean".equals(type)) else if ("boolean".equals(type)) {
protocolParameter.setType(ProtocolParameter.Type.BOOLEAN); protocolParameter.setType(ProtocolParameter.Type.BOOLEAN);
if(protocolParameter.getValue() == null)
throw new SAXException
("A value is required for the boolean parameter type.");
}
// Otherwise, fail with unrecognized type // Otherwise, fail with unrecognized type
else else