You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Paul Lindner (JIRA)" <ji...@apache.org> on 2008/09/03 13:05:44 UTC
[jira] Resolved: (SHINDIG-565) Don't use exceptions for set
checking in UserId/GroupId.fromJson()
[ https://issues.apache.org/jira/browse/SHINDIG-565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Lindner resolved SHINDIG-565.
----------------------------------
Resolution: Fixed
resolved with changes, better encapsulation.
> 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.