@@ -108,28 +108,6 @@ public ProjectConfig parseProjectConfig(@Nonnull String json) throws ConfigParse
108108 String regionString = (String ) rootObject .get ("region" );
109109 }
110110
111- // Validate experiment types
112- Set <String > validExperimentTypes = new HashSet <>(Arrays .asList (
113- Experiment .TYPE_AB , Experiment .TYPE_MAB , Experiment .TYPE_CMAB ,
114- Experiment .TYPE_TD , Experiment .TYPE_FR
115- ));
116- for (Experiment experiment : experiments ) {
117- if (experiment .getType () != null && !validExperimentTypes .contains (experiment .getType ())) {
118- throw new ConfigParseException (
119- String .format ("Experiment \" %s\" has invalid type \" %s\" . Valid types: %s." ,
120- experiment .getKey (), experiment .getType (), validExperimentTypes ));
121- }
122- }
123- for (Group group : groups ) {
124- for (Experiment experiment : group .getExperiments ()) {
125- if (experiment .getType () != null && !validExperimentTypes .contains (experiment .getType ())) {
126- throw new ConfigParseException (
127- String .format ("Experiment \" %s\" has invalid type \" %s\" . Valid types: %s." ,
128- experiment .getKey (), experiment .getType (), validExperimentTypes ));
129- }
130- }
131- }
132-
133111 return new DatafileProjectConfig (
134112 accountId ,
135113 anonymizeIP ,
@@ -152,8 +130,6 @@ public ProjectConfig parseProjectConfig(@Nonnull String json) throws ConfigParse
152130 rollouts ,
153131 integrations
154132 );
155- } catch (ConfigParseException e ) {
156- throw e ;
157133 } catch (RuntimeException ex ) {
158134 throw new ConfigParseException ("Unable to parse datafile: " + json , ex );
159135 } catch (Exception e ) {
0 commit comments