facebookarchive / swift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
900 stars 297 forks source link

"Required" not working #254

Closed bsideup closed 6 years ago

bsideup commented 9 years ago

There are no error when i'm trying to send struct with non-set required field. Normal thrift will throw an Exception

https://github.com/bsideup/swift-test/tree/db14820915d6e7b199d1280a97306e1679d2644c

I think problem is here: https://github.com/facebook/swift/blob/master/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L907-907

There is no check for requiredness

https://github.com/facebook/swift/blob/master/swift-codec/src/main/java/com/facebook/swift/codec/internal/compiler/ThriftCodecByteCodeGenerator.java#L703-703

As well as here

ghost commented 9 years ago

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.