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

Fix test errors because of change in security classes on new Jenkins core versions #137

Merged
merged 3 commits into from
Jul 7, 2021

Conversation

MRamonLeon
Copy link
Contributor

Some acegisecurity classes were still over there. Those fixes were not complete: #124

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@MRamonLeon MRamonLeon closed this Jul 6, 2021
@MRamonLeon MRamonLeon reopened this Jul 6, 2021
@@ -134,8 +134,10 @@ public Config newConfig(@NonNull String id, String name, String comment, String

private void setField(String fieldName, String value, Config config) {
Field field = ReflectionUtils.findField(config.getClass(), fieldName);
field.setAccessible(true);
ReflectionUtils.setField(field, config, value);
if (field != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the field is null won't this cause failures later on?
presumably this was trying to set the field to actually accomplish something so failing silently would seem bad.

Copy link
Contributor Author

@MRamonLeon MRamonLeon Jul 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fields set are only name, comment, content which are in the base Config class. So there is no way to not find them. This change is to make spotbugs happy

@MRamonLeon MRamonLeon merged commit 5fcd5b5 into jenkinsci:master Jul 7, 2021
@MRamonLeon MRamonLeon deleted the fix-test-selectors-new-core branch July 7, 2021 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants