Don't use exceptions for set checking in UserId/GroupId.fromJson()
------------------------------------------------------------------
Key: SHINDIG-565
URL: https://issues.apache.org/jira/browse/SHINDIG-565
Project: Shindig
Issue Type: Improvement
Reporter: Adam Winer
Priority: Minor
UserId and GroupId.fromJson() are implemented like so:
try {
Type idSpecEnum = Type.valueOf(jsonId.substring(1));
return new UserId(idSpecEnum, null);
} catch (IllegalArgumentException e) {
return new UserId(Type.userId, jsonId);
}
Using exceptions for non-error cases is odd and inefficient.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.