Remove superfluous parens like: return (foo + 1); int len = (foo + 1); if ((foo + 1 > 2)) ((String) foo)