Fixed ReportMessage equals() which broke repetition checking

This commit is contained in:
Vhati 2013-08-26 18:41:02 -04:00
parent c9b5c38368
commit 2405b73a28
2 changed files with 2 additions and 2 deletions

View file

@ -396,7 +396,7 @@ public class ModUtilities {
List<ReportMessage> condensedList = new ArrayList<ReportMessage>(); List<ReportMessage> condensedList = new ArrayList<ReportMessage>();
ReportMessage prevMessage = null; ReportMessage prevMessage = null;
for ( ReportMessage message : xmlReport.messages ) { for ( ReportMessage message : xmlReport.messages ) {
if ( !message.equals(prevMessage) ) { if ( !message.equals( prevMessage ) ) {
condensedList.add( message ); condensedList.add( message );
prevMessage = message; prevMessage = message;
} }

View file

@ -212,7 +212,7 @@ public class Report {
if ( o instanceof ReportMessage == false ) return false; if ( o instanceof ReportMessage == false ) return false;
ReportMessage other = (ReportMessage)o; ReportMessage other = (ReportMessage)o;
if ( this.type != other.type ) return false; if ( this.type != other.type ) return false;
if ( this.text.equals(other.text) ) return false; if ( !this.text.equals(other.text) ) return false;
if ( this.nestedMessages == null ) { if ( this.nestedMessages == null ) {
if ( other.nestedMessages != null ) if ( other.nestedMessages != null )