Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Really produce only a warning for setters with boxed primitive types for primitive properties. #1830

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

copybara-service[bot]
Copy link
Contributor

Really produce only a warning for setters with boxed primitive types for primitive properties.

We'd attempted this in cl/659352853, but we ended up reporting a warning and then failing with an error on a later step instead.

With the new test, we see an error until we make the prod change that I've included:

Compilation produced the following diagnostics:
foo/bar/Baz.java:11: warning: [AutoValueUnnecessaryBoxing] property method foo.bar.Baz.blam() is primitive but parameter of setter method is not
    Builder blam(Integer x);
            ^
foo/bar/Baz.java:10: error: [AutoValueBuilderMissingMethod] Expected a method with this signature: foo.bar.Baz.Builder blam(int), or a blamBuilder() method
  public interface Builder {
         ^

RELNOTES=n/a

…for primitive properties.

We'd attempted this in cl/659352853, but we ended up reporting a warning and then failing with an error on a later step instead.

With the new test, we see an error until we make the prod change that I've included:

```
Compilation produced the following diagnostics:
foo/bar/Baz.java:11: warning: [AutoValueUnnecessaryBoxing] property method foo.bar.Baz.blam() is primitive but parameter of setter method is not
    Builder blam(Integer x);
            ^
foo/bar/Baz.java:10: error: [AutoValueBuilderMissingMethod] Expected a method with this signature: foo.bar.Baz.Builder blam(int), or a blamBuilder() method
  public interface Builder {
         ^
```

RELNOTES=n/a
PiperOrigin-RevId: 670953681
@copybara-service copybara-service bot merged commit 132a1a9 into main Sep 4, 2024
@copybara-service copybara-service bot deleted the test_main_670709300 branch September 4, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant