Avoid negation in an assertTrue or assertFalse test. For example, rephrase: assertTrue(!expr); as: assertFalse(expr);public class SimpleTest extends TestCase { public void testX() { assertTrue("not empty", !r.isEmpty()); // replace with assertFalse("not empty", r.isEmpty()) assertFalse(!r.isEmpty()); // replace with assertTrue(r.isEmpty()) } }Additional info can be found at this http://pmd.sourceforge.net/rules/junit.html#SimplifyBooleanAssertion site.
| 12 | org.jcoderz.commons.connector.UserPasswordTest |
| [81:7], [82:7], [83:7], [87:7], [88:7], [89:7], [93:7], [94:7], [95:7], [99:7], [100:7], [101:7] | |