java2scala and formatting fix