StompProtocolAndroid
StompProtocolAndroid copied to clipboard
When connection is not established for invalid URL and call mStompClient.isConnected() , then crash the APP
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)
StompClient will throw null pointer exception when it is not connected. So, check
if(mStompClient!=null){
if(mStompClient.isConnected()){
//Do your code here.
}
}