Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit 7ff9734

Browse files
committed
Merge pull request hub4j#170 from KostyaSha/coverity
Improvements
2 parents 68dda3a + 9ebc9c0 commit 7ff9734

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/java/org/kohsuke/github/GHEventPayload.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public GHRepository getRepository() {
165165

166166
@Override
167167
void wrapUp(GitHub root) {
168+
super.wrapUp(root);
168169
if (repository!=null)
169170
repository.wrap(root);
170171
}

src/test/java/org/kohsuke/github/AbstractGitHubApiTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public void setUp() throws Exception {
1919
if (f.exists()) {
2020
// use the non-standard credential preferentially, so that developers of this library do not have
2121
// to clutter their event stream.
22-
gitHub = GitHubBuilder.fromPropertyFile(f.getPath()).build();
22+
gitHub = GitHubBuilder.fromPropertyFile(f.getPath()).withRateLimitHandler(RateLimitHandler.FAIL).build();
2323
} else {
24-
gitHub = GitHub.connect();
24+
gitHub = GitHubBuilder.fromCredentials().withRateLimitHandler(RateLimitHandler.FAIL).build();
2525
}
2626
}
2727

src/test/java/org/kohsuke/github/AppTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,8 @@ public void testReadme() throws IOException {
673673
public void testTrees() throws IOException {
674674
GHTree masterTree = gitHub.getRepository("kohsuke/github-api").getTree("master");
675675
boolean foundReadme = false;
676-
for(GHTreeEntry e : masterTree.getTree()){
677-
if("readme".equalsIgnoreCase(e.getPath().replaceAll(".md", ""))){
676+
for(GHTreeEntry e : masterTree.getTree()){
677+
if("readme".equalsIgnoreCase(e.getPath().replaceAll("\\.md", ""))){
678678
foundReadme = true;
679679
break;
680680
}

0 commit comments

Comments
 (0)