clean up unnecessary Java interop in dispatch