diff --git a/src/main/java/net/frozenorb/apiv3/maxmind/MaxMindResult.java b/src/main/java/net/frozenorb/apiv3/maxmind/MaxMindResult.java index 62ff4ea..cafeda2 100644 --- a/src/main/java/net/frozenorb/apiv3/maxmind/MaxMindResult.java +++ b/src/main/java/net/frozenorb/apiv3/maxmind/MaxMindResult.java @@ -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 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); } } \ No newline at end of file