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: mockito/mockito
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.21.0
Choose a base ref
...
head repository: mockito/mockito
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v5.22.0
Choose a head ref
  • 6 commits
  • 16 files changed
  • 6 contributors

Commits on Dec 16, 2025

  1. Bump actions/upload-artifact from 5 to 6 (#3774)

    Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
    - [Release notes](https://github.com/actions/upload-artifact/releases)
    - [Commits](actions/upload-artifact@v5...v6)
    
    ---
    updated-dependencies:
    - dependency-name: actions/upload-artifact
      dependency-version: '6'
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 16, 2025
    Configuration menu
    Copy the full SHA
    8d9a62f View commit details
    Browse the repository at this point in the history
  2. Add tests for Sets utility class (#3771)

    Add comprehensive test coverage for Sets utility class which provides
    factory methods for creating mock-safe hash sets and regular sets.
    Tests cover all three static methods with various scenarios including
    mock objects, regular objects, edge cases, and error handling.
    
    - Test newMockSafeHashSet(Iterable<Object>) with various scenarios
    - Test newMockSafeHashSet(Object...) with various scenarios
    - Test newSet(T...) with various types
    - Test edge cases (empty collections, null handling, duplicates)
    - Test set operations (add, remove)
    - Fix AssertJ null handling by using explicit type casting to avoid NullPointerException
    thswlsqls authored Dec 16, 2025
    Configuration menu
    Copy the full SHA
    9e5d449 View commit details
    Browse the repository at this point in the history
  3. Clarify RETURNS_MOCKS behavior with sealed abstract enums (Java 15+) (

    #3773)
    
    Added documentation note explaining that since Java 15, abstract enums
    are declared sealed and cannot be mocked. Attempting to return a mock
    for such types will throw MockitoException instead of returning null.
    
    Fixes #3285
    NiMv1 authored Dec 16, 2025
    Configuration menu
    Copy the full SHA
    27eb8a3 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2026

  1. Bump graalvm/setup-graalvm from 1.4.4 to 1.4.5 (#3780)

    Bumps [graalvm/setup-graalvm](https://github.com/graalvm/setup-graalvm) from 1.4.4 to 1.4.5.
    - [Release notes](https://github.com/graalvm/setup-graalvm/releases)
    - [Commits](graalvm/setup-graalvm@v1.4.4...v1.4.5)
    
    ---
    updated-dependencies:
    - dependency-name: graalvm/setup-graalvm
      dependency-version: 1.4.5
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 5, 2026
    Configuration menu
    Copy the full SHA
    d16fcfc View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2026

  1. Avoids mocking private static methods, as well as package-private sta…

    …tic methods of java.* classes, as those are primarily internal utilities that will cause non-intuitive changes of methods. This are not invoked for non-static mocks either. Fixes #3778. (#3785)
    raphw authored Feb 6, 2026
    Configuration menu
    Copy the full SHA
    ef9ee55 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2026

  1. Add core API to enable Kotlin singleton mocking (#3762)

    * Add core API to enable Kotlin singleton mocking
    
    Fixes #3652
    
    * Update implementation - no modifying MockSettings API. Entry point is via MockUtil in the internal package.
    
    * Fix NPE
    
    * Reimplement as mockSingleton API, decouple from static mocking, have docs/tests demonstrate stubbing Java enums
    
    * Update javadocs
    
    * Update wording of MockedSingleton javadoc
    
    ---------
    
    Co-authored-by: Joshua Selbo <[email protected]>
    jselbo and Joshua Selbo authored Feb 13, 2026
    Configuration menu
    Copy the full SHA
    25f1395 View commit details
    Browse the repository at this point in the history
Loading