Commit ba7543d30edbc0a38d6db74e745404bb472c2d48
Committed by
GitHub
Merge pull request #4347 from thingsboard/lwm2m_fix_bug_double_string
lwm2m: back fix bug format name
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -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); |