pmd:ConsecutiveAppendsShouldReuse - Consecutive Appends Should Reuse

This commit is contained in:
Mohammed Ezzat committed 2016-01-26 19:58:45 +02:00
1 parent 1a55f3a420
commit d00bfae5ee
3 files changed
+22 -26

No files matched your search

@@ -63,12 +63,12 @@ public class CustomerTest {
@Test
public void testToString() {
final StringBuffer buffer = new StringBuffer();
buffer.append("Customer{id=");
buffer.append("" + customer.getId());
buffer.append(", firstName='");
buffer.append(customer.getFirstName());
buffer.append("\', lastName='");
buffer.append(customer.getLastName() + "\'}");
buffer.append("Customer{id=")
.append("" + customer.getId())
.append(", firstName='")
.append(customer.getFirstName())
.append("\', lastName='")
.append(customer.getLastName() + "\'}");
assertEquals(buffer.toString(), customer.toString());
}
}