mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-21 16:49:43 +01:00
Repleced testEquality() with StringUtils.equalsIgnoreCase().
Former-commit-id: 559413b9fef79fddbb85bcebda3ed0ca76c908dd
This commit is contained in:
@@ -206,21 +206,10 @@ public class Evidence implements Serializable, Comparable<Evidence> {
|
|||||||
}
|
}
|
||||||
final Evidence e = (Evidence) that;
|
final Evidence e = (Evidence) that;
|
||||||
|
|
||||||
return testEquality(name, e.name) && testEquality(source, e.source) && testEquality(value, e.value)
|
return StringUtils.equalsIgnoreCase(name, e.name) && StringUtils.equalsIgnoreCase(source, e.source) && StringUtils.equalsIgnoreCase(value, e.value)
|
||||||
&& (confidence == null ? e.confidence == null : confidence == e.confidence);
|
&& (confidence == null ? e.confidence == null : confidence == e.confidence);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Simple equality test for use within the equals method. This does a case insensitive compare.
|
|
||||||
*
|
|
||||||
* @param l a string to compare.
|
|
||||||
* @param r another string to compare.
|
|
||||||
* @return whether the two strings are the same.
|
|
||||||
*/
|
|
||||||
private boolean testEquality(String l, String r) {
|
|
||||||
return l == null ? r == null : l.equalsIgnoreCase(r);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the comparable interface.
|
* Implementation of the comparable interface.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user