StompProtocolAndroid icon indicating copy to clipboard operation
StompProtocolAndroid copied to clipboard

When connection is not established for invalid URL and call mStompClient.isConnected() , then crash the APP

Open ghost opened this issue 6 years ago • 1 comments

When connection is not established for invalid URL and call mStompClient.isConnected() , then crash the APP

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference at tv.jaja.stomp.StompClient.isConnected(StompClient.java:306)

ghost avatar May 27 '19 04:05 ghost

StompClient will throw null pointer exception when it is not connected. So, check if(mStompClient!=null){ if(mStompClient.isConnected()){ //Do your code here. } }

queendevelopers avatar Sep 16 '19 09:09 queendevelopers