[ http://issues.apache.org/jira/browse/HADOOP-629?page=all ]
Owen O'Malley updated HADOOP-629: --------------------------------- Fix Version/s: 0.9.0 (was: 0.8.0) > none of the rpc servers check the protcol name for validity > ----------------------------------------------------------- > > Key: HADOOP-629 > URL: http://issues.apache.org/jira/browse/HADOOP-629 > Project: Hadoop > Issue Type: Bug > Components: ipc > Affects Versions: 0.7.2 > Reporter: Owen O'Malley > Assigned To: Wendy Chien > Fix For: 0.9.0 > > > All of the Hadoop RPC servers either ignore the protocol name or do: > if (protocol.equals(Prot1.class.getName()) { > return Prot1.versionId; > } else { > return Prot2.versionId; > } > A much better structure would be: > if (Prot1.class.getName().equals(protocol)) { > return Prot1.versionId; > } else if (Prot2.class.getName().equals(protocol)) { > return Prot2.versionId; > } else { > throw new VersionMismatchException("Expected protocol Prot1 or Prot2 and > received: " + protocol); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira