diff --git a/src/main/java/io/github/dsheirer/module/log/DecodeEventLogger.java b/src/main/java/io/github/dsheirer/module/log/DecodeEventLogger.java index dedf58226..dbfbeebd6 100644 --- a/src/main/java/io/github/dsheirer/module/log/DecodeEventLogger.java +++ b/src/main/java/io/github/dsheirer/module/log/DecodeEventLogger.java @@ -100,19 +100,19 @@ private String toCSV(IDecodeEvent event) cells.add(event.getProtocol()); cells.add(event.getEventType()); - List fromIdentifiers = event.getIdentifierCollection().getIdentifiers(Role.FROM); - if(fromIdentifiers != null && !fromIdentifiers.isEmpty()) + Identifier fromIdentifier = event.getIdentifierCollection().getFromIdentifier(); + if(fromIdentifier != null) { - cells.add(fromIdentifiers.get(0)); + cells.add(fromIdentifier); } else { cells.add(""); } - List toIdentifiers = event.getIdentifierCollection().getIdentifiers(Role.TO); + Identifier toIdentifier = event.getIdentifierCollection().getToIdentifier(); - if(toIdentifiers != null && !toIdentifiers.isEmpty()) + if(toIdentifier != null) { Identifier identifier = event.getIdentifierCollection() .getIdentifier(IdentifierClass.CONFIGURATION,Form.ALIAS_LIST,Role.ANY); @@ -120,9 +120,9 @@ private String toCSV(IDecodeEvent event) if(mAliasList != null) { - String mystring = (!mAliasList.getAliases(toIdentifiers.get(0)).isEmpty()) ? - mAliasList.getAliases(toIdentifiers.get(0)).get(0).toString() : ""; - cells.add(mystring + " (" + toIdentifiers.get(0) + ")"); + String mystring = (!mAliasList.getAliases(toIdentifier).isEmpty()) ? + mAliasList.getAliases(toIdentifier).toString() : ""; + cells.add(mystring + " (" + toIdentifier + ")"); } else {