Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While testing the upgrade of Commons FileUpload from v1 to v2, I noticed that
QueueTest#fileItemPersistence
started failing because the v2DiskFileItem
wasn't serializable with XStream, as it trips up JEP-200 class filtering. Looking at what this test does, it seems like a fairly artificial / contrived test. Back when it was added in commit 06d93cb,FileParameterValue
was indeed serializing aFileItem
to disk, but that behavior was changed in commit 4dde24e, which (as far as I can tell) also broke the ability to queue a build with a file parameter and have that build successfully execute after a restart (since, even though the queue was saved correctly, theFileParameterValue
wouldn't have itsFileItem
after the restart, resulting in aNullPointerException
in theBuildWrapper
returned byFileParameterValue#createBuildWrapper
)—not that anyone seems to have missed this feature in the intervening decade. I tried various things in the UI but could not get aDiskFileItem
to be serialized no matter what I tried, so I am concluding that this isn't possible anymore after commit 4dde24e and thatQueueTest#fileItemPersistence
is a pointless test that can be deleted. I did at least manage to write a test for the scenario described in JENKINS-13536, something that was apparently attempted in commit 4dde24e, though not successfully.Testing done
mvn clean verify -Dtest=hudson.model.FileParameterValuePersistenceTest
Proposed changelog entries
N/A
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
Pinging @daniel-beck / @jglick for their encyclopedic knowledge of ancient Jenkins history to confirm that my above conclusions are correct
Before the changes are marked as
ready-for-merge
:Maintainer checklist