prevent duplicate messages
This commit is contained in:
parent
bf31a252e3
commit
c67842e015
|
|
@ -62,7 +62,9 @@ public class LocalizedMessages
|
|||
**/
|
||||
public void add(LocalizedMessage aMsg)
|
||||
{
|
||||
mMessages.add(aMsg);
|
||||
if (!mMessages.contains(aMsg)) {
|
||||
mMessages.add(aMsg);
|
||||
}
|
||||
}
|
||||
|
||||
/** @return the number of messages */
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ public class SimplifyBooleanExpressionCheckTest
|
|||
"42:36: Expression can be simplified.",
|
||||
"43:16: Expression can be simplified.",
|
||||
"43:32: Expression can be simplified.",
|
||||
// TODO: Change Check.log to avoid duplicate messages
|
||||
"43:32: Expression can be simplified.",
|
||||
};
|
||||
verify(checkConfig, getPath("InputSimplifyBoolean.java"), expected);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue