diff options
Diffstat (limited to 'src/cuchaz/enigma/convert/MatchesReader.java')
| -rw-r--r-- | src/cuchaz/enigma/convert/MatchesReader.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/cuchaz/enigma/convert/MatchesReader.java b/src/cuchaz/enigma/convert/MatchesReader.java index 1dd042d..921ab1d 100644 --- a/src/cuchaz/enigma/convert/MatchesReader.java +++ b/src/cuchaz/enigma/convert/MatchesReader.java | |||
| @@ -58,15 +58,19 @@ public class MatchesReader { | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | private static void readFieldMatch(FieldMatches matches, String line) { | 60 | private static void readFieldMatch(FieldMatches matches, String line) { |
| 61 | String[] parts = line.split(":", 2); | 61 | if (line.startsWith("!")) { |
| 62 | FieldEntry source = readField(parts[0]); | 62 | matches.addUnmatchableSourceField(readField(line.substring(1))); |
| 63 | FieldEntry dest = readField(parts[1]); | 63 | } else { |
| 64 | if (source != null && dest != null) { | 64 | String[] parts = line.split(":", 2); |
| 65 | matches.addMatch(source, dest); | 65 | FieldEntry source = readField(parts[0]); |
| 66 | } else if (source != null) { | 66 | FieldEntry dest = readField(parts[1]); |
| 67 | matches.addUnmatchedSourceField(source); | 67 | if (source != null && dest != null) { |
| 68 | } else if (dest != null) { | 68 | matches.addMatch(source, dest); |
| 69 | matches.addUnmatchedDestField(dest); | 69 | } else if (source != null) { |
| 70 | matches.addUnmatchedSourceField(source); | ||
| 71 | } else if (dest != null) { | ||
| 72 | matches.addUnmatchedDestField(dest); | ||
| 73 | } | ||
| 70 | } | 74 | } |
| 71 | } | 75 | } |
| 72 | 76 | ||