diff --git a/README.md b/README.md
index 964e492d..d6aa072b 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ The classes in the`.jar`file are version 52 (`JDK 1.8`).
To include in your project:
##### GradleF
```
-implementation 'com.cedarsoftware:java-util:2.4.7'
+implementation 'com.cedarsoftware:java-util:2.4.8'
```
##### Maven
@@ -23,7 +23,7 @@ implementation 'com.cedarsoftware:java-util:2.4.7'
com.cedarsoftware
java-util
- 2.4.7
+ 2.4.8
```
---
diff --git a/changelog.md b/changelog.md
index 76b33e15..73ae2317 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,6 +1,8 @@
### Revision History
-* 2.4.8-SNAPSHOT
- * Using json-io 4.14.2 for cloning object in "test" scope, eliminates cycle depedencies
+* 2.4.8
+ * Performance improvement: `DeepEquals.deepHashCode()` - now using `IdentityHashMap()` for cycle (visited) detection.
+ * Modernization: `UniqueIdGenerator` - updated to use `Lock.lock()` and `Lock.unlock()` instead of `synchronized` keyword.
+ * Using json-io 4.14.1 for cloning object in "test" scope, eliminates cycle depedencies when building both json-io and java-util.
* 2.4.7
* All 687 conversions supported are now 100% cross-product tested. Converter test suite is complete.
* 2.4.6
diff --git a/pom.xml b/pom.xml
index 42f82d25..954b6ff6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.cedarsoftware
java-util
jar
- 2.4.8-SNAPSHOT
+ 2.4.8
Java Utilities
https://github.com/jdereg/java-util
@@ -33,7 +33,7 @@
5.10.2
5.10.2
3.25.3
- 4.14.2
+ 4.14.1
4.11.0
1.21.1
diff --git a/src/main/java/com/cedarsoftware/util/CaseInsensitiveMap.java b/src/main/java/com/cedarsoftware/util/CaseInsensitiveMap.java
index d92ce82c..26336dcb 100644
--- a/src/main/java/com/cedarsoftware/util/CaseInsensitiveMap.java
+++ b/src/main/java/com/cedarsoftware/util/CaseInsensitiveMap.java
@@ -623,12 +623,12 @@ public boolean equals(Object other)
{
return true;
}
- else if (other instanceof CaseInsensitiveString)
+ if (other instanceof CaseInsensitiveString)
{
return hash == ((CaseInsensitiveString)other).hash &&
original.equalsIgnoreCase(((CaseInsensitiveString)other).original);
}
- else if (other instanceof String)
+ if (other instanceof String)
{
return original.equalsIgnoreCase((String)other);
}
@@ -642,15 +642,13 @@ public int compareTo(Object o)
CaseInsensitiveString other = (CaseInsensitiveString) o;
return original.compareToIgnoreCase(other.original);
}
- else if (o instanceof String)
+ if (o instanceof String)
{
String other = (String)o;
return original.compareToIgnoreCase(other);
}
- else
- { // Strings are less than non-Strings (come before)
- return -1;
- }
+ // Strings are less than non-Strings (come before)
+ return -1;
}
}
}
diff --git a/src/main/java/com/cedarsoftware/util/CaseInsensitiveSet.java b/src/main/java/com/cedarsoftware/util/CaseInsensitiveSet.java
index b07f08bc..28540a3e 100644
--- a/src/main/java/com/cedarsoftware/util/CaseInsensitiveSet.java
+++ b/src/main/java/com/cedarsoftware/util/CaseInsensitiveSet.java
@@ -44,11 +44,11 @@ public CaseInsensitiveSet(Collection extends E> collection)
{
if (collection instanceof ConcurrentSkipListSet)
{
- map = new CaseInsensitiveMap<>(new ConcurrentSkipListMap());
+ map = new CaseInsensitiveMap<>(new ConcurrentSkipListMap<>());
}
else if (collection instanceof SortedSet)
{
- map = new CaseInsensitiveMap<>(new TreeMap());
+ map = new CaseInsensitiveMap<>(new TreeMap<>());
}
else
{
diff --git a/src/main/java/com/cedarsoftware/util/DeepEquals.java b/src/main/java/com/cedarsoftware/util/DeepEquals.java
index 17c84aa4..1685e34e 100644
--- a/src/main/java/com/cedarsoftware/util/DeepEquals.java
+++ b/src/main/java/com/cedarsoftware/util/DeepEquals.java
@@ -10,6 +10,7 @@
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -736,22 +737,22 @@ public static boolean hasCustomEquals(Class> c)
* @return the 'deep' hashCode value for the passed in object.
*/
public static int deepHashCode(Object obj) {
- Set