Fixing code formatting issues.

revert-dabc3590
Menaka Jayawardena 7 years ago
parent 4e8090ae5c
commit 18f08b6ac8

@ -35,7 +35,6 @@ public class ArduinoPermissionUpdateListener implements ServletContextListener {
@Override @Override
public void contextInitialized(ServletContextEvent servletContextEvent) { public void contextInitialized(ServletContextEvent servletContextEvent) {
UserStoreManager userStoreManager = getUserStoreManager(); UserStoreManager userStoreManager = getUserStoreManager();
try { try {
if (userStoreManager != null) { if (userStoreManager != null) {
@ -47,7 +46,8 @@ public class ArduinoPermissionUpdateListener implements ServletContextListener {
getAuthorizationManager().authorizeRole(ArduinoConstants.ROLE_NAME, getAuthorizationManager().authorizeRole(ArduinoConstants.ROLE_NAME,
ArduinoConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants.UI_PERMISSION_ACTION); ArduinoConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants.UI_PERMISSION_ACTION);
} }
} } catch (UserStoreException e) { }
} catch (UserStoreException e) {
log.error("Error while creating a role and adding a user for Arduino.", e); log.error("Error while creating a role and adding a user for Arduino.", e);
} }
} }
@ -101,7 +101,6 @@ public class ArduinoPermissionUpdateListener implements ServletContextListener {
} }
private Permission[] getPermissions() { private Permission[] getPermissions() {
Permission androidSense = new Permission(ArduinoConstants.PERM_ENROLL_ARDUINO, Permission androidSense = new Permission(ArduinoConstants.PERM_ENROLL_ARDUINO,
CarbonConstants.UI_PERMISSION_ACTION); CarbonConstants.UI_PERMISSION_ACTION);
Permission view = new Permission(ArduinoConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants Permission view = new Permission(ArduinoConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants

@ -35,7 +35,6 @@ public class RaspberryPIPermissionUpdateListener implements ServletContextListen
@Override @Override
public void contextInitialized(ServletContextEvent servletContextEvent) { public void contextInitialized(ServletContextEvent servletContextEvent) {
UserStoreManager userStoreManager = getUserStoreManager(); UserStoreManager userStoreManager = getUserStoreManager();
try { try {
if (userStoreManager != null) { if (userStoreManager != null) {
@ -47,7 +46,8 @@ public class RaspberryPIPermissionUpdateListener implements ServletContextListen
getAuthorizationManager().authorizeRole(RaspberrypiConstants.ROLE_NAME, getAuthorizationManager().authorizeRole(RaspberrypiConstants.ROLE_NAME,
RaspberrypiConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants.UI_PERMISSION_ACTION); RaspberrypiConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants.UI_PERMISSION_ACTION);
} }
} } catch (UserStoreException e) { }
} catch (UserStoreException e) {
log.error("Error while creating a role and adding a user for Raspberry PI.", e); log.error("Error while creating a role and adding a user for Raspberry PI.", e);
} }
} }
@ -101,12 +101,10 @@ public class RaspberryPIPermissionUpdateListener implements ServletContextListen
} }
private Permission[] getPermissions() { private Permission[] getPermissions() {
Permission androidSense = new Permission(RaspberrypiConstants.PERM_ENROLL_RASPBERRYPI, Permission androidSense = new Permission(RaspberrypiConstants.PERM_ENROLL_RASPBERRYPI,
CarbonConstants.UI_PERMISSION_ACTION); CarbonConstants.UI_PERMISSION_ACTION);
Permission view = new Permission(RaspberrypiConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants Permission view = new Permission(RaspberrypiConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants
.UI_PERMISSION_ACTION); .UI_PERMISSION_ACTION);
return new Permission[]{androidSense, view}; return new Permission[]{androidSense, view};
} }

@ -35,7 +35,6 @@ public class VirtualFireAlarmPermissionUpdateListener implements ServletContextL
@Override @Override
public void contextInitialized(ServletContextEvent servletContextEvent) { public void contextInitialized(ServletContextEvent servletContextEvent) {
UserStoreManager userStoreManager = getUserStoreManager(); UserStoreManager userStoreManager = getUserStoreManager();
try { try {
if (userStoreManager != null) { if (userStoreManager != null) {
@ -47,7 +46,8 @@ public class VirtualFireAlarmPermissionUpdateListener implements ServletContextL
getAuthorizationManager().authorizeRole(VirtualFireAlarmConstants.ROLE_NAME, getAuthorizationManager().authorizeRole(VirtualFireAlarmConstants.ROLE_NAME,
VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants.UI_PERMISSION_ACTION); VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants.UI_PERMISSION_ACTION);
} }
} } catch (UserStoreException e) { }
} catch (UserStoreException e) {
log.error("Error while creating a role and adding a user for Raspberry PI.", e); log.error("Error while creating a role and adding a user for Raspberry PI.", e);
} }
} }
@ -101,12 +101,10 @@ public class VirtualFireAlarmPermissionUpdateListener implements ServletContextL
} }
private Permission[] getPermissions() { private Permission[] getPermissions() {
Permission androidSense = new Permission(VirtualFireAlarmConstants.PERM_ENROLL_FIRE_ALARM, Permission androidSense = new Permission(VirtualFireAlarmConstants.PERM_ENROLL_FIRE_ALARM,
CarbonConstants.UI_PERMISSION_ACTION); CarbonConstants.UI_PERMISSION_ACTION);
Permission view = new Permission(VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants Permission view = new Permission(VirtualFireAlarmConstants.PERM_OWNING_DEVICE_VIEW, CarbonConstants
.UI_PERMISSION_ACTION); .UI_PERMISSION_ACTION);
return new Permission[]{androidSense, view}; return new Permission[]{androidSense, view};
} }

Loading…
Cancel
Save