diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/WAContact.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/WAContact.java index 2c6efaacac..9e8ac86dee 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/WAContact.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/WAContact.java @@ -25,13 +25,12 @@ public class WAContact { private boolean deleted = false; public WAContact(String id) { - if (id != null && id.contains("@")) { //$NON-NLS-1$ - String[] id_split = id.split("@"); //$NON-NLS-1$ - this.id = id_split[0]; - this.suffix = id_split[1]; + if (id != null) { + String[] idSplit = id.split("@", 2); + this.id = idSplit[0]; + this.suffix = idSplit.length > 1 ? idSplit[1] : ""; } else { - this.id = id; - this.suffix = ""; //$NON-NLS-1$ + this.id = this.suffix = ""; } }