workaround to fix Java code which is not valid under android.