Minor refactoring related to wso2/product-iots#1035

4.x.x
Harshan Liyanage 7 years ago
parent a3aa259437
commit 5906546dfb

@ -167,9 +167,8 @@ public class UserManagementServiceImpl implements UserManagementService {
}
userInfoWrapper.setBasicUserInfo(createdUserInfo);
userInfoWrapper.setMessage(message);
return Response.created(new URI(API_BASE_PATH + "/" + URIEncoder.encode(userInfo.getUsername(), "UTF-8")))
.entity(
userInfoWrapper).build();
return Response.created(new URI(API_BASE_PATH + "/" + URIEncoder.encode(userInfo.getUsername(),
"UTF-8"))).entity(userInfoWrapper).build();
} catch (UserStoreException e) {
String msg = "Error occurred while trying to add user '" + userInfo.getUsername() + "' to the " +
"underlying user management system";
@ -189,8 +188,7 @@ public class UserManagementServiceImpl implements UserManagementService {
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
} catch (DeviceManagementException e) {
String msg = "Error occurred while sending registration email to the user " +
userInfo.getUsername();
String msg = "Error occurred while sending registration email to the user " + userInfo.getUsername();
log.error(msg, e);
return Response.serverError().entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();

@ -62,8 +62,8 @@ public class EmailSenderServiceImpl implements EmailSenderService {
}
private boolean isMailServerConfigured() {
if(EmailSenderDataHolder.getInstance().getConfigurationContextService()
.getServerConfigContext().getAxisConfiguration().getTransportOut(TRANSPORT_SENDER_NAME) != null) {
if(EmailSenderDataHolder.getInstance().getConfigurationContextService().getServerConfigContext().
getAxisConfiguration().getTransportOut(TRANSPORT_SENDER_NAME) != null) {
return true;
} else {
return false;
@ -141,7 +141,5 @@ public class EmailSenderServiceImpl implements EmailSenderService {
"'", e);
}
}
}
}
Loading…
Cancel
Save