hiero-ledger / hiero-ledger/hiero-consensus-node

`HashingOutputStream` should extend `FilterOutputStream`

Open
#7,513 0 comments 0 reactions 0 assignees View on GitHub
Good First Issue Candidate Platform
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

### Problem

The `HashingOutputStream` does not properly handle `close` or `flush`. The JDK's `FilterOutputStream` is designed for subclasses that wrap another stream, and ensures that `close` and `flush` both propagate to the wrapped stream. Since the `HashingOutputStream` doesn't do this, clients that use it must explicitly close both the `HashingOutputStream` and the stream it wraps, which can be error prone and lead to more code.

### Solution

Let `HashingOutputStream` wrap `FilterOutputStream`.

### Alternatives

_No response_

Contributor guide

Open the contributing guide

Research direction

Locate the HashingOutputStream implementation and inspect how it wraps its underlying stream. Compare its close and flush behavior with Java's FilterOutputStream, then verify that both operations propagate to the wrapped stream after the change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.