@VisibleForTesting public ThriftCatalog(Monitor monitor) { this.monitor = monitor; addDefaultCoercions(DefaultJavaCoercions.class); }
@VisibleForTesting public ThriftCatalog(Monitor monitor) { this.monitor = monitor; addDefaultCoercions(DefaultJavaCoercions.class); }
@BeforeMethod protected void setUp() throws Exception { readCodecManager = createReadCodecManager(); writeCodecManager = createWriteCodecManager(); readCodecManager.getCatalog().addDefaultCoercions(DefaultJavaCoercions.class); writeCodecManager.getCatalog().addDefaultCoercions(DefaultJavaCoercions.class); }
@BeforeMethod protected void setUp() throws Exception { codecManager = new ThriftCodecManager(new ThriftCodecFactory() { @Override public ThriftCodec<?> generateThriftTypeCodec(ThriftCodecManager codecManager, ThriftStructMetadata metadata) { throw new UnsupportedOperationException(); } }); ThriftCatalog catalog = codecManager.getCatalog(); catalog.addDefaultCoercions(DefaultJavaCoercions.class); ThriftType fruitType = catalog.getThriftType(Fruit.class); codecManager.addCodec(new EnumThriftCodec<Fruit>(fruitType)); }