Fix objects equal to null not being detected as null (flutter/engine#11283)

This commit is contained in:
rafern
2019-09-16 20:16:38 +01:00
committed by Chris Bracken
parent a8f0713575
commit eaef788323

View File

@@ -221,7 +221,7 @@ public class StandardMessageCodec implements MessageCodec<Object> {
* super for values that the extension does not handle.</p>
*/
protected void writeValue(ByteArrayOutputStream stream, Object value) {
if (value == null) {
if (value == null || value.equals(null)) {
stream.write(NULL);
} else if (value == Boolean.TRUE) {
stream.write(TRUE);