-
Notifications
You must be signed in to change notification settings - Fork 4
Fr] implement add and search methods for phone book interface #30 #56
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
base: main
Are you sure you want to change the base?
Fr] implement add and search methods for phone book interface #30 #56
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
| default void saveAll(List<ContactDto> contacts) throws IOException { | ||
| objectMapper.writeValue(new File("demo.st"), contacts); | ||
| } | ||
| ; |
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.
ℹ️ Codacy found a minor Code Style issue: ';' should be separated from previous line.
The issue identified by the Checkstyle linter is that there is an unnecessary semicolon (;) on its own line, which is not properly separated from the previous line. In Java, a semicolon is used to terminate statements, and having it on a separate line without any context is not a standard practice and can lead to confusion.
To fix this issue, simply remove the semicolon from its own line. Here’s the suggested change:
| ; | |
| } |
This comment was generated by an experimental AI tool.
dRaider-bitrek
left a comment
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.
Метод "add" зараз не зберігає новий контакт.
| List<ContactDto> contacts = findAll(); | ||
| contacts.add(contactDto); | ||
| saveAll(contacts); | ||
| } |
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.
тут треба перевірити ContactDto.id та створити новий унікальний якщо id = 0;
Тобто не зовсім тут, це інтерфейс.
| .fullName(contactDto.getFullName()) | ||
| .phones(List.of(String.valueOf(contactDto.getPhones()))) | ||
| .emails(List.of(String.valueOf(contactDto.getEmails()))) | ||
| .build(); |
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.
Не зовсім зрозумів що ти планував. Ти вже отримуєш ContactDto його треба зберегти до файлу за допомогою ContactDtoRepository
No description provided.