-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javadoc and ca #39
Javadoc and ca #39
Conversation
…allhub-backend into javadoc-and-CA
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Coding style is great, easy to understand
- Manually tested, seems like it still works as before! Tests are working well.
- Test coverage is very good! I added some comments for lines the tests didn't cover, not sure if coverage there is possible.
- Clean architecture looks good!
- Javadoc looks good as well, present for public methods
LGTM, very nice :)
try { | ||
return Optional.of(documentRepository.save(file)); | ||
} catch (Exception e) { | ||
return Optional.empty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, why return an empty Optional here instead of an exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its handled later i think an if checks for an empty
private void setFileData() { | ||
try { | ||
this.data = this.serializePDF(); | ||
this.fileData = new FileDocument(this.name, this.data, LocalDate.now()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to test these lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is tested in update pdf!
Optional<FileDocument> result = fileDataAccessObject.uploadFile(fileInputData.getFileData()); | ||
headers.setContentType(MediaType.TEXT_PLAIN); | ||
FileOutputData outputData = new FileOutputData(); | ||
if (result.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to test these lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry no, i don't think it is very easy to test this!
Description
CA fix to File endpoints with added Javadoc comments for most public methods
Please delete options that are not relevant.
How Has This Been Tested?
Through the frontend manually to ensure all enpoints act as before