mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 05:07:41 +00:00
GUACAMOLE-1769: Handle case that KSM's getCustom() returns null.
This commit is contained in:
@@ -212,7 +212,9 @@ public class KsmRecordService {
|
|||||||
* The type of field to return.
|
* The type of field to return.
|
||||||
*
|
*
|
||||||
* @param fields
|
* @param fields
|
||||||
* The list of fields to retrieve the field from.
|
* The list of fields to retrieve the field from. For convenience, this
|
||||||
|
* may be null. A null list will be considered equivalent to an empty
|
||||||
|
* list.
|
||||||
*
|
*
|
||||||
* @param fieldClass
|
* @param fieldClass
|
||||||
* The class representing the type of field to return.
|
* The class representing the type of field to return.
|
||||||
@@ -229,6 +231,10 @@ public class KsmRecordService {
|
|||||||
private <T extends KeeperRecordField> T getField(List<KeeperRecordField> fields,
|
private <T extends KeeperRecordField> T getField(List<KeeperRecordField> fields,
|
||||||
Class<T> fieldClass, Pattern labelPattern) {
|
Class<T> fieldClass, Pattern labelPattern) {
|
||||||
|
|
||||||
|
// There are no fields if no List was provided at all
|
||||||
|
if (fields == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
T foundField = null;
|
T foundField = null;
|
||||||
for (KeeperRecordField field : fields) {
|
for (KeeperRecordField field : fields) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user