The only caller I see of readDSFIDHeader is JGroupMessenger. It looks like if
it did return MAX_VALUE that it would not complain but it seems clearly wrong
for it to happen. It seems liket he switch statement in readEncryptedMessage
should complain if "dsfid" is not one of the expected values. You could also
have DS_NO_FIXED_ID throw IllegalStateException instead of returning MAX_VALUE.
DistributionMessage readEncryptedMessage(DataInputStream dis, short ordinal,
GMSEncrypt encryptLocal) throws Exception {
int dfsid = InternalDataSerializer.readDSFIDHeader(dis);
int requestId = dis.readInt();
long start = services.getStatistics().startUDPMsgDecryption();
try {
logger.debug("readEncryptedMessage Reading Request id " + dfsid + " and
requestid is "
+ requestId + " myid " + this.localAddress);
InternalDistributedMember pkMbr = null;
boolean readPK = false;
switch (dfsid) {
case FIND_COORDINATOR_REQ:
case JOIN_REQUEST:
readPK = true;
break;
case FIND_COORDINATOR_RESP:
case JOIN_RESPONSE:
// this will have requestId to know the PK
pkMbr = getRequestedMember(requestId);
break;
}
[ Full content available at: https://github.com/apache/geode/pull/2434 ]
This message was relayed via gitbox.apache.org for [email protected]