[java] add useNullForUnknownEnumValue option (#633)

This commit is contained in:
Jérémie Bresson
2018-07-26 11:00:45 +02:00
committed by GitHub
parent 44d419c1a1
commit a8e8acead7
282 changed files with 449 additions and 419 deletions

View File

@@ -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> {

View File

@@ -56,7 +56,7 @@ public enum EnumClass {
return b;
}
}
return null;
throw new IllegalArgumentException("Unexpected value '" + text + "'");
}
public static class Adapter extends TypeAdapter<EnumClass> {

View File

@@ -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> {

View File

@@ -67,7 +67,7 @@ public class MapTest {
return b;
}
}
return null;
throw new IllegalArgumentException("Unexpected value '" + text + "'");
}
public static class Adapter extends TypeAdapter<InnerEnum> {

View File

@@ -78,7 +78,7 @@ public class Order {
return b;
}
}
return null;
throw new IllegalArgumentException("Unexpected value '" + text + "'");
}
public static class Adapter extends TypeAdapter<StatusEnum> {

View File

@@ -56,7 +56,7 @@ public enum OuterEnum {
return b;
}
}
return null;
throw new IllegalArgumentException("Unexpected value '" + text + "'");
}
public static class Adapter extends TypeAdapter<OuterEnum> {

View File

@@ -85,7 +85,7 @@ public class Pet {
return b;
}
}
return null;
throw new IllegalArgumentException("Unexpected value '" + text + "'");
}
public static class Adapter extends TypeAdapter<StatusEnum> {