Skip to content

Commit b57a97c

Browse files
committed
cosmetic: remove synthetic param, with less probable method name
1 parent 6a8fc0c commit b57a97c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

value-processor/src/org/immutables/value/processor/Immutables.generator

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ public [type.typeAbstract.relative] [v.names.with]([v.atNullability][v.type] val
10721072

10731073
@Override
10741074
public boolean equals([atNullable type]Object another) {
1075-
return another != null && instance.equalTo(0, ((InternProxy) another).instance);
1075+
return another != null && instance.equalsByValue(((InternProxy) another).instance);
10761076
}
10771077

10781078
@Override
@@ -1258,7 +1258,7 @@ public [type.typeAbstract.relative] [v.names.with]([v.atNullability][v.type] val
12581258
[if type.useSingletonOnlyForConstruction]
12591259
return instance;
12601260
[else]
1261-
return INSTANCE != null && INSTANCE.equalTo(0, instance) ? INSTANCE : instance;[-- may be null during initialization --]
1261+
return INSTANCE != null && INSTANCE.equalsByValue(instance) ? INSTANCE : instance;[-- may be null during initialization --]
12621262
[/if]
12631263
[else]
12641264
return instance;
@@ -3579,7 +3579,7 @@ public boolean equals([atNullable type]Object another) {
35793579
[else]
35803580
if (this == another) return true;
35813581
return another instanceof [equalToType]
3582-
&& equalTo(0, ([equalToType]) another);
3582+
&& equalsByValue(([equalToType]) another);
35833583
[/if]
35843584
}
35853585
[/if]
@@ -3591,8 +3591,8 @@ public boolean equals([atNullable type]Object another) {
35913591
[else]
35923592
@SuppressWarnings("MethodCanBeStatic")
35933593
[/if]
3594-
[-- adding synthetic parameter for macros-hygiene: do not overlap with any customized equalTo method --]
3595-
private boolean equalTo(int synthetic, [equalToType] another) {
3594+
[-- probability of this method class is low, previously used synthetic param, but that seems to have the same overall low probability --]
3595+
private boolean equalsByValue([equalToType] another) {
35963596
[if type.equalToDefined][-- type.useEqualTo is usually false when type.equalToDefined, but not always --]
35973597
[if type.underrideEquals]
35983598
[if type.underrideEquals.isStatic]

0 commit comments

Comments
 (0)