Repository navigation
Выполнить задание 7 спринта: добавить новый менеджер FileBackedTaskManager - #4
Merged
Merged
Conversation
milayadasha
commented
Oct 22, 2025
Owner
- Добавить новый менеджер задач FileBackedTaskManager
- Добавить новый пакет для исключений - exceptions (+ класс в нём)
- Изменить модификаторы доступа у поле с задачами в InMemoryTaskManager + добавить новый метод установки значения счётчика
- Добавить метод по созданию нового менеджера в Managers
- Добавить новый enum TaskType для типа задач
- Сделать новые тесты под изменения
maks-avilow
suggested changes
Oct 22, 2025
maks-avilow
left a comment
There was a problem hiding this comment.
Привет! Хорошая работа! предлагаю доработать и исправить 1 замечание
| protected final HashMap<Integer, Subtask> subtasks = new HashMap<>(); | ||
| private final HistoryManager historyManager = Managers.getDefaultHistory(); | ||
|
|
||
| protected static void setIdCount(int idCount) { |
There was a problem hiding this comment.
нужно сделать setIdCount public static, либо
перенести логику синхронизации idCount внутрь FileBackedTaskManager, либо
Использовать нестатический способ инициализации счётчика (например, передавать в конструктор)
Owner
Author
There was a problem hiding this comment.
Спасибо. Добавила изменения в новом коммите (забыла исправить комментарий в нём на новый, поэтому пишу здесь):
- Само поле счётчика сделала не статическим и protected
- Убрала сеттер
- Внутри loadFromFile записываю просто максимальный айди в это поле
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.