avoid replacing _ in device types

app-mgt-restructure
Amalka Subasinghe 2 years ago
parent 3c6685f468
commit 3b7544770d

@ -826,8 +826,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
deviceConfig.setClientId(dcrResponse.getClientId());
deviceConfig.setClientSecret(dcrResponse.getClientSecret());
StringBuilder scopes = new StringBuilder("device_" + type.replace(" ", "")
.replace("_", "") + "_" + id);
StringBuilder scopes = new StringBuilder("device_" + type.replace(" ", "") + "_" + id);
for (String topic : mqttEventTopicStructure) {
if (topic.contains("${deviceId}")) {
topic = topic.replace("${deviceId}", id);

Loading…
Cancel
Save