[SPARK-3518] Remove wasted statement in JsonProtocol

Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp>

Closes #2380 from sarutak/SPARK-3518 and squashes the following commits:

8a1464e [Kousuke Saruta] Replaced a variable with simple field reference
c660fbc [Kousuke Saruta] Removed useless statement in JsonProtocol.scala

(cherry picked from commit e59fac1f97c3fbeeb6defd12625a49763a353156)
Signed-off-by: Patrick Wendell <pwendell@gmail.com>