Both source name and urlPath are now supported in deserialization
This commit is contained in:
parent
c4f314e383
commit
bd0cde7838
|
@ -43,9 +43,13 @@ public enum Sources {
|
|||
public static Sources onDeserialize(String sourceString) {
|
||||
if(sourceString != null) {
|
||||
for(Sources source : Sources.values()) {
|
||||
if (source.urlPath.equalsIgnoreCase(sourceString.trim()))
|
||||
if (source.urlPath.equalsIgnoreCase(sourceString.trim())) {
|
||||
return source;
|
||||
}
|
||||
if (source.sourceName.equalsIgnoreCase(sourceString.trim())) {
|
||||
return source;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue