forked from loafle/openapi-generator-original
[java] add useNullForUnknownEnumValue option (#633)
This commit is contained in:
parent
44d419c1a1
commit
a8e8acead7
@ -27,7 +27,7 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 -DhideGenerationTimestamp=true --library=jersey1 $@"
|
||||
ags="generate --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 -DhideGenerationTimestamp=true --library=jersey1 --additional-properties useNullForUnknownEnumValue=true $@"
|
||||
|
||||
echo "Removing files and folders under samples/client/petstore/java/jersey1/src/main"
|
||||
rm -rf samples/client/petstore/java/jersey1/src/main
|
||||
|
@ -1,4 +1,7 @@
|
||||
{
|
||||
"library": "jersey2",
|
||||
"artifactId": "petstore-jersey2"
|
||||
"artifactId": "petstore-jersey2",
|
||||
"additionalProperties" : {
|
||||
"useNullForUnknownEnumValue" : true
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,17 @@ For the templates, this is not an API change, because the same values are availa
|
||||
|
||||
If you have your own `Codegen` class (to support your own generator for example) then you might get some compile error due to the change.
|
||||
|
||||
==== Java
|
||||
|
||||
Schema with enum values are mapped to java enum in the generated code.
|
||||
In previous version, when an unknown value was deserialized, the value was set to `null`.
|
||||
|
||||
With `3.2.0` a new option is introduced: `useNullForUnknownEnumValue`.
|
||||
|
||||
* When set to `false` (default value), an Exception (`IllegalArgumentException`) is thrown when the value not available in the enum.
|
||||
* When set to `true`, unknown values are mapped to `null` as it was the case in previous versions.
|
||||
|
||||
|
||||
=== From 3.0.x to 3.1.0
|
||||
|
||||
Version `3.1.0` is the first minor version of OpenAPI-Generator, in comparison to `3.0.3` it contains some breaking changes, but with the possibility to fallback to the old behavior.
|
||||
|
@ -65,6 +65,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
public static final String DISABLE_HTML_ESCAPING = "disableHtmlEscaping";
|
||||
public static final String BOOLEAN_GETTER_PREFIX = "booleanGetterPrefix";
|
||||
public static final String BOOLEAN_GETTER_PREFIX_DEFAULT = "get";
|
||||
public static final String USE_NULL_FOR_UNKNOWN_ENUM_VALUE = "useNullForUnknownEnumValue";
|
||||
|
||||
protected String dateLibrary = "threetenbp";
|
||||
protected boolean supportAsync = false;
|
||||
@ -99,6 +100,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
protected boolean supportJava6= false;
|
||||
protected boolean disableHtmlEscaping = false;
|
||||
protected String booleanGetterPrefix = BOOLEAN_GETTER_PREFIX_DEFAULT;
|
||||
protected boolean useNullForUnknownEnumValue = false;
|
||||
|
||||
public AbstractJavaCodegen() {
|
||||
super();
|
||||
@ -213,6 +215,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
}
|
||||
additionalProperties.put(BOOLEAN_GETTER_PREFIX, booleanGetterPrefix);
|
||||
|
||||
if (additionalProperties.containsKey(USE_NULL_FOR_UNKNOWN_ENUM_VALUE)) {
|
||||
this.setUseNullForUnknownEnumValue(Boolean.valueOf(additionalProperties.get(USE_NULL_FOR_UNKNOWN_ENUM_VALUE).toString()));
|
||||
}
|
||||
additionalProperties.put(USE_NULL_FOR_UNKNOWN_ENUM_VALUE, useNullForUnknownEnumValue);
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.INVOKER_PACKAGE)) {
|
||||
this.setInvokerPackage((String) additionalProperties.get(CodegenConstants.INVOKER_PACKAGE));
|
||||
} else if (additionalProperties.containsKey(CodegenConstants.API_PACKAGE)) {
|
||||
@ -1254,6 +1261,10 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
this.booleanGetterPrefix = booleanGetterPrefix;
|
||||
}
|
||||
|
||||
public void setUseNullForUnknownEnumValue(boolean useNullForUnknownEnumValue) {
|
||||
this.useNullForUnknownEnumValue = useNullForUnknownEnumValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String escapeQuotationMark(String input) {
|
||||
// remove " to avoid code injection
|
||||
|
@ -48,7 +48,7 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
{{#gson}}
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
{{#gson}}
|
||||
|
||||
|
@ -39,6 +39,6 @@
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + v + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,6 @@ public enum {{datatypeWithEnum}} {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + v + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,6 +39,6 @@
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
{{/jackson}}
|
||||
}
|
||||
|
@ -28,6 +28,6 @@ public enum {{datatypeWithEnum}} {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + v + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,6 @@
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,6 @@
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
@ -39,6 +39,6 @@
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,6 @@
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ public enum {{#datatypeWithEnum}}{{{.}}}{{/datatypeWithEnum}}{{^datatypeWithEnum
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,6 @@ if (String.valueOf(b.value).equals(text)) {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
{{#useNullForUnknownEnumValue}}return null;{{/useNullForUnknownEnumValue}}{{^useNullForUnknownEnumValue}}throw new IllegalArgumentException("Unexpected value '" + text + "'");{{/useNullForUnknownEnumValue}}
|
||||
}
|
||||
}
|
||||
|
@ -98,6 +98,7 @@ public class AbstractJavaCodegenTest {
|
||||
Assert.assertEquals(codegen.getInvokerPackage(), "org.openapitools");
|
||||
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "org.openapitools");
|
||||
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX), "get");
|
||||
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE), Boolean.FALSE);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -108,6 +109,7 @@ public class AbstractJavaCodegenTest {
|
||||
codegen.setApiPackage("xyz.yyyyy.zzzzzzz.api");
|
||||
codegen.setInvokerPackage("xyz.yyyyy.zzzzzzz.invoker");
|
||||
codegen.setBooleanGetterPrefix("is");
|
||||
codegen.setUseNullForUnknownEnumValue(true);
|
||||
codegen.processOpts();
|
||||
|
||||
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE);
|
||||
@ -119,6 +121,7 @@ public class AbstractJavaCodegenTest {
|
||||
Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.zzzzzzz.invoker");
|
||||
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.zzzzzzz.invoker");
|
||||
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX), "is");
|
||||
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE), Boolean.TRUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -129,6 +132,7 @@ public class AbstractJavaCodegenTest {
|
||||
codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.yyyyy.api.oooooo");
|
||||
codegen.additionalProperties().put(CodegenConstants.INVOKER_PACKAGE, "xyz.yyyyy.invoker.oooooo");
|
||||
codegen.additionalProperties().put(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX, "getBoolean");
|
||||
codegen.additionalProperties().put(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE, "true");
|
||||
codegen.processOpts();
|
||||
|
||||
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE);
|
||||
@ -140,6 +144,7 @@ public class AbstractJavaCodegenTest {
|
||||
Assert.assertEquals(codegen.getInvokerPackage(), "xyz.yyyyy.invoker.oooooo");
|
||||
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.INVOKER_PACKAGE), "xyz.yyyyy.invoker.oooooo");
|
||||
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.BOOLEAN_GETTER_PREFIX), "getBoolean");
|
||||
Assert.assertEquals(codegen.additionalProperties().get(AbstractJavaCodegen.USE_NULL_FOR_UNKNOWN_ENUM_VALUE), Boolean.TRUE);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -59,7 +59,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class EnumArrays implements Parcelable {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<JustSymbolEnum> {
|
||||
@ -114,7 +114,7 @@ public class EnumArrays implements Parcelable {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<ArrayEnumEnum> {
|
||||
|
@ -58,7 +58,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumClass> {
|
||||
|
@ -64,7 +64,7 @@ public class EnumTest implements Parcelable {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringEnum> {
|
||||
@ -117,7 +117,7 @@ public class EnumTest implements Parcelable {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringRequiredEnum> {
|
||||
@ -168,7 +168,7 @@ public class EnumTest implements Parcelable {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumIntegerEnum> {
|
||||
@ -219,7 +219,7 @@ public class EnumTest implements Parcelable {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumNumberEnum> {
|
||||
|
@ -69,7 +69,7 @@ public class MapTest implements Parcelable {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<InnerEnum> {
|
||||
|
@ -80,7 +80,7 @@ public class Order implements Parcelable {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
@ -58,7 +58,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<OuterEnum> {
|
||||
|
@ -87,7 +87,7 @@ public class Pet implements Parcelable {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
@ -61,7 +61,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<JustSymbolEnum> {
|
||||
@ -112,7 +112,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<ArrayEnumEnum> {
|
||||
|
@ -56,7 +56,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumClass> {
|
||||
|
@ -62,7 +62,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringEnum> {
|
||||
@ -115,7 +115,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringRequiredEnum> {
|
||||
@ -166,7 +166,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumIntegerEnum> {
|
||||
@ -217,7 +217,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumNumberEnum> {
|
||||
|
@ -67,7 +67,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<InnerEnum> {
|
||||
|
@ -78,7 +78,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
@ -56,7 +56,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<OuterEnum> {
|
||||
|
@ -85,7 +85,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
@ -61,7 +61,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<JustSymbolEnum> {
|
||||
@ -112,7 +112,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<ArrayEnumEnum> {
|
||||
|
@ -56,7 +56,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumClass> {
|
||||
|
@ -62,7 +62,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringEnum> {
|
||||
@ -115,7 +115,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringRequiredEnum> {
|
||||
@ -166,7 +166,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumIntegerEnum> {
|
||||
@ -217,7 +217,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumNumberEnum> {
|
||||
|
@ -67,7 +67,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<InnerEnum> {
|
||||
|
@ -78,7 +78,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
@ -56,7 +56,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<OuterEnum> {
|
||||
|
@ -85,7 +85,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
@ -59,7 +59,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<JustSymbolEnum> {
|
||||
@ -112,7 +112,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<ArrayEnumEnum> {
|
||||
|
@ -56,7 +56,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumClass> {
|
||||
|
@ -62,7 +62,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringEnum> {
|
||||
@ -115,7 +115,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringRequiredEnum> {
|
||||
@ -166,7 +166,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumIntegerEnum> {
|
||||
@ -217,7 +217,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumNumberEnum> {
|
||||
|
@ -67,7 +67,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<InnerEnum> {
|
||||
|
@ -78,7 +78,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
@ -56,7 +56,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<OuterEnum> {
|
||||
|
@ -85,7 +85,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
@ -61,7 +61,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,7 +99,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user