Menu

#6 getEmail() method returns null in ImcomingREM.java

open
nobody
None
5
2006-12-10
2006-12-10
No

//here is the original codes
public Email getEmail() {
if (getList() == MsnList.RL) {
if (protocol.before(MsnProtocol.MSNP10)) {
return Email.parseStr(getParam(2));
}
return Email.parseStr(getParam(1));
}
else {
return null;
}
}
//fixed
public Email getEmail() {
if (getList() == MsnList.RL &&protocol.before(MsnProtocol.MSNP10)) {
return Email.parseStr(getParam(2));
}
return Email.parseStr(getParam(1));
}

/*
I don't know why it simply return null when the command is not of RL, so I fixed it, but I don't know whether it'll cause protocol version problem
*/

Discussion


Log in to post a comment.