mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1769: Merge fixed null handling for KSM field lookup.
This commit is contained in:
@@ -212,7 +212,9 @@ public class KsmRecordService {
|
||||
* The type of field to return.
|
||||
*
|
||||
* @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
|
||||
* 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,
|
||||
Class<T> fieldClass, Pattern labelPattern) {
|
||||
|
||||
// There are no fields if no List was provided at all
|
||||
if (fields == null)
|
||||
return null;
|
||||
|
||||
T foundField = null;
|
||||
for (KeeperRecordField field : fields) {
|
||||
|
||||
|
Reference in New Issue
Block a user