Fixing LANG-685 so that EqualsBuilder synchronizes on itself and not HashCodeBuilder
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1082042 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dd84146bd1
commit
edcfd40d71
|
@ -175,7 +175,7 @@ public class EqualsBuilder implements Builder<Boolean> {
|
|||
* @param rhs the other object to register
|
||||
*/
|
||||
static void register(Object lhs, Object rhs) {
|
||||
synchronized (HashCodeBuilder.class) {
|
||||
synchronized (EqualsBuilder.class) {
|
||||
if (getRegistry() == null) {
|
||||
REGISTRY.set(new HashSet<Pair<IDKey, IDKey>>());
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ public class EqualsBuilder implements Builder<Boolean> {
|
|||
if (registry != null) {
|
||||
Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs);
|
||||
registry.remove(pair);
|
||||
synchronized (HashCodeBuilder.class) {
|
||||
synchronized (EqualsBuilder.class) {
|
||||
//read again
|
||||
registry = getRegistry();
|
||||
if (registry != null && registry.isEmpty()) {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
<body>
|
||||
|
||||
<release version="3.0" date="Unreleased" description="Backwards incompatible update of Commons Lang to Java 5">
|
||||
<action type="fix" issue="LANG-685">EqualsBuilder synchronizes on HashCodeBuilder</action>
|
||||
<action type="fix" issue="LANG-428">StringUtils.isAlpha, isAlphanumeric and isNumeric now return false for ""</action>
|
||||
<action type="add" issue="LANG-678">Add support for ConcurrentMap.putIfAbsent()</action>
|
||||
<action type="add" issue="LANG-676">Documented potential NPE if auto-boxing occurs for some BooleanUtils methods</action>
|
||||
|
|
|
@ -157,6 +157,7 @@ BUG FIXES IN 3.0
|
|||
[LANG-664] NumberUtils.isNumber(String) is not right when the String is "1.1L"
|
||||
[LANG-672] Doc bug in DateUtils#ceiling
|
||||
[LANG-677] DateUtils.isSameLocalTime compares using 12 hour clock and not 24 hour
|
||||
[LANG-685] EqualsBuilder synchronizes on HashCodeBuilder.
|
||||
|
||||
</source>
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue