[FIX] removed erroneous return statement (left-over from testing); added check for Java