java: add override annotations
fix: fix browser detection when user agent is null