mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Add TODO
This commit is contained in:
parent
2ba21f0277
commit
a6eedf97c5
1 changed files with 5 additions and 2 deletions
|
@ -67,9 +67,12 @@ public class ProtoUtil {
|
|||
@Nullable
|
||||
public static <E extends Enum<E>> E enumFromProto(Class<E> enumType, String name) {
|
||||
E result = Enums.getIfPresent(enumType, name).orNull();
|
||||
if (result == null)
|
||||
if (result == null) {
|
||||
log.error("Invalid value for enum " + enumType.getSimpleName() + ": " + name);
|
||||
|
||||
// TODO returning null here can cause problems in caller. Maybe we should throw an exception? Or maybe
|
||||
// better to ensure that enums have always a default value with represents an undefined state and we fall
|
||||
// back to that.
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue