Skip to content

Commit 32b70f4

Browse files
committed
style-fix, comment improvement and codacy suggestion
Signed-off-by: Alfredo Gutierrez Grajeda <alfredo@hashgraph.com>
1 parent 36b0351 commit 32b70f4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

block-node/backfill/src/main/java/org/hiero/block/node/backfill/client/BlockNodeClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
public class BlockNodeClient {
1616
// Options definition for all gRPC services in the block node client
1717
private record Options(Optional<String> authority, String contentType) implements ServiceInterface.RequestOptions {}
18+
1819
private static final BlockNodeClient.Options OPTIONS =
1920
new BlockNodeClient.Options(Optional.empty(), ServiceInterface.RequestOptions.APPLICATION_GRPC);
2021

block-node/backfill/src/main/java/org/hiero/block/node/backfill/client/BlockStreamSubscribeUnparsedClient.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,8 @@ public void onSubscribe(Flow.Subscription subscription) {
129129
* If the last item is a block proof, it finalizes the current block,
130130
* adds it to the reply list,
131131
* and resets the current block items and number for the next block.
132-
* If the response contains a status code,
133-
* it sets the error reference if the code indicates an error.
134-
* If the response does not contain block items or a status code,
135-
* it sets an error indicating an unexpected response.
132+
* If the response contains a status code, different from SUCCESS,
133+
* it sets the error reference accordingly.
136134
* @param subscribeStreamResponse the response to process
137135
*/
138136
@Override
@@ -213,7 +211,7 @@ public void onComplete() {
213211

214212
private static Codec<SubscribeStreamRequest> getSubscribeStreamRequestCodec(
215213
@NonNull final ServiceInterface.RequestOptions options) {
216-
Objects.requireNonNull(options);
214+
requireNonNull(options);
217215

218216
// Default to protobuf, and don't error out if both are set:
219217
if (options.isJson() && !options.isProtobuf()) {

0 commit comments

Comments
 (0)