Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Jun 28, 2025

This pull request introduces several key improvements to the Switcher API, focusing on simplifying its usage and enhancing functionality. The most notable changes include the removal of the build() method from Switcher, the addition of a getLastExecutionResult() method, and updates to the documentation and tests to reflect these changes.

API Simplification:

  • Removed the build() method from the Switcher interface and related classes, streamlining the process of creating and using Switcher objects. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Enhanced Functionality:

  • Added a getLastExecutionResult() method to the Switcher interface and its implementations, enabling retrieval of the last execution result for improved debugging and feature tracking. [1] [2] [3]

Documentation Updates:

  • Updated the README.md to replace references to getHistoryExecution() with getLastExecutionResult() and removed mentions of the build() method to align with the new API design. [1] [2]

Test Adjustments:

  • Modified test cases across multiple files to remove calls to build() and validate the functionality of getLastExecutionResult(). [1] [2] [3] [4] [5] [6] [7] [8]

Dependency Refinements:

  • Adjusted imports in SwitcherLocal1Test to reflect the updated API structure.

@petruki petruki added this to the v1.7.1 milestone Jun 28, 2025
@petruki petruki self-assigned this Jun 28, 2025
@petruki petruki added the enhancement New feature or request label Jun 28, 2025
@sonarqubecloud
Copy link

@petruki petruki merged commit 1badbee into master Jun 28, 2025
11 checks passed
@petruki petruki deleted the staging branch June 28, 2025 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants