[
https://issues.apache.org/jira/browse/SHINDIG-565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adam Winer updated SHINDIG-565:
-------------------------------
Attachment: shindig-565.patch
Patch to clean this up.
> 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
> Attachments: shindig-565.patch
>
>
> 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.