Context
PR #352 added transactions(boolean) and isTransactionsEnabled() to ClientWriteOptions as the affirmative replacement for disableTransactions(boolean) / disableTransactions(). An early commit on that PR (a4540c6) deprecated both old methods, but the final commit (2445..., "remove deprecation from disableTransactions, keep dual paths") removed the annotations so the docs could be updated first. This issue re-applies the deprecation.
Preconditions
- Step 1 docs shipped in a published release: java-sdk docs/examples, the sdk-generator README template, and the spring-boot-starter example. Do not start this until those are released, not just merged. If deprecation lands while released docs still teach
disableTransactions, users copy a method that now warns.
Scope
src/main/java/dev/openfga/sdk/api/configuration/ClientWriteOptions.java:
- Re-apply
@Deprecated to disableTransactions(boolean) (line 92) and disableTransactions() (line 102).
- Add
@deprecated Javadoc tags pointing to transactions(boolean) and isTransactionsEnabled(), noting isTransactionsEnabled() returns the inverse of disableTransactions(). Reuse the wording from commit a4540c6.
Migrate internal call-sites so the build stays warning-clean:
src/test/java/dev/openfga/sdk/api/client/OpenFgaClientTest.java lines 1288, 1356, 1433, 1476, 1686
src/test/java/dev/openfga/sdk/api/client/OpenFgaClientHeadersTest.java:443
src/test/java/dev/openfga/sdk/api/client/OpenFgaClientWriteResponseHeadersTest.java:175
Keep one focused test that still calls disableTransactions(true/false) with @SuppressWarnings("deprecation"), asserting the old and new methods invert each other, so the backward-compatible path stays covered.
Acceptance criteria
Sequencing
Step 2. Blocked by step 1 being released (java-sdk docs/examples, sdk-generator template, spring-boot-starter example). Blocks the removal issue. Tracked in the umbrella issue.
Owner: @curfew-marathon
Context
PR #352 added
transactions(boolean)andisTransactionsEnabled()toClientWriteOptionsas the affirmative replacement fordisableTransactions(boolean)/disableTransactions(). An early commit on that PR (a4540c6) deprecated both old methods, but the final commit (2445..., "remove deprecation from disableTransactions, keep dual paths") removed the annotations so the docs could be updated first. This issue re-applies the deprecation.Preconditions
disableTransactions, users copy a method that now warns.Scope
src/main/java/dev/openfga/sdk/api/configuration/ClientWriteOptions.java:@DeprecatedtodisableTransactions(boolean)(line 92) anddisableTransactions()(line 102).@deprecatedJavadoc tags pointing totransactions(boolean)andisTransactionsEnabled(), notingisTransactionsEnabled()returns the inverse ofdisableTransactions(). Reuse the wording from commita4540c6.Migrate internal call-sites so the build stays warning-clean:
src/test/java/dev/openfga/sdk/api/client/OpenFgaClientTest.javalines 1288, 1356, 1433, 1476, 1686src/test/java/dev/openfga/sdk/api/client/OpenFgaClientHeadersTest.java:443src/test/java/dev/openfga/sdk/api/client/OpenFgaClientWriteResponseHeadersTest.java:175Keep one focused test that still calls
disableTransactions(true/false)with@SuppressWarnings("deprecation"), asserting the old and new methods invert each other, so the backward-compatible path stays covered.Acceptance criteria
disableTransactionsoverloads carry@Deprecatedand a@deprecatedJavadoc tag naming the replacement.-Xlint:deprecation/-Werror), or the deprecated calls are confined to the one suppressed back-compat test.transactions(false)impliesdisableTransactions() == true, anddisableTransactions(true)impliesisTransactionsEnabled() == false.Sequencing
Step 2. Blocked by step 1 being released (java-sdk docs/examples, sdk-generator template, spring-boot-starter example). Blocks the removal issue. Tracked in the umbrella issue.
Owner: @curfew-marathon