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

Allow override UserProperty.setUser(User)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      UserProperty may contain nested objects that depend on User.
      On User reconfiguration setUser(User) is called so it should be non-final to have ability override it and update references in nested objects.

      I want store some configs in nested classes without messing all logic in UserProperty class.

      https://github.com/jenkinsci/jenkins/pull/2655

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kanstantsin Shautsou
          Path:
          core/src/main/java/hudson/model/UserProperty.java
          test/src/test/java/hudson/model/UserPropertyTest.java
          test/src/test/resources/hudson/model/UserPropertyTest/SetUserUserProperty/config.jelly
          test/src/test/resources/hudson/model/UserPropertyTest/nestedUserReference/config.xml
          test/src/test/resources/hudson/model/UserPropertyTest/nestedUserReference/users/nestedUserReference/config.xml
          http://jenkins-ci.org/commit/jenkins/9172bca30fbdfc2478ccb60458dd397ba6b1df55
          Log:
          [FIX JENKINS-40266] Allow override UserProperty.setUser(User) (#2655)

          UserProperty may contain nested objects that depend on User.
          On User reconfiguration setUser(User) is called so it should be non-final to have ability override it and update references in nested objects.

          Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kanstantsin Shautsou Path: core/src/main/java/hudson/model/UserProperty.java test/src/test/java/hudson/model/UserPropertyTest.java test/src/test/resources/hudson/model/UserPropertyTest/SetUserUserProperty/config.jelly test/src/test/resources/hudson/model/UserPropertyTest/nestedUserReference/config.xml test/src/test/resources/hudson/model/UserPropertyTest/nestedUserReference/users/nestedUserReference/config.xml http://jenkins-ci.org/commit/jenkins/9172bca30fbdfc2478ccb60458dd397ba6b1df55 Log: [FIX JENKINS-40266] Allow override UserProperty.setUser(User) (#2655) UserProperty may contain nested objects that depend on User. On User reconfiguration setUser(User) is called so it should be non-final to have ability override it and update references in nested objects. Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>

            People

            Assignee:
            integer Kanstantsin Shautsou
            Reporter:
            integer Kanstantsin Shautsou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: