GUACAMOLE-422: Use null exclusively for missing timezone.

This commit is contained in:
Virtually Nick
2019-05-06 16:25:08 -04:00
parent 74c07c893a
commit f4b41e8b19
2 changed files with 7 additions and 5 deletions

View File

@@ -204,7 +204,7 @@ public class ConfiguredGuacamoleSocket implements GuacamoleSocket {
if (protocol.isSupported(GuacamoleProtocolCapability.TIMEZONE_HANDSHAKE)) { if (protocol.isSupported(GuacamoleProtocolCapability.TIMEZONE_HANDSHAKE)) {
// Send client timezone, if available // Send client timezone, if available
String timezone = info.getTimezone(); String timezone = info.getTimezone();
if (timezone != null && !timezone.isEmpty()) { if (timezone != null) {
writer.writeInstruction( writer.writeInstruction(
new GuacamoleInstruction( new GuacamoleInstruction(
"timezone", "timezone",

View File

@@ -62,7 +62,7 @@ public class GuacamoleClientInformation {
/** /**
* The timezone reported by the client. * The timezone reported by the client.
*/ */
private String timezone = ""; private String timezone;
/** /**
* Returns the optimal screen width requested by the client, in pixels. * Returns the optimal screen width requested by the client, in pixels.
@@ -151,8 +151,8 @@ public class GuacamoleClientInformation {
} }
/** /**
* Return the timezone as reported by the client, or an empty String if * Return the timezone as reported by the client, or null if the timezone
* one is not set. * is not set. Valid timezones are specified in tz database format.
* *
* @return * @return
* A string value of the timezone reported by the client. * A string value of the timezone reported by the client.
@@ -162,7 +162,9 @@ public class GuacamoleClientInformation {
} }
/** /**
* Set the string value of the timezone. * Set the string value of the timezone, or null if the timezone will not
* be provided by the client. Valid timezones are specified in tz
* database format.
* *
* @param timezone * @param timezone
* The string value of the timezone reported by the client. * The string value of the timezone reported by the client.