diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/FileGuacamoleProperty.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/FileGuacamoleProperty.java index 112e8a696..58b3c6626 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/FileGuacamoleProperty.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/FileGuacamoleProperty.java @@ -49,11 +49,13 @@ public abstract class FileGuacamoleProperty implements GuacamoleProperty { @Override public File parseValue(String value) throws GuacamoleException { - // having a null value is acceptable. If value is null, no error thrown. - if(value != null) - return new File(value); - else + + // If no property provided, return null. + if (value == null) return null; + + return new File(value); + } } diff --git a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java index 585bd46fc..00128a0c5 100644 --- a/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java +++ b/guacamole-common/src/main/java/net/sourceforge/guacamole/properties/GuacamoleProperties.java @@ -108,6 +108,7 @@ public class GuacamoleProperties { * guacamole.properties. */ public static Type getProperty(GuacamoleProperty property) throws GuacamoleException { + if (exception != null) throw exception;