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

private static String swizzleClassNameForRead ( String name , DataInput in ) { String oldPackage = "com.gemstone.org.jgroups.stack.tcpserver" ; String newPackage = "org.apache.geode.distributed.internal.tcpserver" ; if ( name . startsWith ( oldPackage ) ) { return newPackage + name . substring ( oldPackage . length ( ) ) ; } OldClientSupportService svc = InternalDataSerializer . getOldClientSupportService ( ) ; if ( svc != null ) { return svc . processIncomingClassName ( name , in ) ; } 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 .
