• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • core
    • None

      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

          [JENKINS-40266] Allow override UserProperty.setUser(User)

          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>

          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>

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

              Created:
              Updated:
              Resolved: