Skip to content

Commit 3a9c58a

Browse files
committed
follow gemini's suggestion
1 parent a6729ac commit 3a9c58a

File tree

1 file changed

+1
-5
lines changed
  • eternalcode-commons-shared/src/main/java/com/eternalcode/commons/progressbar

1 file changed

+1
-5
lines changed

eternalcode-commons-shared/src/main/java/com/eternalcode/commons/progressbar/ProgressBar.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ public String render(double progress) {
4545
}
4646

4747
public String render(int current, int max) {
48-
if (max <= 0) {
49-
return this.render(1.0);
50-
}
51-
double progress = (double) current / max;
52-
return this.render(progress);
48+
return this.render(current, (long) max);
5349
}
5450

5551
public String render(long current, long max) {

0 commit comments

Comments
 (0)