dependabot[bot] opened a new pull request, #19105:
URL: https://github.com/apache/camel/pull/19105

   Bumps [com.cedarsoftware:java-util](https://github.com/jdereg/java-util) 
from 4.0.0 to 4.1.0.
   <details>
   <summary>Changelog</summary>
   <p><em>Sourced from <a 
href="https://github.com/jdereg/java-util/blob/master/changelog.md";>com.cedarsoftware:java-util's
 changelog</a>.</em></p>
   <blockquote>
   <h4>4.1.0</h4>
   <blockquote>
   <ul>
   <li>
   <p><strong>FIXED</strong>: <code>ClassUtilities.setUseUnsafe()</code> is now 
thread-local instead of global, preventing race conditions in multi-threaded 
environments where concurrent threads need different unsafe mode settings</p>
   </li>
   <li>
   <p><strong>IMPROVED</strong>: <code>ClassUtilities</code> comprehensive 
improvements from GPT-5 review:</p>
   <p><strong>🔒 SECURITY FIXES:</strong></p>
   <ul>
   <li><strong>Enhanced class loading security with additional blocked 
prefixes</strong>: Added blocking for <code>jdk.nashorn.</code> package to 
prevent Nashorn JavaScript engine exploitation; added blocking for 
<code>java.lang.invoke.MethodHandles$Lookup</code> class which can open modules 
reflectively and bypass security boundaries</li>
   <li><strong>Added percent-encoded path traversal blocking</strong>: Enhanced 
resource path validation to block percent-encoded traversal sequences (%2e%2e, 
%2E%2E, etc.) before normalization; prevents bypass attempts using URL 
encoding</li>
   <li><strong>Enhanced resource path security</strong>: Added blocking of 
absolute Windows drive paths (e.g., &quot;C:/...&quot;, &quot;D:/...&quot;) in 
resource loading to prevent potential security issues</li>
   <li><strong>Enhanced security blocking</strong>: Added package-level 
blocking for <code>javax.script.*</code> to prevent loading of any class in 
that package</li>
   <li><strong>Added belt-and-suspenders alias security</strong>: 
addPermanentClassAlias() now validates classes through 
SecurityChecker.verifyClass() to prevent aliasing to blocked classes</li>
   <li><strong>Fixed security bypass in cache hits</strong>: Alias and cache 
hits now properly go through SecurityChecker.verifyClass() to prevent bypassing 
security checks</li>
   <li><strong>Updated Unsafe permission check</strong>: Replaced outdated 
&quot;accessClassInPackage.sun.misc&quot; permission with custom 
&quot;com.cedarsoftware.util.enableUnsafe&quot; permission appropriate for 
modern JDKs</li>
   <li><strong>Simplified resource path validation</strong>: Removed over-eager 
validation that blocked legitimate resources, focusing on actual security risks 
(.., null bytes, backslashes)</li>
   <li><strong>Improved validateResourcePath() precision</strong>: Made 
validation more precise - now only blocks null bytes, backslashes, and 
&quot;..&quot; path segments (not substrings), allowing legitimate filenames 
like &quot;my..proto&quot;</li>
   </ul>
   <p><strong>⚡ PERFORMANCE OPTIMIZATIONS:</strong></p>
   <ul>
   <li><strong>Optimized constructor matching performance</strong>: Eliminated 
redundant toArray() calls per constructor attempt by converting collection to 
array once</li>
   <li><strong>Optimized resource path validation</strong>: Replaced regex 
pattern matching with simple character checks, eliminating regex engine 
overhead</li>
   <li><strong>Optimized findClosest() performance</strong>: Pull distance map 
once from ClassHierarchyInfo to avoid repeated computeInheritanceDistance() 
calls</li>
   <li><strong>Optimized findLowestCommonSupertypesExcluding 
performance</strong>: Now iterates the smaller set when finding 
intersection</li>
   <li><strong>Optimized findInheritanceMatches hot path</strong>: Pre-cache 
ClassHierarchyInfo lookups for unique value classes</li>
   <li><strong>Optimized loadClass() string operations</strong>: Refactored JVM 
descriptor parsing to count brackets once upfront, reducing string churn</li>
   <li><strong>Optimized hot-path logging performance</strong>: Added 
isLoggable() guards to all varargs logging calls to prevent unnecessary array 
allocations</li>
   <li><strong>Optimized getParameters() calls</strong>: Cached 
constructor.getParameters() results to avoid repeated allocations</li>
   <li><strong>Optimized buffer creation</strong>: Cached zero-length 
ByteBuffer and CharBuffer instances to avoid repeated allocations</li>
   <li><strong>Optimized trySetAccessible caching</strong>: Fixed to actually 
use its accessibility cache, preventing repeated failed setAccessible() 
attempts</li>
   <li><strong>Added accessibility caching</strong>: Implemented caching for 
trySetAccessible using synchronized WeakHashMap for memory-safe caching</li>
   <li><strong>Prevented zombie cache entries</strong>: Implemented 
NamedWeakRef with ReferenceQueue to automatically clean up dead WeakReference 
entries</li>
   </ul>
   <p><strong>🐛 BUG FIXES:</strong></p>
   <ul>
   <li><strong>Fixed interface depth calculation</strong>: Changed 
ClassHierarchyInfo to use max BFS distance instead of superclass chain 
walking</li>
   <li><strong>Fixed tie-breaking for common supertypes</strong>: Changed 
findLowestCommonSupertypesExcluding to sort by sum of distances from both 
classes</li>
   <li><strong>Fixed JPMS SecurityException handling</strong>: Added proper 
exception handling for trySetAccessible calls under JPMS</li>
   <li><strong>Fixed nameToClass initialization inconsistency</strong>: Added 
&quot;void&quot; type to static initializer and included common aliases in 
clearCaches()</li>
   <li><strong>Fixed tie-breaker logic</strong>: Corrected 
shouldPreferNewCandidate() to properly prefer more specific types</li>
   <li><strong>Fixed areAllConstructorsPrivate() for implicit 
constructors</strong>: Method now correctly returns false for classes with no 
declared constructors</li>
   <li><strong>Fixed mutable buffer sharing</strong>: ByteBuffer, CharBuffer, 
and array default instances are now created fresh on each call</li>
   <li><strong>Fixed inner class construction</strong>: Inner class 
constructors with additional parameters beyond enclosing instance are now 
properly matched</li>
   <li><strong>Fixed varargs ArrayStoreException vulnerability</strong>: Added 
proper guards when packing values into varargs arrays</li>
   <li><strong>Fixed named-parameter gating</strong>: Constructor parameter 
name detection now checks ALL parameters have real names</li>
   <li><strong>Fixed Currency default creation</strong>: 
Currency.getInstance(Locale.getDefault()) now gracefully falls back to USD</li>
   <li><strong>Fixed generated-key Map ordering</strong>: Fixed bug where Maps 
with generated keys could inject nulls when keys had gaps</li>
   <li><strong>Fixed loadResourceAsBytes() leading slash handling</strong>: 
Added fallback to strip leading slash when ClassLoader.getResourceAsStream() 
fails</li>
   <li><strong>Fixed OSGi class loading consistency</strong>: OSGi framework 
classes now loaded using consistent classloader</li>
   <li><strong>Fixed ClassLoader key mismatch</strong>: Consistently resolve 
null ClassLoader to same instance</li>
   <li><strong>Fixed computeIfAbsent synchronization</strong>: Replaced 
non-synchronized computeIfAbsent with properly synchronized 
getLoaderCache()</li>
   <li><strong>Fixed off-by-one in class load depth</strong>: Now validates 
nextDepth instead of currentDepth</li>
   <li><strong>Fixed OSGi/JPMS classloader resolution</strong>: Simplified 
loadClass() to consistently use getClassLoader() method</li>
   <li><strong>Fixed permanent alias preservation</strong>: Split aliases into 
built-in and user maps so clearCaches() preserves user-added permanent 
aliases</li>
   </ul>
   </li>
   </ul>
   </blockquote>
   <!-- raw HTML omitted -->
   </blockquote>
   <p>... (truncated)</p>
   </details>
   <details>
   <summary>Commits</summary>
   <ul>
   <li>See full diff in <a 
href="https://github.com/jdereg/java-util/commits";>compare view</a></li>
   </ul>
   </details>
   <br />
   
   
   [![Dependabot compatibility 
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.cedarsoftware:java-util&package-manager=maven&previous-version=4.0.0&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
   
   Dependabot will resolve any conflicts with this PR as long as you don't 
alter it yourself. You can also trigger a rebase manually by commenting 
`@dependabot rebase`.
   
   [//]: # (dependabot-automerge-start)
   [//]: # (dependabot-automerge-end)
   
   ---
   
   <details>
   <summary>Dependabot commands and options</summary>
   <br />
   
   You can trigger Dependabot actions by commenting on this PR:
   - `@dependabot rebase` will rebase this PR
   - `@dependabot recreate` will recreate this PR, overwriting any edits that 
have been made to it
   - `@dependabot merge` will merge this PR after your CI passes on it
   - `@dependabot squash and merge` will squash and merge this PR after your CI 
passes on it
   - `@dependabot cancel merge` will cancel a previously requested merge and 
block automerging
   - `@dependabot reopen` will reopen this PR if it is closed
   - `@dependabot close` will close this PR and stop Dependabot recreating it. 
You can achieve the same result by closing it manually
   - `@dependabot show <dependency name> ignore conditions` will show all of 
the ignore conditions of the specified dependency
   - `@dependabot ignore this major version` will close this PR and stop 
Dependabot creating any more for this major version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this minor version` will close this PR and stop 
Dependabot creating any more for this minor version (unless you reopen the PR 
or upgrade to it yourself)
   - `@dependabot ignore this dependency` will close this PR and stop 
Dependabot creating any more for this dependency (unless you reopen the PR or 
upgrade to it yourself)
   
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to