mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user