Skip to content

Commit 9099daa

Browse files
Fix edge case where ecid may start with 0x (#511)
Fixed edge case where ecid may start with 0x when saving blobs to TSS Saver. java.lang.NumberFormatException: For input string: "0x162431234501E" under radix 16 at java.base/java.lang.NumberFormatException.forInputString(Unknown Source) at java.base/java.lang.Long.parseLong(Unknown Source) at [email protected]/airsquared.blobsaver.app.TSS.saveBlobsTSSSaver(Unknown Source) at [email protected]/airsquared.blobsaver.app.TSS.call(Unknown Source) ... Co-authored-by: airsquared <[email protected]>
1 parent 9075120 commit 9099daa

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/airsquared/blobsaver/app

1 file changed

+1
-1
lines changed

src/main/java/airsquared/blobsaver/app/TSS.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ public void showErrorAlert() {
391391
private void saveBlobsTSSSaver(StringBuilder responseBuilder) {
392392
Map<Object, Object> deviceParameters = new HashMap<>();
393393

394-
deviceParameters.put("ecid", String.valueOf(Long.parseLong(ecid, 16)));
394+
deviceParameters.put("ecid", String.valueOf(Long.parseLong(ecid.startsWith("0x") ? ecid.substring(2) : ecid, 16)));
395395
deviceParameters.put("deviceIdentifier", deviceIdentifier);
396396
deviceParameters.put("boardConfig", getBoardConfig());
397397

0 commit comments

Comments
 (0)