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

Commits on Sep 4, 2024

  1. 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
    PiperOrigin-RevId: 670953681
    cpovirk authored and Google Java Core Libraries committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    132a1a9 View commit details
    Browse the repository at this point in the history