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

Windows compilation fails due to `dangling-doc-comments` warning

Open
#20,719 5 comments 0 reactions 1 assignee Claimed by @rbair23 View on GitHub
Good First Issue
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

## 🆕🐥 First Timers Only

This issue is reserved for people who have never contributed to [Hiero](https://hiero.org) or any open source project in general.
We know that creating a pull request (PR) is a major barrier for new contributors.
The goal of this issue and all other issues labeled by [**'good first issue'**](https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Ahiero-ledger+archived%3Afalse+label%3A%22good+first+issue%22+) is to help you make your first contribution to Hiero.

## 👾 Description of the issue
There are errors when compiling using Java 23 and higher.

Compiling from commandline with `./gradlew clean assemble` has the `-Werror` flag set which turns all warnings into errors.

The `dangling-doc-comment` warning triggers on the following classes when compiling:
* FCQueue.java
* VirtualRootNode.java
* ConsensusImpl.java
* EnhancedKeyStoreLoader.java
* Utilities.java
* KeyComparatorTest.java
* StandardScratchPad.java
* WritableFreezeStore.java
* BlockRecordWriterV6.java
* OutputNoEventsLostValidation.java
* BlockRecordWriterV6.java
* StateBuilder.java
* CryptocurrencyDemoState.java
* TransactionSubmitter.java
* AtomicTokenCreateSpecs.java
* SStoreSuite.java
* PayloadDistribution.java
* StatsDemoMain.java
* EnhancedKeyStoreLoaderTest.java
*
## 💡 Solution

Fix the dangling comments so that they are no longer viewed as javadoc comments. This issue is fixed when the compilation command no longer displays errors.

### 👩‍💻 Implementation

Modify the dangling javadoc comments to be regular code comments.

Example:
- change `///` to `//`.
- change `/**` to `/*`

## 📋 Step by step guide to do a contribution

If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow.
More information and concrete samples for shell commands for each step can be found in our [CONTRIBUTING.md](https://github.com/hiero-ledger/.github/blob/main/CONTRIBUTING.md) file.
A more detailed general documentation of the GitHub PR workflow can be found [here](https://github.com/firstcontributions/first-contributions/blob/master/README.md).

- [ ] **Claim this issue:** Comment below that you are interested in working on the issue
- [ ] **Wait for assignment:** A community member with the given rights will add you as an assignee of the issue
- [ ] **Work on the issue:** Follow the detailed description in our [CONTRIBUTING.md](https://github.com/hiero-ledger/.github/blob/main/CONTRIBUTING.md) file.
- [ ] **You did it 🎉:** We will merge the fix in the main branch. Thanks for being part of the Hiero community as an open-source contributor ❤️

## 🎉 Contribute to Hacktoberfest

At the time of the [Hacktoberfest](https://hacktoberfest.digitalocean.com) event we try to mark all PRs that solve any good first issue with the `hacktoberfest-accepted` label.
If you want to resolve this issue as part of Hacktoberfest and we missed adding the label, simply add a comment to the issue or PR, and we will add it.

## 🤔 Additional Information

If you have any questions about the topic of this issue, please ask us directly by adding a comment below.
Additionally, we invite you to join our community on our [Discord](https://discord.gg/kEnnmB9A) server or attend our [public community calls](https://zoom-lfx.platform.linuxfoundation.org/meetings/hiero?view=week).

A general manual about open-source contributions can be found [here](https://github.com/firstcontributions/first-contributions/blob/master/README.md).

Consider adding the `@SuppressWarnings("dangling-doc-comments")` annotation to these classes to allow compilation on windows with later versions of java.

See the attached patch, after which I am able to compile on Windows with GraalVM Java 23.0.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.