refactored
This commit is contained in:
parent
4cd59674ee
commit
ab5c803a68
@ -158,7 +158,7 @@ public class DeviceCredentialsServiceImpl extends AbstractEntityService implemen
|
|||||||
throw new DataValidationException("Invalid credentials body for LwM2M credentials!");
|
throw new DataValidationException("Invalid credentials body for LwM2M credentials!");
|
||||||
}
|
}
|
||||||
|
|
||||||
String credentialsId;
|
String credentialsId = null;
|
||||||
|
|
||||||
switch (clientCredentials.getSecurityConfigClientMode()) {
|
switch (clientCredentials.getSecurityConfigClientMode()) {
|
||||||
case NO_SEC:
|
case NO_SEC:
|
||||||
@ -181,8 +181,9 @@ public class DeviceCredentialsServiceImpl extends AbstractEntityService implemen
|
|||||||
credentialsId = x509Config.getEndpoint();
|
credentialsId = x509Config.getEndpoint();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
}
|
||||||
throw new DataValidationException("Invalid credentials body for LwM2M credentials!");
|
if (credentialsId == null) {
|
||||||
|
throw new DataValidationException("Invalid credentials body for LwM2M credentials!");
|
||||||
}
|
}
|
||||||
deviceCredentials.setCredentialsId(credentialsId);
|
deviceCredentials.setCredentialsId(credentialsId);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user