This method contains a redundant check for a known non-zero value against the constant null
javac 1.7.0_79
findbugs 3.0.0
Hello,
I am using findbugs and I am getting this reported error:
This method contains a redundant check of a known non-null value against the constant null
Code in questions:
mClientConnection = new XMPPTCPConnection(configBuilder.build());
if(mClientConnection == null) {
return false;
}
The above code verifies that the mClientConnection contains a valid link.
The constructor contains the following:
public XMPPTCPConnection(XMPPTCPConnectionConfiguration config) {
super(config);
this.config = config;
}
I'm wondering how can I check that the mClientConnection contains a valid link?
Thanks a lot for any suggestions,
+3
source to share