Allow to input string as option value (#320)

This commit is contained in:
Egor 2020-12-06 05:17:25 +03:00 committed by GitHub
parent 5296d2af0f
commit cde0fe6138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -193,6 +193,8 @@ public class GDOption<T> implements Option<T> {
public boolean validateStringValue(String value, boolean log) {
if (value.equalsIgnoreCase("undefined")) {
return false;
} else if (this.allowed == String.class) {
return true;
} else if (this.allowed == List.class) {
return true;
} else if (this.allowed == Integer.class) {

View File

@ -193,6 +193,8 @@ public class GDOption<T> implements Option<T> {
public boolean validateStringValue(String value, boolean log) {
if (value.equalsIgnoreCase("undefined")) {
return false;
} else if (this.allowed == String.class) {
return true;
} else if (this.allowed == List.class) {
return true;
} else if (this.allowed == Integer.class) {