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

Check that job is not null before starting to process event #344

Merged
merged 1 commit into from Jan 26, 2018

Conversation

Projects
None yet
2 participants
@Jimilian
Copy link
Contributor

commented Jan 22, 2018

During job creation process there is a short window then GerritTrigger
does not have valid refecence to job it belongs to.

Jan 22, 2018 10:09:45 AM com.sonymobile.tools.gerrit.gerritevents.GerritHandler notifyListeners
SEVERE: When notifying listener: com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener@a63d3ad0 about event: RefReplicated [project=XXX, ref=refs/heads/master, status=succeeded, targetNode=YYY]
Jan 22, 2018 10:09:45 AM com.sonymobile.tools.gerrit.gerritevents.GerritHandler notifyListeners
SEVERE: Notify-error: 
java.lang.NullPointerException
        at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.isInteresting(GerritTrigger.java:939)
        at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.EventListener.gerritEvent(EventListener.java:114)
        at com.sonymobile.tools.gerrit.gerritevents.GerritHandler.notifyListener(GerritHandler.java:328)
        at com.sonymobile.tools.gerrit.gerritevents.GerritHandler.notifyListeners(GerritHandler.java:296)
        at com.sonyericsson.hudson.plugins.gerrit.trigger.JenkinsAwareGerritHandler.notifyListeners(JenkinsAwareGerritHandler.java:77)
        at com.sonymobile.tools.gerrit.gerritevents.workers.AbstractGerritEventWork.perform(AbstractGerritEventWork.java:46)
        at com.sonymobile.tools.gerrit.gerritevents.workers.AbstractJsonObjectWork.perform(AbstractJsonObjectWork.java:77)
        at com.sonymobile.tools.gerrit.gerritevents.workers.StreamEventsStringWork.perform(StreamEventsStringWork.java:67)
        at com.sonymobile.tools.gerrit.gerritevents.workers.EventThread.run(EventThread.java:66)
        at com.sonyericsson.hudson.plugins.gerrit.trigger.SystemEventThread.run(SystemEventThread.java:66)
@rsandell
Copy link
Member

left a comment

needs merge with master.

Check that job is not null before starting to process event
During job creation process there is a short window then GerritTrigger
does not have valid refecence to job it belongs to.

@Jimilian Jimilian force-pushed the Jimilian:fix_npe_isInteresting branch from 2264f05 to a030984 Jan 25, 2018

@Jimilian

This comment has been minimized.

Copy link
Contributor Author

commented Jan 25, 2018

@rsandell Done

@rsandell rsandell merged commit a1522c2 into jenkinsci:master Jan 26, 2018

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@Jimilian Jimilian deleted the Jimilian:fix_npe_isInteresting branch Jan 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.