Author: bayard
Date: Wed Mar 16 03:53:22 2011
New Revision: 1082042
URL: http://svn.apache.org/viewvc?rev=1082042&view=rev
Log:
Fixing LANG-685 so that EqualsBuilder synchronizes on itself and not
HashCodeBuilder
Modified:
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
commons/proper/lang/trunk/src/site/changes/changes.xml
commons/proper/lang/trunk/src/site/xdoc/upgradeto3_0.xml
Modified:
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
URL:
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java?rev=1082042&r1=1082041&r2=1082042&view=diff
==============================================================================
---
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
(original)
+++
commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java
Wed Mar 16 03:53:22 2011
@@ -175,7 +175,7 @@ public class EqualsBuilder implements Bu
* @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 Bu
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()) {
Modified: commons/proper/lang/trunk/src/site/changes/changes.xml
URL:
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/site/changes/changes.xml?rev=1082042&r1=1082041&r2=1082042&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/site/changes/changes.xml (original)
+++ commons/proper/lang/trunk/src/site/changes/changes.xml Wed Mar 16 03:53:22
2011
@@ -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>
Modified: commons/proper/lang/trunk/src/site/xdoc/upgradeto3_0.xml
URL:
http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/site/xdoc/upgradeto3_0.xml?rev=1082042&r1=1082041&r2=1082042&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/site/xdoc/upgradeto3_0.xml (original)
+++ commons/proper/lang/trunk/src/site/xdoc/upgradeto3_0.xml Wed Mar 16
03:53:22 2011
@@ -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>