Skip to content

A few fixes and improvements#128

Open
vuxeim wants to merge 6 commits into
EternalCodeTeam:masterfrom
vuxeim:vux/fix
Open

A few fixes and improvements#128
vuxeim wants to merge 6 commits into
EternalCodeTeam:masterfrom
vuxeim:vux/fix

Conversation

@vuxeim

@vuxeim vuxeim commented Jun 28, 2026

Copy link
Copy Markdown

This PR:

Command /eco set <nick> 0

Previously that command was telling Only positive numbers allowed. Due to improper use of @Execute annotation expected syntax was /eco set 0 <nick>.

Decimal formatting

All real numbers X.YXX (where X is non zero value and Y is 0) were incorrectly formatted as X.XX.
Eg. 1025 -> 1.25k

Math improvements

See the comments.

@vuxeim vuxeim requested a review from a team as a code owner June 28, 2026 18:32

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces performance optimizations and formatting fixes to the decimal formatting utilities, as well as changes to the admin set command. The review feedback highlights three key issues: first, the zeroPad in DecimalFormatterImpl is calculated before rounding, which causes incorrect formatting for values that round up (e.g., 1.095 becoming 1.010 instead of 1.10); second, the optimized getLengthOfIntegralPart in DecimalFormatterUtil can trigger a StackOverflowError on Long.MIN_VALUE and suffers from precision loss with Math.log10 on large numbers; and third, the command constraints in AdminSetCommand prevent setting fractional balances between 0 and 1. Solutions are provided for each of these issues.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant