check for errors
This commit is contained in:
parent
ba11705db0
commit
dc4ec93dc5
|
@ -98,9 +98,12 @@ public class DbcFile {
|
|||
}
|
||||
|
||||
private void purgePacket(DbcPacket currentPacket) {
|
||||
if (currentPacket != null)
|
||||
if (currentPacket != null) {
|
||||
if (packets.containsKey(currentPacket.getId()))
|
||||
throw new IllegalStateException("We already have " + packets.get(currentPacket.getId()).getName() + " for " + currentPacket.getId());
|
||||
packets.put(currentPacket.getId(), currentPacket);
|
||||
}
|
||||
}
|
||||
|
||||
public static String replaceSpecialWithSpaces(String line) {
|
||||
line = line.replaceAll("[|+@(,)\\[\\]]", " ");
|
||||
|
|
Loading…
Reference in New Issue