hiero-ledger / hiero-ledger/hiero-consensus-node
Clean up misc platform methods in testing apps
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
As a part of the simplification of `Platform.java`, I removed many methods from the public interface that were only being used by test and demo code. In order to keep that PR small, I made all of the tests/demos cast the `platform` into a `SwirldsPlatform` instance before getting at these methods which I made no longer public.
This is ugly.
For each of these deprecated formally-public methods, we need to find more permanent solutions. This will involve API design work, and we will have to solve each on a case-by-case basis.
Searching for the string `((SwirldsPlatform) platform)` should turn up all of the cases where this type of hacky casting was performed.
A solid 90% of these hacks will simply vanish when PTT goes away.
Contributor guide
Research direction
Search the repository for `((SwirldsPlatform) platform)` and review the affected tests and demos alongside `Platform.java`. For each deprecated formally-public method, determine a case-by-case API solution; completion means the hacky casts have been removed where permanent alternatives are agreed, while accounting for code that will disappear with PTT.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- developer-experience, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100