Already checked in Java, but requested by security review. Change-Id: I5314dbc32546278b977236a154fba03f38610b1a