Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmajchrak committed Sep 26, 2023
1 parent f07ccc7 commit 54528e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,10 @@ public List<ClarinUserMetadata> processSignedInUser(Context context, EPerson cur
currentUser.getID() + " is null.");
}

// Copy current user_metadata records into a list and append it by a new ones.
// Copy current user_metadata records into a list and append it by a new user metadata.
List<ClarinUserMetadata> newClarinUserMetadataList = new ArrayList<>(clarinUserRegistration.getUserMetadata());

// Create user metadata records from request
for (ClarinUserMetadataRest clarinUserMetadataRest : clarinUserMetadataRestList) {
ClarinUserMetadata clarinUserMetadata = this.clarinUserMetadataService.create(context);
clarinUserMetadata.setMetadataKey(clarinUserMetadataRest.getMetadataKey());
Expand Down Expand Up @@ -263,7 +264,6 @@ private ClarinLicenseResourceUserAllowance createClrua(Context context,
clrua.setCreatedOn(Calendar.getInstance().getTime());
// Generate token to download the bitstream. The token is sent by the response or by the e-mail.
clrua.setToken(downloadToken);

if (Objects.nonNull(clarinUserRegistration)) {
clrua.setUserRegistration(clarinUserRegistration);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public void importTwoTimesUserMetadataWithEpersonTest() throws Exception {
.andExpect(status().isOk());

List<ClarinUserMetadata> allUserMetadata = clarinUserMetadataService.findAll(context);
// UserMetadata should be created a not updated
// UserMetadata should be created and not updated
assertEquals(2, allUserMetadata.size());

// get first created data and check it
Expand Down

0 comments on commit 54528e8

Please sign in to comment.