We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
public class IQueueTest { private static final String Q = "q"; private HazelcastInstance instance; private HazelcastInstance client; @Before public void setUp() throws Exception { instance = Hazelcast.newHazelcastInstance(); client = HazelcastClient.newHazelcastClient(); } @After public void tearDown() throws Exception { client.shutdown(); instance.shutdown(); } @Test(expected = NullPointerException.class) public void addNullShouldThrow() throws Exception { IQueue<String> myQueue = client.getQueue(Q); myQueue.add(null); } @Test(expected = NullPointerException.class) public void putNullShouldThrow() throws Exception { IQueue<String> myQueue = client.getQueue(Q); myQueue.put(null); } @Test(expected = NullPointerException.class) public void queueShouldNotBeAbleToContainNull() throws Exception { BlockingQueue<String> q = client.getQueue(Q); q.add(null); q.add("hello"); assertEquals(2, q.size()); q.poll(); String hello = q.poll(); assertEquals("hello", hello); } }
The text was updated successfully, but these errors were encountered:
Add null checking on client IQueue add/offer/put
35a9289
Fixes hazelcast#7048
Thanks for reporting these bugs! There is a PR pending with the fix.
Sorry, something went wrong.
023c234
pveentjer
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: