From 9106d6051878b4834578d6c990f22a8da717fbfc Mon Sep 17 00:00:00 2001 From: James Muehlner Date: Mon, 22 Apr 2013 22:05:45 -0700 Subject: [PATCH] Ticket #307: Added a specific check to make sure that the value is set for boolean parameters. --- .../guacamole/net/basic/xml/protocol/ParamTagHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ParamTagHandler.java b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ParamTagHandler.java index 4e5fb4c5d..4c29ce16a 100644 --- a/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ParamTagHandler.java +++ b/guacamole/src/main/java/net/sourceforge/guacamole/net/basic/xml/protocol/ParamTagHandler.java @@ -62,8 +62,13 @@ public class ParamTagHandler implements TagHandler { protocolParameter.setType(ProtocolParameter.Type.ENUM); // Boolean field - else if ("boolean".equals(type)) + else if ("boolean".equals(type)) { 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 else