[
https://issues.apache.org/jira/browse/GOSSIP-4?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15315546#comment-15315546
]
Edward Capriolo commented on GOSSIP-4:
--------------------------------------
Sorry to ping pong this issue if I was unclear or incomplete in my thoughts.
Also sorry if this seems nit picky.
I think we are better throwing IllegalArgumentException and specify a
meaningful error message rather than a NullPointerException
For example :
if (clusterName == null) throw new IllegalArgumentException( "You must specify
a cluster name")
You can also write unit test something like this:
{noformat}
@Test(expected=IllegalArgumentException.class)
public void aTest()
new RandomGossipmanager( new Builder() );
}
{noformat}
> Use builder to create RandomGossipManager
> -----------------------------------------
>
> Key: GOSSIP-4
> URL: https://issues.apache.org/jira/browse/GOSSIP-4
> Project: Gossip
> Issue Type: Improvement
> Reporter: Jaideep Dhok
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)