From b6b3f625846f87308b1761b2a739c3ef8e350232 Mon Sep 17 00:00:00 2001 From: James Muehlner Date: Tue, 20 Dec 2011 11:00:06 -0800 Subject: [PATCH] fixed file read error discovered while trying to use old style authentication --- .../guacamole/properties/FileGuacamoleProperty.java | 6 +++++- .../guacamole/properties/GuacamoleProperties.java | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) 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 3b00dd6e8..112e8a696 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,7 +49,11 @@ public abstract class FileGuacamoleProperty implements GuacamoleProperty { @Override public File parseValue(String value) throws GuacamoleException { - return new File(value); + // having a null value is acceptable. If value is null, no error thrown. + if(value != null) + return new File(value); + else + return null; } } 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 00128a0c5..585bd46fc 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,7 +108,6 @@ public class GuacamoleProperties { * guacamole.properties. */ public static Type getProperty(GuacamoleProperty property) throws GuacamoleException { - if (exception != null) throw exception;