THRIFT-5437 Make TProtocolImpl CTOR virtual
Client: Delphi
Patch: Jens Geyer
diff --git a/lib/delphi/test/TestClient.pas b/lib/delphi/test/TestClient.pas
index ebc0796..c8d3fc2 100644
--- a/lib/delphi/test/TestClient.pas
+++ b/lib/delphi/test/TestClient.pas
@@ -1451,14 +1451,7 @@
end;
// create protocol instance, default to BinaryProtocol
- case FSetup.protType of
- prot_Binary : FProtocol := TBinaryProtocolImpl.Create( FTransport, BINARY_STRICT_READ, BINARY_STRICT_WRITE);
- prot_JSON : FProtocol := TJSONProtocolImpl.Create( FTransport);
- prot_Compact : FProtocol := TCompactProtocolImpl.Create( FTransport);
- else
- raise Exception.Create('Unhandled protocol');
- end;
-
+ FProtocol := PROTOCOL_CLASSES[FSetup.protType].Create(FTransport);
ASSERT( (FTransport <> nil) and (FProtocol <> nil));
end;