Commit 15263a6
Fix NPE in ReverseBuildTrigger due to null upstream threshold (#23916)
* Fix NPE in ReverseBuildTrigger due to null upstream threshold (JENKINS-39044)
* Use ReverseTrigger constructor that is not deprecated
Has the same result as the deprecated constructor that was used before.
* Add automated test of JENKINS-39044
If the ReverseTrigger threshold were null, a null pointer exception would
be thrown. The config round trip operation resets a null threshold to
SUCCESS, so this test reaches inside the job definition and changes the
threshold directly.
Testing done:
* Confirmed that the modified automated test fails when the change to
ReverseTrigger is removed.
* Confirmed that the modified automated test passes when the change to
ReverseTrigger is included.
* Link to GitHub issue
---------
Co-authored-by: Mark Waite <[email protected]>1 parent 4df1ecc commit 15263a6
File tree
2 files changed
+9
-4
lines changed- core/src/main/java/jenkins/triggers
- test/src/test/java/jenkins/triggers
2 files changed
+9
-4
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
211 | 216 | | |
212 | 217 | | |
213 | 218 | | |
| |||
0 commit comments