Fix formatting of backend version

This commit is contained in:
Paul Schaub 2025-04-08 17:06:34 +02:00
parent 975116c4a5
commit ea8b1b6459
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -7,6 +7,8 @@ import org.jetbrains.annotations.Nullable;
import sop.exception.SOPGPException;
import sop.operation.Version;
import java.util.Locale;
public class BCVersion
extends AbstractBCOperation
implements Version {
@ -18,7 +20,10 @@ public class BCVersion
@NotNull
@Override
public String getBackendVersion() {
return "Bouncy Castle " + new BouncyCastleProvider().getVersionStr();
return "Bouncy Castle " +
String.format(Locale.US, "%.2f", Double.parseDouble(
new BouncyCastleProvider().getVersionStr()
));
}
@NotNull