nacx commented on this pull request.
> @@ -92,7 +97,14 @@ protected final String > provideTenant(@Named("oauth.endpoint") final String oauth if (!m.matches()) { throw new IllegalArgumentException("Could not parse tenantId from: " + oauthEndpoint); } - return m.group(1); + return m.group(2); + } + + @Provides + @Singleton + @Named(IS_CHINA_ENDPOINT) + protected final boolean isChinaEndpoint(@Named("oauth.endpoint") final String oauthEndpoint) { + return CHINA_OAUTH_ENDPOINT_PATTERN.matcher(oauthEndpoint).matches(); Add proper unit tests for this method -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/1237#pullrequestreview-152162782