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

Align behaviour of ITopic#publish with null message on member and client #15338

Closed
mmedenjak opened this issue Jul 19, 2019 · 0 comments · Fixed by #15985
Closed

Align behaviour of ITopic#publish with null message on member and client #15338

mmedenjak opened this issue Jul 19, 2019 · 0 comments · Fixed by #15985

Comments

@mmedenjak
Copy link
Contributor

@mmedenjak mmedenjak commented Jul 19, 2019

Member-side allows null message while client-side throws a NPE :

java.lang.NullPointerException
	at com.hazelcast.client.impl.protocol.util.ParameterUtil.calculateDataSize(ParameterUtil.java:36)
	at com.hazelcast.client.impl.protocol.codec.TopicPublishCodec$RequestParameters.calculateDataSize(TopicPublishCodec.java:34)
	at com.hazelcast.client.impl.protocol.codec.TopicPublishCodec.encodeRequest(TopicPublishCodec.java:43)
	at com.hazelcast.client.proxy.ClientTopicProxy.publish(ClientTopicProxy.java:54)
	at com.hazelcast.topic.AbstractTopicNullTest.lambda$testNullability$0(AbstractTopicNullTest.java:33)
	at com.hazelcast.topic.AbstractTopicNullTest$ConsumerEx.accept(AbstractTopicNullTest.java:60)
	at com.hazelcast.topic.AbstractTopicNullTest.assertThrows(AbstractTopicNullTest.java:45)
	at com.hazelcast.topic.AbstractTopicNullTest.assertThrowsNPE(AbstractTopicNullTest.java:39)
	at com.hazelcast.topic.AbstractTopicNullTest.testNullability(AbstractTopicNullTest.java:33)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at com.hazelcast.test.FailOnTimeoutStatement$CallableStatement.call(FailOnTimeoutStatement.java:114)
	at com.hazelcast.test.FailOnTimeoutStatement$CallableStatement.call(FailOnTimeoutStatement.java:106)
	at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
	at java.util.concurrent.FutureTask.run(FutureTask.java)
	at java.lang.Thread.run(Thread.java:745)
@mmedenjak mmedenjak added this to the 4.0 milestone Jul 19, 2019
@sancar sancar added the Team: Client label Nov 12, 2019
sancar added a commit to sancar/hazelcast that referenced this issue Nov 12, 2019
To allow client and member behaviour, we disallow publishing
`null` message on topic
fixes hazelcast#15338
@sancar sancar self-assigned this Nov 12, 2019
sancar added a commit that referenced this issue Nov 12, 2019
To allow client and member behaviour, we disallow publishing
`null` message on topic
fixes #15338
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.