Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IQueue accepts null values from HazelcastClient #7048

tlamerig opened this issue Dec 10, 2015 · 1 comment


None yet
4 participants
Copy link

commented Dec 10, 2015

public class IQueueTest {
    private static final String Q = "q";
    private HazelcastInstance instance;
    private HazelcastInstance client;

    public void setUp() throws Exception {
        instance = Hazelcast.newHazelcastInstance();
        client = HazelcastClient.newHazelcastClient();

    public void tearDown() throws Exception {

    @Test(expected = NullPointerException.class)
    public void addNullShouldThrow() throws Exception {
        IQueue<String> myQueue = client.getQueue(Q);

    @Test(expected = NullPointerException.class)
    public void putNullShouldThrow() throws Exception {
        IQueue<String> myQueue = client.getQueue(Q);

    @Test(expected = NullPointerException.class)
    public void queueShouldNotBeAbleToContainNull() throws Exception {
        BlockingQueue<String> q = client.getQueue(Q);
        assertEquals(2, q.size());
        String hello = q.poll();
        assertEquals("hello", hello);

This comment has been minimized.

Copy link

commented Dec 11, 2015

Thanks for reporting these bugs! There is a PR pending with the fix.

@jerrinot jerrinot added this to the 3.6 milestone Dec 11, 2015

pveentjer added a commit to pveentjer/hazelcast that referenced this issue Dec 11, 2015

@eminn eminn closed this in #7052 Dec 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.