Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use proxy.getSecretPassword(), not deprecated proxy.getPassword() #1072

Conversation

MarkEWaite
Copy link
Contributor

Use proxy.getSecretPassword(), not deprecated proxy.getPassword()

Thanks to @StefanSpieker for the pointer to the deprecated core API usage report where it shows that proxy.getPassword() is the only deprecated core API used in the git client plugin. Easy to fix.

Not tested by automation. Adding useful proxy configuration tests is beyond the scope of this pull request.

Tested interactively by temporarily adding a logging statement to report the value of userInfo after the assignment. I defined a proxy in the "Advanced settings" of the plugin manager page, then attempted to clone a git repository over https. The logging statement displayed the expected value in the userInfo string. I removed the temporary logging statement.

Checklist

  • I have read the CONTRIBUTING doc
  • I have referenced the Jira issue related to my changes in one or more commit messages
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes
  • I have interactively tested my changes

Types of changes

  • Maintenance improvement (replace deprecated API use with non-deprecated API)

Thanks to @StefanSpieker for the pointer to
https://ci.jenkins.io/job/Reporting/job/deprecated-usage-in-plugins/
where it shows that proxy.getPassword() is the only deprecated core API
used in the git client plugin.  Easy to fix.

Not tested by automation.

Tested interactively by temporarily adding a logging statement to report
the value of userInfo after the assignment.  I defined a proxy in the
"Advanced settings" of the plugin manager page, then attempted to clone a
git repository over https.  The logging statement displayed the expected
value in the userInfo string.  I removed the temporary logging statement.
@MarkEWaite MarkEWaite requested a review from a team as a code owner November 5, 2023 15:05
@MarkEWaite MarkEWaite added the chore Reduces maintenance effort by changes not directly visible to users label Nov 5, 2023
@MarkEWaite MarkEWaite merged commit 2d05154 into jenkinsci:master Nov 5, 2023
15 checks passed
@MarkEWaite MarkEWaite deleted the replace-getPassword-with-getSecretPassword branch November 5, 2023 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Reduces maintenance effort by changes not directly visible to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant