Open
Conversation
* src/manager/InMemoryHistoryManager.java
+ Реализован двусвязный список + HashMap<id,Node>
+ add(task) теперь удаляет дубликаты через removeNode за O(1)
+ remove(id) — новый метод HistoryManager
* src/manager/TaskManager.java
+ в интерфейс добавлен void remove(int id)
* src/manager/InMemoryTaskManager.java
+ вызовы historyManager.remove(...) в removeTask / removeEpic / removeSubtask
* src/manager/HistoryManager.java
+ объявлен метод remove(int id)
* tests
+ HistoryManagerTest — проверяет отсутствие дублей и порядок
+ InMemoryTaskManagerTest — проверка очистки истории при удалении,
истории > 10, дубль-просмотров
+ TaskManagerHistoryIntegrationTest — интеграция: удаление эпика убирает
эпик и все Subtask'и из истории
Issue: sprint-6 / ТЗ «неограниченная история без дублей»
LexLippi
suggested changes
Aug 6, 2025
LexLippi
left a comment
There was a problem hiding this comment.
Привет!
Хорошая работа!
Есть несколько мелких замечаний, которые необходимо исправить!
Желаю удачи!
| Node oldTail = tail; | ||
| Node n = new Node(oldTail, task, null); | ||
| tail = n; | ||
| if (oldTail == null) head = n; else oldTail.next = n; |
There was a problem hiding this comment.
Лучше в соответветствии с Google Java Code Style всегда использовать фигурные скобки, даже когда они опциональны:
https://google.github.io/styleguide/javaguide.html#s4.1.1-braces-always-used
| /* ───── вспомогательные ───── */ | ||
| private void linkLast(Task task) { | ||
| Node oldTail = tail; | ||
| Node n = new Node(oldTail, task, null); |
There was a problem hiding this comment.
Лучше не использовать однобуквенные названия переменных, хотя в таком простом коде это можно оставить
| tail = n; | ||
| if (oldTail == null) head = n; else oldTail.next = n; | ||
| } | ||
| private void removeNode(Node n) { |
There was a problem hiding this comment.
Замечания аналогичные предыдущему методу
| } | ||
| private List<Task> getTasks() { | ||
| List<Task> list = new ArrayList<>(); | ||
| for (Node n = head; n != null; n = n.next) list.add(n.data); |
added 4 commits
August 7, 2025 06:20
LexLippi
approved these changes
Aug 7, 2025
LexLippi
left a comment
There was a problem hiding this comment.
Привет!
Отличная работа!
Желаю удачи в следующих спринтах!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src/manager/InMemoryHistoryManager.java
src/manager/TaskManager.java
src/manager/InMemoryTaskManager.java
src/manager/HistoryManager.java
tests
Issue: sprint-6 / ТЗ «неограниченная история без дублей»