Skip to content

Commit c468a20

Browse files
oschwaldclaude
andcommitted
Document residential default in Anonymizer no-arg constructor
The no-arg constructor's JavaDoc said null was used for all nullable fields, but the compact canonical constructor replaces a null residential with an empty AnonymizerFeed. Clarify this so a maintainer doesn't assume residential() can be null after new Anonymizer(). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4b64e21 commit c468a20

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/com/maxmind/geoip2/record/Anonymizer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public record Anonymizer(
7676

7777
/**
7878
* Constructs an {@code Anonymizer} record with {@code null} values for all the nullable
79-
* fields and {@code false} for all boolean fields.
79+
* fields and {@code false} for all boolean fields. The {@code residential} field defaults
80+
* to an empty {@code AnonymizerFeed} rather than {@code null}.
8081
*/
8182
public Anonymizer() {
8283
this(null, false, false, false, false, false, false, null, null, null);

0 commit comments

Comments
 (0)