Use not String.contains instead of indexOf == -1

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1671666 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2015-04-06 19:37:04 +00:00
parent 2fefdc7dc3
commit f525bc3ccd
3 changed files with 3 additions and 3 deletions

View File

@ -323,7 +323,7 @@ public class CompareToBuilder implements Builder<Integer> {
for (int i = 0; i < fields.length && builder.comparison == 0; i++) {
final Field f = fields[i];
if (!ArrayUtils.contains(excludeFields, f.getName())
&& (f.getName().indexOf('$') == -1)
&& (!f.getName().contains("$"))
&& (useTransients || !Modifier.isTransient(f.getModifiers()))
&& (!Modifier.isStatic(f.getModifiers()))) {
try {

View File

@ -409,7 +409,7 @@ public class EqualsBuilder implements Builder<Boolean> {
for (int i = 0; i < fields.length && builder.isEquals; i++) {
final Field f = fields[i];
if (!ArrayUtils.contains(excludeFields, f.getName())
&& (f.getName().indexOf('$') == -1)
&& (!f.getName().contains("$"))
&& (useTransients || !Modifier.isTransient(f.getModifiers()))
&& (!Modifier.isStatic(f.getModifiers()))) {
try {

View File

@ -190,7 +190,7 @@ public class HashCodeBuilder implements Builder<Integer> {
AccessibleObject.setAccessible(fields, true);
for (final Field field : fields) {
if (!ArrayUtils.contains(excludeFields, field.getName())
&& (field.getName().indexOf('$') == -1)
&& (!field.getName().contains("$"))
&& (useTransients || !Modifier.isTransient(field.getModifiers()))
&& (!Modifier.isStatic(field.getModifiers()))) {
try {