Skip to content

Commit

Permalink
Improve code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
janderson2 committed Feb 23, 2022
1 parent 3b8d0ad commit c473635
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
import static com.github.onsdigital.zebedee.configuration.Configuration.getSlackToken;
import static com.github.onsdigital.zebedee.configuration.Configuration.isVerificationEnabled;
import static com.github.onsdigital.zebedee.configuration.Configuration.slackChannelsToNotfiyOnStartUp;
import static com.github.onsdigital.zebedee.permissions.store.PermissionsStoreFileSystemImpl.initialisePermissions;
import static com.github.onsdigital.zebedee.permissions.store.PermissionsStoreFileSystemImpl.initialiseAccessMapping;
import static org.apache.commons.lang3.StringUtils.isEmpty;

/**
Expand Down Expand Up @@ -312,7 +312,7 @@ private void initTeamsService(Path zebedeePath,
*/
private void initPermissionsService(Path zebedeePath, TeamsService teamsService) throws IOException {
Path permissionsPath = createDir(zebedeePath, PERMISSIONS);
initialisePermissions(permissionsPath);
initialiseAccessMapping(permissionsPath);

PermissionsStore permissionsStore = new PermissionsStoreFileSystemImpl(permissionsPath);
PermissionsServiceImpl legacyPermissionsService = new PermissionsServiceImpl(permissionsStore, this::getTeamsService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class PermissionsStoreFileSystemImpl implements PermissionsStore {
* @param accessMappingPath the path of the accessMapping json file.
* @throws IOException error while initializing.
*/
public static void initialisePermissions(Path accessMappingPath) throws IOException {
public static void initialiseAccessMapping(Path accessMappingPath) throws IOException {
Path jsonPath = accessMappingPath.resolve(PERMISSIONS_FILE);

if (!Files.exists(jsonPath)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void tearDown() throws Exception {

@Test
public void constructor_ShouldCreateAccessMappingIfDoesNotExist() throws Exception {
PermissionsStoreFileSystemImpl.initialisePermissions(permissionsDir);
PermissionsStoreFileSystemImpl.initialiseAccessMapping(permissionsDir);
PermissionsStore store = new PermissionsStoreFileSystemImpl(permissionsDir);

assertThat(Files.exists(accessMappingPath.toPath()), is(true));
Expand Down

0 comments on commit c473635

Please sign in to comment.