Conversation
| } | ||
| public void setAllFiles(Map<String, ArrayList<Integer>> allFiles) { | ||
| this.allFiles = allFiles; | ||
| } |
There was a problem hiding this comment.
зачем тут геттеры-сеттеры, если они не используются) надеюсь, в следующих частях класс приведен в порядок
There was a problem hiding this comment.
Это чтобы сериализовывалось.
There was a problem hiding this comment.
понял, в таких случаях лучше коммент в коде оставлять
хотя еще лучше все-таки использовать их, а сами поля закрыть
| private final String infoFileName = ".myGitData"; | ||
| private final String storageFolder = ".mygitdata"; | ||
|
|
||
| void findRepInformation() throws JsonParseException, JsonMappingException, IOException, UnversionedException { |
There was a problem hiding this comment.
кишки торчать наружу не должны, тестам следует смотреть на файлы на диске, т.к. это то, с чем работает пользователь
| } | ||
| } | ||
|
|
||
| void increaseRevisionNumber() { |
There was a problem hiding this comment.
private, можно заинлайнить, т.к. всего одно использование и метод однострочный
| //System.out.println("trying write file to " + storage); | ||
| Files.copy(Paths.get("").resolve(filename), getStoragePath(filename, revision)); | ||
| ArrayList<Integer> revisions = inform.allFiles.get(getPathRealRelative(filename).toString()); | ||
| if (revisions == null) { |
There was a problem hiding this comment.
см computeIfAbsent (идея подсвечивает, эклипс молчит?)
| } | ||
| return "revision: " + revision + "\n" | ||
| + inform.commitMessages.get(revision - 1) + "\n" | ||
| + inform.timestamps.get(revision - 1); |
There was a problem hiding this comment.
лог должен выводить список ревизий с указанной
No description provided.