Breaks generated code when creating a derived builder
Rosomack opened this issue · 3 comments
Rosomack commented
@AutoValue
public abstract class Request {
@IgnoreHashEquals public abstract int getId();
public static Builder builder() {
return new AutoValue_Request.Builder();
}
public abstract Builder toBuilder();
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder setId(int newId);
public abstract Request build();
}
}
The above example generates an incorrect class. The toBuilder
method is mistaken for a field, but should be ignored.
Rosomack commented
Looks like this was a false alarm. Bug in the auto value library itself.
Updating from 1.2 to 1.4.1 seems to have solved the issue!
Sorry about the confusion!
REggar commented
Yeah I was struggling to reproduce this, thanks for the update.