diff --git a/core-api/src/main/java/com/optimizely/ab/config/ProjectConfig.java b/core-api/src/main/java/com/optimizely/ab/config/ProjectConfig.java index 3915fec8e..c41738581 100644 --- a/core-api/src/main/java/com/optimizely/ab/config/ProjectConfig.java +++ b/core-api/src/main/java/com/optimizely/ab/config/ProjectConfig.java @@ -36,7 +36,6 @@ public class ProjectConfig { public enum Version { - V1 ("1"), V2 ("2"), V3 ("3"); diff --git a/core-api/src/main/java/com/optimizely/ab/config/parser/JsonConfigParser.java b/core-api/src/main/java/com/optimizely/ab/config/parser/JsonConfigParser.java index 56dc808d2..8a37865d8 100644 --- a/core-api/src/main/java/com/optimizely/ab/config/parser/JsonConfigParser.java +++ b/core-api/src/main/java/com/optimizely/ab/config/parser/JsonConfigParser.java @@ -64,11 +64,7 @@ public ProjectConfig parseProjectConfig(@Nonnull String json) throws ConfigParse List experiments = parseExperiments(rootObject.getJSONArray("experiments")); List attributes; - if (version.equals(ProjectConfig.Version.V1.toString())) { - attributes = parseAttributes(rootObject.getJSONArray("dimensions")); - } else { - attributes = parseAttributes(rootObject.getJSONArray("attributes")); - } + attributes = parseAttributes(rootObject.getJSONArray("attributes")); List events = parseEvents(rootObject.getJSONArray("events")); List audiences = parseAudiences(rootObject.getJSONArray("audiences")); diff --git a/core-api/src/main/java/com/optimizely/ab/config/parser/JsonSimpleConfigParser.java b/core-api/src/main/java/com/optimizely/ab/config/parser/JsonSimpleConfigParser.java index 7ed9f5b52..2c05e0c25 100644 --- a/core-api/src/main/java/com/optimizely/ab/config/parser/JsonSimpleConfigParser.java +++ b/core-api/src/main/java/com/optimizely/ab/config/parser/JsonSimpleConfigParser.java @@ -64,11 +64,7 @@ public ProjectConfig parseProjectConfig(@Nonnull String json) throws ConfigParse List experiments = parseExperiments((JSONArray)rootObject.get("experiments")); List attributes; - if (version.equals(ProjectConfig.Version.V1.toString())) { - throw new ConfigParseException("The Java SDK no longer supports datafile version 1. If you wish to use a Classic Custom Project, please use Java SDK version 1.6 or below."); - } else { - attributes = parseAttributes((JSONArray)rootObject.get("attributes")); - } + attributes = parseAttributes((JSONArray)rootObject.get("attributes")); List events = parseEvents((JSONArray)rootObject.get("events")); List audiences = parseAudiences((JSONArray)parser.parse(rootObject.get("audiences").toString())); diff --git a/core-api/src/main/java/com/optimizely/ab/config/parser/ProjectConfigGsonDeserializer.java b/core-api/src/main/java/com/optimizely/ab/config/parser/ProjectConfigGsonDeserializer.java index ea3faad91..cb0b172c2 100644 --- a/core-api/src/main/java/com/optimizely/ab/config/parser/ProjectConfigGsonDeserializer.java +++ b/core-api/src/main/java/com/optimizely/ab/config/parser/ProjectConfigGsonDeserializer.java @@ -60,11 +60,7 @@ public ProjectConfig deserialize(JsonElement json, Type typeOfT, JsonDeserializa context.deserialize(jsonObject.get("experiments").getAsJsonArray(), experimentsType); List attributes; - if (version.equals(ProjectConfig.Version.V1.toString())) { - attributes = context.deserialize(jsonObject.get("dimensions"), attributesType); - } else { - attributes = context.deserialize(jsonObject.get("attributes"), attributesType); - } + attributes = context.deserialize(jsonObject.get("attributes"), attributesType); List events = context.deserialize(jsonObject.get("events").getAsJsonArray(), eventsType); diff --git a/core-api/src/main/java/com/optimizely/ab/config/parser/ProjectConfigJacksonDeserializer.java b/core-api/src/main/java/com/optimizely/ab/config/parser/ProjectConfigJacksonDeserializer.java index 38c844457..e8722086a 100644 --- a/core-api/src/main/java/com/optimizely/ab/config/parser/ProjectConfigJacksonDeserializer.java +++ b/core-api/src/main/java/com/optimizely/ab/config/parser/ProjectConfigJacksonDeserializer.java @@ -57,11 +57,7 @@ public ProjectConfig deserialize(JsonParser parser, DeserializationContext conte new TypeReference>() {}); List attributes; - if (version.equals(ProjectConfig.Version.V1.toString())) { - attributes = mapper.readValue(node.get("dimensions").toString(), new TypeReference>() {}); - } else { - attributes = mapper.readValue(node.get("attributes").toString(), new TypeReference>() {}); - } + attributes = mapper.readValue(node.get("attributes").toString(), new TypeReference>() {}); List events = mapper.readValue(node.get("events").toString(), new TypeReference>() {});