Skip to content

Commit 593eccf

Browse files
committed
Cache groupingSeparator
1 parent 5e09e76 commit 593eccf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/cleanroommc/modularui/widgets/textfield/IntegerFieldRenderer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
@ApiStatus.Experimental
1111
class IntegerFieldRenderer extends TextFieldRenderer {
1212
private static final DecimalFormat INTEGER_FIELD_FORMAT = new DecimalFormat("#");
13+
private static final char groupingSeparator = INTEGER_FIELD_FORMAT.getDecimalFormatSymbols().getGroupingSeparator();
1314

1415
static {
1516
INTEGER_FIELD_FORMAT.setGroupingUsed(true);
@@ -36,7 +37,7 @@ public void draw(List<String> lines) {
3637

3738
@Override
3839
protected boolean isIgnoredChar(char c) {
39-
return c == INTEGER_FIELD_FORMAT.getDecimalFormatSymbols().getGroupingSeparator();
40+
return c == groupingSeparator;
4041
}
4142

4243

0 commit comments

Comments
 (0)