GUACAMOLE-422: Replace non-short-circuit logic in null check (&) with proper short-circuit logic (&&).

Checking `timezone != null & !timezone.isEmpty()` will result in a
`NullPointerException` when `timezone` is null, as the `&` ensures
`timezone.isEmpty()` will run in all cases.
This commit is contained in:
Michael Jumper
2019-06-08 13:44:45 -07:00
parent f2ae848b1b
commit 092657aa79

View File

@@ -167,9 +167,9 @@ public class TunnelRequestService {
if (imageMimetypes != null)
info.getImageMimetypes().addAll(imageMimetypes);
// Get the timezone value
// Set timezone if provided
String timezone = request.getTimezone();
if (timezone != null & !timezone.isEmpty())
if (timezone != null && !timezone.isEmpty())
info.setTimezone(timezone);
return info;