private static String swizzleClassNameForWrite(String name,DataOutput out){
  String oldPackage="com.gemstone.org.jgroups.stack.tcpserver";
  String newPackage="org.apache.geode.distributed.internal.tcpserver";
  if (name.startsWith(newPackage)) {
    return oldPackage + name.substring(newPackage.length());
  }
  OldClientSupportService svc=InternalDataSerializer.getOldClientSupportService();
  if (svc != null) {
    return svc.processOutgoingClassName(name,out);
  }
  return name;
}

private static String swizzleClassNameForWrite ( String name , DataOutput out ) { String oldPackage = "com.gemstone.org.jgroups.stack.tcpserver" ; String newPackage = "org.apache.geode.distributed.internal.tcpserver" ; if ( name . startsWith ( newPackage ) ) { return oldPackage + name . substring ( newPackage . length ( ) ) ; } OldClientSupportService svc = InternalDataSerializer . getOldClientSupportService ( ) ; if ( svc != null ) { return svc . processOutgoingClassName ( name , out ) ; } return name ; }
for backward compatibility we must swizzle the package of some classes that had to be moved when gemfire was open - sourced . this preserves backward - compatibility .
