Code style improvements
This commit is contained in:
parent
5599ab5650
commit
e18d834461
@ -154,17 +154,19 @@ public class DefaultDataUpdateService implements DataUpdateService {
|
|||||||
for (AlarmSeverity severity : AlarmSeverity.values()) {
|
for (AlarmSeverity severity : AlarmSeverity.values()) {
|
||||||
if (createRules.has(severity.name())) {
|
if (createRules.has(severity.name())) {
|
||||||
JsonNode spec = createRules.get(severity.name()).get("condition").get("spec");
|
JsonNode spec = createRules.get(severity.name()).get("condition").get("spec");
|
||||||
if (convertDeviceProfileAlarmRulesForVersion330(spec))
|
if (convertDeviceProfileAlarmRulesForVersion330(spec)) {
|
||||||
isUpdated = true;
|
isUpdated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (alarm.has("clearRule") && !alarm.get("clearRule").isNull()) {
|
if (alarm.has("clearRule") && !alarm.get("clearRule").isNull()) {
|
||||||
JsonNode spec = alarm.get("clearRule").get("condition").get("spec");
|
JsonNode spec = alarm.get("clearRule").get("condition").get("spec");
|
||||||
if (convertDeviceProfileAlarmRulesForVersion330(spec))
|
if (convertDeviceProfileAlarmRulesForVersion330(spec)) {
|
||||||
isUpdated = true;
|
isUpdated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (isUpdated) {
|
if (isUpdated) {
|
||||||
deviceProfileRepository.save(deviceProfile);
|
deviceProfileRepository.save(deviceProfile);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user