Skip to content

4.96.0

Choose a tag to compare

@jdereg jdereg released this 01 Mar 14:16
· 66 commits to master since this release

Bug Fix

  • ClassUtilities.trySetAccessible() no longer caches successful setAccessible(true) results. The WeakHashMap-based cache uses equals() for lookup, but Field.equals() matches by declaring class, name, and type — not identity. When getDeclaredFields() was called with different predicates, the JVM returned different Field instances for the same logical field; the cache returned TRUE for the second instance without ever calling setAccessible(true) on it, leaving it inaccessible. This caused Traverser to silently skip inaccessible fields, breaking GraphComparator.applyDelta(). Only failures (FALSE) are now cached to avoid expensive repeated exceptions on JPMS-sealed modules.

Install

Maven

<dependency>
  <groupId>com.cedarsoftware</groupId>
  <artifactId>java-util</artifactId>
  <version>4.96.0</version>
</dependency>

Gradle

implementation 'com.cedarsoftware:java-util:4.96.0'