Fixing parameter passing with primitive types in Java8