java: Harden constant pool helpers
java: Harden constant pool helpers

Check constant pool entry tag and assert out on failure.

Signed-off-by: Pekka Enberg <add4fcd06328a394f0ad91feda7ee057316dc5ed@kernel.org>

penberg/hornet,penberg/hornet,penberg/hornet,penberg/hornet