docs: fix LDConfig.Builder examples to include AutoEnvAttributes parameter#334
docs: fix LDConfig.Builder examples to include AutoEnvAttributes parameter#334kinyoklion wants to merge 1 commit intomainfrom
Conversation
…meter Co-Authored-By: rlamb@launchdarkly.com <kingdewman@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
| * after setting any desired properties on the builder, applies this configuration to the SDK. | ||
| * <pre><code> | ||
| * LDConfig config = new LDConfig.Builder() | ||
| * LDConfig config = new LDConfig.Builder(AutoEnvAttributes.Enabled) |
There was a problem hiding this comment.
Does it need to be LDConfig.Builder.AutoEnvAttributes.Disabled or is AutoEnvAttributes.Enabled fine?
There was a problem hiding this comment.
The example app (example/MainActivity.java) uses the short form with an import:
import com.launchdarkly.sdk.android.LDConfig.Builder.AutoEnvAttributes;
// ...
LDConfig ldConfig = new LDConfig.Builder(AutoEnvAttributes.Enabled)Since these are Javadoc examples, the short form AutoEnvAttributes.Enabled is consistent with how users would write it after importing the enum.
That said, I'm happy to change all occurrences to LDConfig.Builder.AutoEnvAttributes.Enabled if you'd prefer the fully-qualified form for clarity in the doc examples — just let me know.
There was a problem hiding this comment.
@tanderson-ld I will leave this choice to you.
Requirements
Related issues
N/A — identified during a documentation audit of client-side SDK examples.
Describe the solution you've provided
All
LDConfig.Buildercode examples in Javadoc comments were using the no-arg constructor (new LDConfig.Builder()), which does not exist. The actual constructor requires anAutoEnvAttributesparameter:new LDConfig.Builder(AutoEnvAttributes.Enabled).This PR updates every affected Javadoc example across 13 source files to use the correct constructor signature.
Describe alternatives you've considered
None — the examples must match the actual method signature.
Additional context
Key items for review:
new LDConfig.Builder()pattern against the main source tree returns zero results after this change.<pre><code>blocks; no functional code was modified.AutoEnvAttributes.Enabledwas chosen as the example value since it is the recommended setting per the SDK documentation.Link to Devin session: https://app.devin.ai/sessions/c465b9ad05c7492880221b219b299142
Requested by: @kinyoklion