[ https://issues.apache.org/jira/browse/THRIFT-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James E. King, III updated THRIFT-319: -------------------------------------- Priority: Minor (was: Major) > Generated structs should check that lists, sets, and maps are of the proper > type > -------------------------------------------------------------------------------- > > Key: THRIFT-319 > URL: https://issues.apache.org/jira/browse/THRIFT-319 > Project: Thrift > Issue Type: Improvement > Reporter: Bryan Duxbury > Priority: Minor > > Some languages' generated structs don't check that a collection's element > types are of the expected types. This could lead to trying to read the wrong > types from the wire after only checking that you read the right kind of > collection header, which would be disastrous. > In the case of finding the right collection type but the wrong element type, > we can either throw an exception of just silently skip the collection. I'm > not sure off hand which approach would be superior. > One additional caveat: we should only check the element type after we've > checked the collection size. If it's 0-length, then it doesn't matter what > the types are. (This is an optimization the compact protocol in THRIFT-110 > requires.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)