Skip to content

Conversation

@CodexRaunak
Copy link
Contributor

Issue #792
Part-2 for #808

  • Migrate LoadUserByUsername to LoadUserByUsername2
  • Change Return type from GrantedAuthority[] to Collection<GrantedAuthority> of getAuthorities()
  • GrantedAuthority[0] to List.of() in ternary expression.

Testing done

Added unit test and declarative test.

Submitter checklist

  • 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

@CodexRaunak
Copy link
Contributor Author

CodexRaunak commented Mar 1, 2025

The PR got delayed, as I was getting less time to contribute due to my university exams.

image
The bit bucket auth plugin is still failing, we need one last migration to update the method body by calling the super(List.of()) as there is no parameter less constructor of AbstractAuthenticationToken.

I tried to modify the body using java templates https://docs.openrewrite.org/authoring-recipes/modifying-methods-with-javatemplate#build-the-template-for-the-setcustomerinfo-method-body, but the super call is getting added twice, and the recipe is taking 2 cycles.

Even if I remove all the migrations and then change the method body, still takes 2 cycles, maybe the docs is not updated of open rewrite. I opened an issue openrewrite/rewrite#5109

Is there any other way or we can improve it later on?

@jonesbusy
Copy link
Collaborator

The PR got delayed, as I was getting less time to contribute due to my university exams.

No worries

Even if I remove all the migrations and then change the method body, still takes 2 cycles, maybe the docs is not updated of open rewrite. I opened an issue openrewrite/rewrite#5109

One of the best way to get the issue fixed is to implement a minimal test on OpenRewrite that demonstrate the issue. Did it several times and help maintainer a lot

Is there any other way or we can improve it later on?

Of course, when time permits

@jonesbusy jonesbusy merged commit bb76958 into jenkins-infra:main Mar 1, 2025
17 checks passed
@jonesbusy jonesbusy added the enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted label Mar 1, 2025
@CodexRaunak
Copy link
Contributor Author

CodexRaunak commented Mar 1, 2025

One of the best way to get the issue fixed is to implement a minimal test on OpenRewrite that demonstrate the issue. Did it several times and help maintainer a lot

Thanks !

@CodexRaunak CodexRaunak deleted the Update-Recipe/Migrate-Acegi-Security-to-Spring-Security branch March 1, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants