yui: stick to java6 APIs