hashgraph / hedera-services

Crypto, token, consensus, file, and smart contract services for the Hedera public ledger
Apache License 2.0
265 stars 119 forks source link

Remove Apache Commons dependency from Services #6649

Open jasperpotts opened 1 year ago

jasperpotts commented 1 year ago

Problem

We should not be importing all of Apache Commons just for a few classes we are using.

Solution

Mostly we seem to use Pair and Triple classes, I have filed a platform issue to add them to platform https://github.com/hashgraph/hedera-services/issues/6648

Almost all other cases are random Exceptions which we can use standard Java ones or create our own.

The few other one off cases we should replace with our own versions or simple standard Java code. My preference is to use standard java code and core libraries where ever possible. Other places we add our own util classes.

david-bakin-sl commented 1 year ago

We do use things like {Equals,HashCode,ToString}Builder. Oh wait - I see that's covered in #6648.