1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-29 16:23:55 +00:00

Fix toString() method for non-US JVM

This commit is contained in:
Arnaud Roques 2021-10-19 20:21:37 +02:00
parent 742542290a
commit ae4d0b65a2

View File

@ -1,14 +1,15 @@
package net.sourceforge.plantuml.graphic.color; package net.sourceforge.plantuml.graphic.color;
import java.awt.Color; import java.awt.Color;
import java.util.Locale;
/** /**
* {@link Color} with hue, saturation and brightness. * {@link Color} with hue, saturation and brightness.
*/ */
public class ColorHSB extends Color { public class ColorHSB extends Color {
final float hue; private final float hue;
final float saturation; private final float saturation;
final float brightness; private final float brightness;
public ColorHSB(int rgba) { public ColorHSB(int rgba) {
super(rgba, true); super(rgba, true);
@ -36,7 +37,7 @@ public class ColorHSB extends Color {
@Override @Override
public String toString() { public String toString() {
return String.format("%s[a=%02X r=%02X g=%02X b=%02X / h=%f s=%f b=%f]", return String.format(Locale.US, "%s[a=%02X r=%02X g=%02X b=%02X / h=%f s=%f b=%f]",
getClass().getSimpleName(), getAlpha(), getRed(), getGreen(), getBlue(), getHue(), getSaturation(), getBrightness() getClass().getSimpleName(), getAlpha(), getRed(), getGreen(), getBlue(), getHue(), getSaturation(), getBrightness()
); );
} }