Merge 1.5.2 changes back to master.

This commit is contained in:
Mike Jumper
2023-04-13 14:22:18 -07:00

View File

@@ -220,7 +220,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.
@@ -237,6 +239,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) {