Skip to content

Commit

Permalink
These EnumSets should be unmodiafiable, too, though
Browse files Browse the repository at this point in the history
  • Loading branch information
joegallo committed Oct 18, 2023
1 parent 38aac46 commit 803c510
Showing 1 changed file with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,28 +516,24 @@ enum Property {
ORGANIZATION_NAME,
NETWORK;

static final EnumSet<Property> ALL_CITY_PROPERTIES = EnumSet.of(
Property.IP,
Property.COUNTRY_ISO_CODE,
Property.COUNTRY_NAME,
Property.CONTINENT_NAME,
Property.REGION_ISO_CODE,
Property.REGION_NAME,
Property.CITY_NAME,
Property.TIMEZONE,
Property.LOCATION
static final Set<Property> ALL_CITY_PROPERTIES = Collections.unmodifiableSet(
EnumSet.of(
Property.IP,
Property.COUNTRY_ISO_CODE,
Property.COUNTRY_NAME,
Property.CONTINENT_NAME,
Property.REGION_ISO_CODE,
Property.REGION_NAME,
Property.CITY_NAME,
Property.TIMEZONE,
Property.LOCATION
)
);
static final EnumSet<Property> ALL_COUNTRY_PROPERTIES = EnumSet.of(
Property.IP,
Property.CONTINENT_NAME,
Property.COUNTRY_NAME,
Property.COUNTRY_ISO_CODE
static final Set<Property> ALL_COUNTRY_PROPERTIES = Collections.unmodifiableSet(
EnumSet.of(Property.IP, Property.CONTINENT_NAME, Property.COUNTRY_NAME, Property.COUNTRY_ISO_CODE)
);
static final EnumSet<Property> ALL_ASN_PROPERTIES = EnumSet.of(
Property.IP,
Property.ASN,
Property.ORGANIZATION_NAME,
Property.NETWORK
static final Set<Property> ALL_ASN_PROPERTIES = Collections.unmodifiableSet(
EnumSet.of(Property.IP, Property.ASN, Property.ORGANIZATION_NAME, Property.NETWORK)
);

public static Property parseProperty(String databaseType, String value) {
Expand Down

0 comments on commit 803c510

Please sign in to comment.