From eaef78832364d817606349ad664110041e975f25 Mon Sep 17 00:00:00 2001 From: rafern <15365765+rafern@users.noreply.github.com> Date: Mon, 16 Sep 2019 20:16:38 +0100 Subject: [PATCH] Fix objects equal to null not being detected as null (flutter/engine#11283) --- .../android/io/flutter/plugin/common/StandardMessageCodec.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java b/engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java index b99a3aee80..118c7c3495 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/plugin/common/StandardMessageCodec.java @@ -221,7 +221,7 @@ public class StandardMessageCodec implements MessageCodec { * super for values that the extension does not handle.

*/ 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);