Tidy up Java interop

Replace `(.)` with `(.close)`