Reworked this change a bit.

- GHApiInfo need not be public because it's not publicly exposed.
- Throwing an exception is better IMO as it allows richer error message,
  including the differentiation between unreachable host name vs wrong
  URL, and reporting the API endpoint URL that was actually tried.
This commit is contained in:
Kohsuke Kawaguchi
2015-12-01 16:01:01 +01:00
parent acbafee02a
commit 0f45d03c51
3 changed files with 19 additions and 27 deletions

View File

@@ -124,6 +124,6 @@ public class GitHubTest {
@Test
public void testGitHubIsApiUrlValid() throws IOException {
GitHub github = GitHub.connectAnonymously();
assertTrue(github.isApiUrlValid());
github.checkApiUrlValidity();
}
}