Java switch commit