Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException at TTextProtocol.readStructBegin when reading ailased enum. #180

Closed
imasahiro opened this issue May 27, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@imasahiro
Copy link
Member

Currently it seems TTextProtocol do not support reading ailased enum. When we use DocService with enum, got ClassCastException with following stack trace.

https://gist.github.com/imasahiro/2c02f1b27c4a2068dd06597fd77bb101 is a patch which can reproduce this error.

$ mvn test
(snip)
Tests run: 11, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.029 sec <<< FAILURE! - in com.linecorp.armeria.common.thrift.text.TTextProtocolTest
tTextProtocolReadWriteTest(com.linecorp.armeria.common.thrift.text.TTextProtocolTest)  Time elapsed: 0.012 sec  <<< ERROR!

java.lang.ClassCastException: org.apache.thrift.meta_data.FieldValueMetaData cannot be cast to org.apache.thrift.meta_data.EnumMetaData
        at com.linecorp.armeria.common.thrift.text.TTextProtocolTest.tTextProtocolReadWriteTest(TTextProtocolTest.java:90)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants