kopia lustrzana https://github.com/bertrik/ttnhabbridge
Always pass a locale to String.format()
rodzic
f8cc50d5aa
commit
96062144e7
|
@ -76,7 +76,7 @@ public final class Sentence {
|
|||
// append header, checksum, etc
|
||||
final byte[] bytes = basic.getBytes(StandardCharsets.US_ASCII);
|
||||
final int crcValue = crc16.calculate(bytes, 0xFFFF);
|
||||
final String formatted = String.format("$$%s*%04X\n", basic, crcValue);
|
||||
final String formatted = String.format(Locale.US, "$$%s*%04X\n", basic, crcValue);
|
||||
return formatted;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package nl.sikken.bertrik.hab.habitat;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +50,7 @@ public final class UploadResult {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("ok=%s,id=%s,rev=%s", ok, id, rev);
|
||||
return String.format(Locale.US, "ok=%s,id=%s,rev=%s", ok, id, rev);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue