hedera-sdk-java icon indicating copy to clipboard operation
hedera-sdk-java copied to clipboard

refactor: Extract fromConfig() logic from Client

Open steffenboe opened this issue 1 year ago • 0 comments

Description: The Client-Class gained some considerable size over time. I refactored the Client-Class a bit to make the Client.fromConfig()-construction logic more clear and to shrink the Client Class, by extracting the logic to the inner Config class.

Downside: Client and Config now have a bidirectional relationship, making this a little harder to understand. But the Config class is private to the Client class, so this added complexity does not leak outside.

Looking forward to your opinions regarding this refactorings.

This PR modifies ... in order to support ...

  • extract Client.fromConfig-Construction logic to Config class
  • extracted more methods to make the code more readable

Related issue(s):

Fixes #

Notes for reviewer:

Checklist

  • [ ] Documented (Code comments, README, etc.)
  • [x] Tested (unit, integration, etc.)

steffenboe avatar Oct 13 '24 08:10 steffenboe