When using the on() method to get a pointer to methods of a class that return
char (or Character) values then these pointers are mixed up.
Cause of this issue is the implementation of
ch.lambdaj.function.argument.ArgumentsFactory.getPrimitivePlaceHolder(Class<?>
clazz, Integer placeholderId).
For characters the line
return Character.forDigit(placeholderId % Character.MAX_RADIX, Character.MAX_RADIX);
determines the placeholder for the method. placeholderId starts at
Integer.MIN_VALUE, but Character.forDigit() expects a parameter >= 0 as first
argument and returns the null character ('\u0000') for negative values. In
practice, the null character is returned every time, therefore.
A simple fix could be to change the line above to
return Character.forDigit((placeholderId - Integer.MIN_VALUE) % Character.MAX_RADIX, Character.MAX_RADIX);
Original issue reported on code.google.com by kobold.s...@gmail.com on 7 Oct 2013 at 12:44
Original issue reported on code.google.com by
kobold.s...@gmail.com
on 7 Oct 2013 at 12:44