fix pretty printing of user lists in java backend

@yilongli please review