THRIFT-4784 Thrift should throw when skipping over unexpected data
Client: as3
Patch: Jens Geyer
diff --git a/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as b/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as
index 513df95..22877b7 100644
--- a/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as
+++ b/lib/as3/src/org/apache/thrift/protocol/TProtocolUtil.as
@@ -141,7 +141,7 @@
           break;
         }
         default:
-          break;
+          throw new TProtocolError(TProtocolError.INVALID_DATA, "invalid data");
       }
     }
   }