Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix NoSuchElementException when no comments #1

Merged
merged 1 commit into from
Sep 10, 2012

Conversation

accek
Copy link
Contributor

@accek accek commented Sep 9, 2012

Fixes the following error when looking on a new pull requests with
no comments yet:

Sep 9, 2012 2:27:10 PM hudson.triggers.Trigger checkTriggers
WARNING: org.jenkinsci.plugins.ghprb.GhprbTrigger.run() failed for xxx
java.util.NoSuchElementException
at org.kohsuke.github.Requester$1.next(Requester.java:212)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:42)
at org.kohsuke.github.PagedIterator.nextPage(PagedIterator.java:57)
at org.kohsuke.github.PagedIterable.asList(PagedIterable.java:20)
at org.kohsuke.github.GHIssue.getComments(GHIssue.java:184)
at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:46)
at org.jenkinsci.plugins.ghprb.GhprbRepo.check(GhprbRepo.java:60)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:92)
at hudson.triggers.Trigger.checkTriggers(Trigger.java:259)
at hudson.triggers.Trigger$Cron.doRun(Trigger.java:207)
at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

Fixes the following error when looking on a new pull requests with
no comments yet:

Sep 9, 2012 2:27:10 PM hudson.triggers.Trigger checkTriggers
WARNING: org.jenkinsci.plugins.ghprb.GhprbTrigger.run() failed for xxx
java.util.NoSuchElementException
        at org.kohsuke.github.Requester$1.next(Requester.java:212)
        at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:42)
        at org.kohsuke.github.PagedIterator.nextPage(PagedIterator.java:57)
        at org.kohsuke.github.PagedIterable.asList(PagedIterable.java:20)
        at org.kohsuke.github.GHIssue.getComments(GHIssue.java:184)
        at org.jenkinsci.plugins.ghprb.GhprbPullRequest.check(GhprbPullRequest.java:46)
        at org.jenkinsci.plugins.ghprb.GhprbRepo.check(GhprbRepo.java:60)
        at org.jenkinsci.plugins.ghprb.GhprbTrigger.run(GhprbTrigger.java:92)
        at hudson.triggers.Trigger.checkTriggers(Trigger.java:259)
        at hudson.triggers.Trigger$Cron.doRun(Trigger.java:207)
        at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:54)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
janinko added a commit that referenced this pull request Sep 10, 2012
fix NoSuchElementException when no comments
@janinko janinko merged commit 0a82964 into jenkinsci:master Sep 10, 2012
@janinko
Copy link
Member

janinko commented Sep 10, 2012

It is IMHO issue in github-api. I filed bug report: hub4j/github-api#20

@accek
Copy link
Contributor Author

accek commented Sep 11, 2012

Yes, I'd second that. I needed some quick fix for myself and it was a no-brainer to share it.

DavidTanner pushed a commit that referenced this pull request Jan 20, 2015
Fixed configuration fixtures for commit status context
DavidTanner added a commit that referenced this pull request Dec 1, 2015
Merge in latest from jenkinsci
DavidTanner added a commit that referenced this pull request Jan 26, 2016
Move PR lists down to the job configuration
nosmo pushed a commit to nosmo/ghprb-plugin that referenced this pull request Dec 12, 2018
Fixed configuration fixtures for commit status context
nosmo pushed a commit to nosmo/ghprb-plugin that referenced this pull request Dec 12, 2018
Merge in latest from jenkinsci
nosmo pushed a commit to nosmo/ghprb-plugin that referenced this pull request Dec 12, 2018
Move PR lists down to the job configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants