Convert MaxMindResult's subdivisions to a list
This commit is contained in:
parent
5c3274d483
commit
9f2e4a63f0
@ -1,5 +1,6 @@
|
||||
package net.frozenorb.apiv3.maxmind;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import io.vertx.core.json.JsonObject;
|
||||
import lombok.Getter;
|
||||
|
||||
@ -13,7 +14,7 @@ public final class MaxMindResult {
|
||||
@Getter private MaxMindPostal postal;
|
||||
@Getter private MaxMindTraits traits;
|
||||
@Getter private MaxMindLocation location;
|
||||
@Getter private MaxMindSubdivision[] subdivisions;
|
||||
@Getter private List<MaxMindSubdivision> subdivisions;
|
||||
@Getter private MaxMindCountry country;
|
||||
@Getter private MaxMindRegisteredCountry registeredCountry;
|
||||
|
||||
@ -34,7 +35,7 @@ public final class MaxMindResult {
|
||||
subdivisions.add(new MaxMindSubdivision((JsonObject) subdivision));
|
||||
}
|
||||
|
||||
this.subdivisions = subdivisions.toArray(new MaxMindSubdivision[subdivisions.size()]);
|
||||
this.subdivisions = ImmutableList.copyOf(subdivisions);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user