Attempt to work with java's broken variance

Signed-off-by: Gary Pamparà <gpampara@gmail.com>
Merge remote-tracking branch 'upstream/master'