This line of code https://code.google.com/p/google-oauth-java-client/source/browse/google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/BearerToken.java#44 contains a bug.
The INVALID_TOKEN_ERROR
regex is wrong and there are no chances that the mantainers will fix it soon.
Beside forking the library, is there a way I can redefine this safely in my own code?
Incriminated code follows for who doesn't want to open the link:
public class BearerToken {
[...]
static final Pattern INVALID_TOKEN_ERROR = Pattern.compile("\\s*error\\s*=\\s*invalid_token");