Resolve FindBugs Collection Naming Confusion

From the FindBugs documentation:

> CNC_COLLECTION_NAMING_CONFUSION: Collection variable is named with a different
> type of collection in the name
>
> This class defines a field or local collection variable with a name that
> contains a different type of collection in its name. An example would be a Set
> called userList. This is confusing to the reader, and likely caused by a
> previous refactor of type, without changing the name. This detector is
> obviously only checking for English names.

Signed-off-by: Tim Krüger <t@timkrueger.me>
This commit is contained in:
Tim Krüger 2021-11-10 13:50:57 +01:00
parent 9accac3325
commit 85785c287e
No known key found for this signature in database
GPG key ID: FECE3A7222C52A4E

View file

@ -68,32 +68,32 @@ public class DavUtils {
public static final String PROPERTY_QUOTA_AVAILABLE_BYTES = "quota-available-bytes";
static Property.Name[] getAllPropSet() {
List<Property.Name> propSet = new ArrayList<>();
List<Property.Name> props = new ArrayList<>();
propSet.add(DisplayName.NAME);
propSet.add(GetContentType.NAME);
propSet.add(GetContentLength.NAME);
propSet.add(GetContentType.NAME);
propSet.add(GetContentLength.NAME);
propSet.add(GetLastModified.NAME);
propSet.add(CreationDate.NAME);
propSet.add(GetETag.NAME);
propSet.add(ResourceType.NAME);
props.add(DisplayName.NAME);
props.add(GetContentType.NAME);
props.add(GetContentLength.NAME);
props.add(GetContentType.NAME);
props.add(GetContentLength.NAME);
props.add(GetLastModified.NAME);
props.add(CreationDate.NAME);
props.add(GetETag.NAME);
props.add(ResourceType.NAME);
propSet.add(NCPermission.NAME);
propSet.add(OCId.NAME);
propSet.add(OCSize.NAME);
propSet.add(OCFavorite.NAME);
propSet.add(new Property.Name(OC_NAMESPACE, EXTENDED_PROPERTY_OWNER_ID));
propSet.add(new Property.Name(OC_NAMESPACE, EXTENDED_PROPERTY_OWNER_DISPLAY_NAME));
propSet.add(new Property.Name(OC_NAMESPACE, EXTENDED_PROPERTY_UNREAD_COMMENTS));
props.add(NCPermission.NAME);
props.add(OCId.NAME);
props.add(OCSize.NAME);
props.add(OCFavorite.NAME);
props.add(new Property.Name(OC_NAMESPACE, EXTENDED_PROPERTY_OWNER_ID));
props.add(new Property.Name(OC_NAMESPACE, EXTENDED_PROPERTY_OWNER_DISPLAY_NAME));
props.add(new Property.Name(OC_NAMESPACE, EXTENDED_PROPERTY_UNREAD_COMMENTS));
propSet.add(NCEncrypted.NAME);
propSet.add(new Property.Name(NC_NAMESPACE, EXTENDED_PROPERTY_MOUNT_TYPE));
propSet.add(NCPreview.NAME);
propSet.add(new Property.Name(NC_NAMESPACE, EXTENDED_PROPERTY_NOTE));
props.add(NCEncrypted.NAME);
props.add(new Property.Name(NC_NAMESPACE, EXTENDED_PROPERTY_MOUNT_TYPE));
props.add(NCPreview.NAME);
props.add(new Property.Name(NC_NAMESPACE, EXTENDED_PROPERTY_NOTE));
return propSet.toArray(new Property.Name[0]);
return props.toArray(new Property.Name[0]);
}
public static void registerCustomFactories() {