alfasoftware / astra

Astra: a Java tool for analysing and refactoring Java source code
Apache License 2.0
68 stars 35 forks source link

Reduce cognitive complexity of AstraUtils#getFullyQualifiedName #88 #93

Closed kapilgahlot1998 closed 2 years ago

kapilgahlot1998 commented 2 years ago

What I have updated in the PR

  1. Refactored the code by creating a different method named as #mapOnDemandMatches.
  2. Updated the native for-loops with the lambda expression and stream API.
  3. Added the comment with the issue No for future reference.

Mandatory Check I have done before creating PR

  1. No compilation issue
  2. No sonar issue in the code added by me
  3. Full maven build is successful
  4. No test cases failure

Let me know if any changes required in the code.

kapilgahlot1998 commented 2 years ago

@RadikalJin - can you please review once

RadikalJin commented 2 years ago

Great stuff! I've made a couple of formatting/naming tweaks for consistency with the rest of the repository, such as removing the comment with the issue reference, but otherwise this is looking good to go.

Thank you for your contribution to Astra, @kapilgahlot1998! Merging now.

kapilgahlot1998 commented 2 years ago

Thanks for giving me the opportunity to contribute.