Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33479

NPE from AbstractFolder.getView

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      After Kohsuke Kawaguchi's work on github-organization-folder, we get

      java.lang.NullPointerException
      	at com.cloudbees.hudson.plugins.folder.AbstractFolder.getView(AbstractFolder.java:380)
      	at org.jenkinsci.plugins.orgfolder.github.MainLogic.applyRepo(MainLogic.java:121)
      	at org.jenkinsci.plugins.orgfolder.github.ItemListenerImpl.maybeApply(ItemListenerImpl.java:44)
      	at org.jenkinsci.plugins.orgfolder.github.ItemListenerImpl.onUpdated(ItemListenerImpl.java:27)
      	at hudson.model.listeners.ItemListener$3.apply(ItemListener.java:195)
      	at hudson.model.listeners.ItemListener$3.apply(ItemListener.java:193)
      	at hudson.model.listeners.ItemListener.forAll(ItemListener.java:167)
      	at hudson.model.listeners.ItemListener.fireOnUpdated(ItemListener.java:193)
      	at com.cloudbees.hudson.plugins.folder.AbstractFolder.save(AbstractFolder.java:646)
      	at hudson.model.View.save(View.java:334)
      	at com.cloudbees.hudson.plugins.folder.AbstractFolder.initViews(AbstractFolder.java:236)
      	at com.cloudbees.hudson.plugins.folder.AbstractFolder.init(AbstractFolder.java:196)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.init(ComputedFolder.java:110)
      	at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.<init>(ComputedFolder.java:105)
      	at jenkins.branch.MultiBranchProject.<init>(MultiBranchProject.java:114)
      	at ...
      

      since getView is unexpectedly being called from inside initViews, when viewGroupMixIn is not yet set.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/6537ed139bd84668a9da5d9fdac37318eb1448de
            Log:
            [FIXED JENKINS-33479] NPE caused by accessing viewGroupMixIn inside ctor before it was actually set.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/6537ed139bd84668a9da5d9fdac37318eb1448de Log: [FIXED JENKINS-33479] NPE caused by accessing viewGroupMixIn inside ctor before it was actually set.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/e6510238d4b5d16831807c24e9646adf128febce
            Log:
            Merge pull request #39 from jglick/AbstractFolder.getView-NPE-JENKINS-33479

            JENKINS-33479 NPE

            Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/8fdb613edd24...e6510238d4b5

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/e6510238d4b5d16831807c24e9646adf128febce Log: Merge pull request #39 from jglick/AbstractFolder.getView-NPE- JENKINS-33479 JENKINS-33479 NPE Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/8fdb613edd24...e6510238d4b5
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java
            http://jenkins-ci.org/commit/cloudbees-folder-plugin/4d316b9c67ee76c4507467b9b89850adc884ad12
            Log:
            Merge pull request #41 from jglick/initViews-no-save

            JENKINS-33479 JENKINS-33480 Avoid calling `save` from within our own constructor

            Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/8669336a8f43...4d316b9c67ee

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/AbstractFolder.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/4d316b9c67ee76c4507467b9b89850adc884ad12 Log: Merge pull request #41 from jglick/initViews-no-save JENKINS-33479 JENKINS-33480 Avoid calling `save` from within our own constructor Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/8669336a8f43...4d316b9c67ee

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: