| 1 | package com.rox.debug.labels; | |
| 2 | ||
| 3 | import java.io.IOException; | |
| 4 | import java.nio.file.Path; | |
| 5 | import java.util.List; | |
| 6 | ||
| 7 | /** A {@link LabelStore} backed by a {@link LabelFile} - e.g. {@code SavePaths.labelsFile(romPath)}. */ | |
| 8 | public final class FileLabelStore implements LabelStore { | |
| 9 | private final Path path; | |
| 10 | ||
| 11 | public FileLabelStore(final Path path){ | |
| 12 | this.path = path; | |
| 13 | } | |
| 14 | ||
| 15 | @Override | |
| 16 | public List<MemoryLabel> load() throws IOException, LabelFileException { | |
| 17 |
1
1. load : replaced return value with Collections.emptyList for com/rox/debug/labels/FileLabelStore::load → KILLED |
return LabelFile.read(path); |
| 18 | } | |
| 19 | ||
| 20 | @Override | |
| 21 | public void save(final List<MemoryLabel> labels) throws IOException { | |
| 22 |
1
1. save : removed call to com/rox/debug/labels/LabelFile::write → KILLED |
LabelFile.write(path, labels); |
| 23 | } | |
| 24 | } | |
Mutations | ||
| 17 |
1.1 |
|
| 22 |
1.1 |