fix the java decorator
function that returns function pointer