Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dexpace/java-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: dexpace/java-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feat/deep-array-value-equality
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Jun 17, 2026

  1. feat: add deep-array value-equality helpers in sdk-core

    Add ValueEquality.contentEquals / contentHashCode to org.dexpace.sdk.core.util
    for value types that hold array-typed fields. java.util.Objects.equals compares
    arrays by identity, so structurally-equal ByteArray (or any array) fields are
    wrongly reported unequal; these helpers compare by content instead.
    
    Both helpers handle primitive arrays, object arrays, nulls, and arbitrarily-deep
    nested / multi-dimensional arrays (via Arrays.deepEquals / deepHashCode), while
    falling back to ordinary equals/hashCode for non-array values. The two methods
    are mutually consistent: content-equal values always share a content hash.
    OmarAlJarrah committed Jun 17, 2026
    Configuration menu
    Copy the full SHA
    cb8fa39 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2026

  1. refactor: delegate contentEquals to Objects.deepEquals and pin float …

    …semantics
    
    contentEquals reimplemented java.util.Objects.deepEquals branch for branch, so delegate to it directly instead. Document that array comparison follows Arrays.equals/Double.equals semantics rather than ==: NaN compares equal and 0.0 != -0.0, for both primitive and boxed arrays. Note that contentHashCode mirrors Arrays.deepHashCode by hand and is kept in lockstep with contentEquals.
    
    Add tests for NaN and signed zero across primitive and boxed float/double arrays, plus nested arrays, mixed elements, and non-canonical NaN bit patterns.
    OmarAlJarrah committed Jun 20, 2026
    Configuration menu
    Copy the full SHA
    4163614 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2026

  1. docs: explain public surface, delegation, and unsigned-array limit on…

    … ValueEquality
    
    Expand the ValueEquality KDoc to answer the three questions a reader is most
    likely to have about it:
    
    - Why it is public with no in-tree caller: it is a deliberate, forward-looking
      primitive that hand-written (or later generated) value types target for their
      array-typed fields.
    - Why contentEquals is a thin wrapper over Objects.deepEquals: to pair
      symmetrically with contentHashCode, for which the JDK offers no
      Objects.deepHashCode counterpart, giving callers one contract-paired API.
    - That Kotlin unsigned arrays (UByteArray, etc.) are not recognized as arrays
      and fall through to identity-based equals/hashCode, with the asXxxArray()
      workaround for content semantics.
    
    Doc-only; no signature or behavior change (apiCheck unchanged).
    OmarAlJarrah committed Jun 21, 2026
    Configuration menu
    Copy the full SHA
    bb9d4f1 View commit details
    Browse the repository at this point in the history
Loading