feat(exit): throw TronError if JDK does not support#6455
Merged
kuny0707 merged 1 commit intotronprotocol:release_v4.8.1from Sep 24, 2025
Merged
feat(exit): throw TronError if JDK does not support#6455kuny0707 merged 1 commit intotronprotocol:release_v4.8.1from
kuny0707 merged 1 commit intotronprotocol:release_v4.8.1from
Conversation
317787106
approved these changes
Sep 23, 2025
| AnsiConsole.systemUninstall(); | ||
| throw new TronError(e, TronError.ErrCode.JDK_VERSION); | ||
| } | ||
| clearParam(); // reset all parameters to avoid the influence in test |
There was a problem hiding this comment.
The method name throwIfUnsupportedJavaVersion can be modified as checkJdkCompatible ?
What's the output of three lines related with AnsiConsole ?
Contributor
Author
There was a problem hiding this comment.
There was a problem hiding this comment.
If you want to show this infomation in console, this AnsiConsole should be placed in ExitManager, so all TronError has the same action.
Contributor
Author
There was a problem hiding this comment.
To avoid confusion caused by silent execution when using -h or -v flags, errors are explicitly logged to the console in this context. Console output is not required for errors in other scenarios.
| "1.8 ", getOsArch(), javaSpecificationVersion())); | ||
| "Java %s is required for %s architecture. Detected version %s", "1.8", | ||
| getOsArch(), javaSpecificationVersion())); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
I believe either style is fine.
d79e879 to
b582eea
Compare
bladehan1
approved these changes
Sep 23, 2025
0xbigapple
approved these changes
Sep 23, 2025
lvs0075
approved these changes
Sep 23, 2025
lxcmyf
approved these changes
Sep 23, 2025
b582eea to
f1d1b4a
Compare
kuny0707
approved these changes
Sep 24, 2025
17 tasks
17 tasks
warku123
pushed a commit
to warku123/java-tron
that referenced
this pull request
Feb 6, 2026
This file contains hidden or 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
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.
What does this PR do?
Replace the UnsupportedOperationException with TronError if the JDK does not support.
Why are these changes required?
This PR has been tested by:
Follow up
Extra details