Java cleanups

Two small Java fixes - one for IntelliJ, one for surfacing warnings (so we see what we fix!).