-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change JKey
methods to throw InvalidKeyException
and add equals
and hashCode
#7143
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jsync-swirlds
force-pushed
the
07133-D-remove-decoder-exception-jkey
branch
2 times, most recently
from
June 15, 2023 22:15
873d9f3
to
65bae61
Compare
This was
linked to
issues
Jun 15, 2023
jsync-swirlds
force-pushed
the
07133-D-remove-decoder-exception-jkey
branch
from
June 15, 2023 22:18
65bae61
to
9706289
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #7143 +/- ##
==============================================
+ Coverage 68.40% 90.30% +21.89%
+ Complexity 23951 18767 -5184
==============================================
Files 2205 1469 -736
Lines 142537 54674 -87863
Branches 8364 5670 -2694
==============================================
- Hits 97506 49372 -48134
+ Misses 43322 4144 -39178
+ Partials 1709 1158 -551
☔ View full report in Codecov by Sentry. |
...e/hedera-app/src/main/java/com/hedera/node/app/workflows/handle/AdaptedMonoProcessLogic.java
Show resolved
Hide resolved
...pl/src/main/java/com/hedera/node/app/service/file/impl/codec/FileServiceStateTranslator.java
Show resolved
Hide resolved
...pl/src/main/java/com/hedera/node/app/service/file/impl/codec/FileServiceStateTranslator.java
Show resolved
Hide resolved
hedera-node/hedera-mono-service/src/main/java/com/hedera/node/app/service/mono/Utils.java
Show resolved
Hide resolved
hedera-node/hedera-mono-service/src/main/java/com/hedera/node/app/service/mono/Utils.java
Show resolved
Hide resolved
...era-mono-service/src/main/java/com/hedera/node/app/service/mono/legacy/core/jproto/JKey.java
Show resolved
Hide resolved
...ode/hedera-mono-service/src/main/java/com/hedera/node/app/service/mono/pbj/PbjConverter.java
Show resolved
Hide resolved
* Removed `DecoderException` from JKey and all other code that uses `JKey` * Almost all of the uses are in test code, surprisingly little non-test code uses JKey * Removed all other uses of `DecoderException` from the codebase * One remaining use is in platform-sdk in `CommonUtils` line 232. * A call to apache commons `Hex.decodeHex` is wrapped in a try/catch that catches the `DecoderException` Issue 7137 `JKey` has no `equals` or `hashCode` implementation * Added `equals` and `hashCode` to `JKey`. * Note that this implementation is not efficient, but is a good bridge to the PBJ Key object that replaces JKey soon. Signed-off-by: Joseph Sinclair <joseph.sinclair@swirldslabs.com>
jsync-swirlds
force-pushed
the
07133-D-remove-decoder-exception-jkey
branch
from
June 16, 2023 16:55
9706289
to
b06c62e
Compare
SonarCloud Quality Gate failed. |
hendrikebbers
approved these changes
Jun 16, 2023
mhess-swl
approved these changes
Jun 16, 2023
imalygin
pushed a commit
that referenced
this pull request
Jun 20, 2023
… and `hashCode` (#7143) Signed-off-by: Joseph Sinclair <joseph.sinclair@swirldslabs.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #7133
DecoderException
from JKey and all other code that usesJKey
DecoderException
from the codebaseIssue #7137
equals
andhashCode
toJKey
. * Note that this implementation is not efficient, but is a good bridge to the PBJ Key object that replaces JKey soon.CommonUtils
line 232.Hex.decodeHex
is wrapped in a try/catch that catches theDecoderException