Commit ba7543d30edbc0a38d6db74e745404bb472c2d48

Authored by nickAS21
Committed by GitHub
2 parents 1b381298 0c12f202

Merge pull request #4347 from thingsboard/lwm2m_fix_bug_double_string

lwm2m: back fix bug format name
@@ -713,7 +713,7 @@ public class LwM2mTransportServiceImpl implements LwM2mTransportService { @@ -713,7 +713,7 @@ public class LwM2mTransportServiceImpl implements LwM2mTransportService {
713 private void addParameters(String path, JsonObject parameters, Registration registration) { 713 private void addParameters(String path, JsonObject parameters, Registration registration) {
714 LwM2mClient lwM2MClient = lwM2mClientContext.getLwM2mClientWithReg(registration, null); 714 LwM2mClient lwM2MClient = lwM2mClientContext.getLwM2mClientWithReg(registration, null);
715 JsonObject names = lwM2mClientContext.getProfiles().get(lwM2MClient.getProfileId()).getPostKeyNameProfile(); 715 JsonObject names = lwM2mClientContext.getProfiles().get(lwM2MClient.getProfileId()).getPostKeyNameProfile();
716 - String resName = String.valueOf(names.get(path)); 716 + String resName = names.get(path).getAsString();
717 if (resName != null && !resName.isEmpty()) { 717 if (resName != null && !resName.isEmpty()) {
718 try { 718 try {
719 String resValue = this.getResourceValueToString(lwM2MClient, path); 719 String resValue = this.getResourceValueToString(lwM2MClient, path);