powered by Jive Software

A potential bug by a code smell?


In a recent Openfire snapshot in github, I’ve found a suspicous code in src/plugins/fastpath/src/java/org/jivesoftware/xmpp/workgroup/Agent.java

241 public void setAgentJID(JID agentJID) {

242 // Do nothing if setting the same old value

243 if (agentJID != null && agentJID.equals(agentJID)) {

244 return;

245 }

246 // Set the new value

247 this.agentJID = agentJID;

248 // Save the new Agent’s state to the database

249 saveAgent();

250 }

In Line 243, should “agentJID.equals(agentJID)” be “this.agentJID.equals(agentJID)”? This may not be an issue but wanted to report just in case. Thanks!

same report Expression is always true

Not sure if it is actually a bug, but i have filed this for someone to look at OF-1315