8168998: Incorrect implementation of equals in Encoding and Type in JavaSoundReviewed-by: prr, amenkov