simplify_if (#543)

This commit is contained in:
XenoAmess 2020-06-13 23:17:52 +08:00 committed by GitHub
parent a9be3ec55b
commit fb2d228380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -439,7 +439,7 @@ public abstract class ToStringStyle implements Serializable {
protected void removeLastFieldSeparator(final StringBuffer buffer) {
final int len = buffer.length();
final int sepLen = fieldSeparator.length();
if (len > 0 && sepLen > 0 && len >= sepLen) {
if (sepLen > 0 && len >= sepLen) {
boolean match = true;
for (int i = 0; i < sepLen; i++) {
if (buffer.charAt(len - 1 - i) != fieldSeparator.charAt(sepLen - 1 - i)) {

View File

@ -76,7 +76,7 @@ public class StringUtilsEqualsIndexOfTest {
@Override
public boolean equals(final Object obj) {
if (obj == null || !(obj instanceof CustomCharSequence)) {
if (!(obj instanceof CustomCharSequence)) {
return false;
}
final CustomCharSequence other = (CustomCharSequence) obj;