{"action":"opened","issue":{"url":"https://api.github.com/repos/google/error-prone/issues/1022","repository_url":"https://api.github.com/repos/google/error-prone","labels_url":"https://api.github.com/repos/google/error-prone/issues/1022/labels{/name}","comments_url":"https://api.github.com/repos/google/error-prone/issues/1022/comments","events_url":"https://api.github.com/repos/google/error-prone/issues/1022/events","html_url":"https://github.com/google/error-prone/issues/1022","id":321324170,"number":1022,"title":"Compiler flag ignored, getting MissingOverrides with generated code from Lombok","user":{"login":"mrt181","id":161961,"avatar_url":"https://avatars3.githubusercontent.com/u/161961?v=4","gravatar_id":"","url":"https://api.github.com/users/mrt181","html_url":"https://github.com/mrt181","followers_url":"https://api.github.com/users/mrt181/followers","following_url":"https://api.github.com/users/mrt181/following{/other_user}","gists_url":"https://api.github.com/users/mrt181/gists{/gist_id}","starred_url":"https://api.github.com/users/mrt181/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrt181/subscriptions","organizations_url":"https://api.github.com/users/mrt181/orgs","repos_url":"https://api.github.com/users/mrt181/repos","events_url":"https://api.github.com/users/mrt181/events{/privacy}","received_events_url":"https://api.github.com/users/mrt181/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-08T19:52:48Z","updated_at":"2018-05-08T19:52:48Z","closed_at":null,"author_association":"NONE","body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n\r\n### What version of Error Prone are you using?\r\n```bash\r\n./gradlew dependencies --configuration errorprone\r\n\r\n> Task :dependencies\r\n\r\n------------------------------------------------------------\r\nRoot project\r\n------------------------------------------------------------\r\n\r\nerrorprone\r\n\\--- com.google.errorprone:error_prone_core:latest.release -> 2.3.1\r\n     +--- com.google.errorprone:error_prone_annotation:2.3.1\r\n     +--- com.google.errorprone:error_prone_type_annotations:2.3.1\r\n     +--- com.google.errorprone:error_prone_check_api:2.3.1\r\n     +--- com.github.stephenc.jcip:jcip-annotations:1.0-1\r\n     +--- org.pcollections:pcollections:2.1.2\r\n     +--- com.google.guava:guava:23.5-jre (*)\r\n     +--- com.google.auto:auto-common:0.10\r\n     +--- com.google.code.findbugs:jFormatString:3.0.0\r\n     +--- com.google.code.findbugs:jsr305:3.0.0\r\n     +--- org.checkerframework:dataflow:2.5.0 (*)\r\n     +--- com.google.errorprone:javac:9+181-r4173-1\r\n     \\--- com.google.errorprone:error_prone_annotations:2.3.1\r\n\r\n(*) - dependencies omitted (listed previously)\r\n\r\nA web-based, searchable dependency report is available by adding the --scan option.\r\n\r\nBUILD SUCCESSFUL in 5s\r\n1 actionable task: 1 executed\r\n\r\n```\r\n\r\n### Does this issue reproduce with the latest release?\r\nyes\r\n\r\n### What did you do?\r\n\r\n`build.gradle`\r\n```groovy\r\nplugins {\r\n    id \"java\"\r\n    id \"net.ltgt.errorprone\" version \"0.0.13\"\r\n}\r\n\r\ngroup 'com'\r\nversion '1.0.0-SNAPSHOT'\r\n\r\nsourceCompatibility = 1.8\r\n\r\nrepositories {\r\n    mavenCentral()\r\n}\r\n\r\ngradle.projectsEvaluated {\r\n    tasks.withType(JavaCompile) {\r\n        options.encoding = \"UTF-8\"\r\n        options.compilerArgs += [\r\n            \"-XepOpt:MissingOverride:IgnoreInterfaceOverrides\",\r\n            \"-XepDisableWarningsInGeneratedCode\",\r\n            \"-Xep:ParameterName:OFF\",\r\n        ]\r\n    }\r\n}\r\n\r\ndependencies {\r\n    compileOnly(\"org.projectlombok:lombok:1.16.+\")\r\n}\r\n```\r\n`settings.gradle`\r\n```\r\nrootProject.name = 'myapp'\r\n```\r\n```java\r\npackage com.myapp;\r\n\r\nimport lombok.Data;\r\nimport lombok.ToString;\r\n\r\npublic class Main {\r\n\r\n  private final String id = \"outer\";\r\n\r\n  public interface Behavior {\r\n    default String getName() {\r\n      return \"interface\";\r\n    }\r\n  }\r\n\r\n  @Data\r\n  @ToString(exclude = \"id\")\r\n  public abstract class Abstraction implements Behavior {\r\n    protected String id = Main.this.id + \" inner\";\r\n    protected String name;\r\n\r\n    public Abstraction(String name) {\r\n      this.name = name;\r\n    }\r\n  }\r\n\r\n  public class Implementation extends Abstraction {\r\n    public Implementation(String name) {\r\n      super(name);\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n\r\n### What did you expect to see?\r\n```bash\r\n./gradlew clean compileJava\r\n> Task :clean\r\n> Task :compileJava\r\n\r\nDeprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.\r\nSee https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings\r\n\r\nBUILD SUCCESSFUL in 14s\r\n2 actionable tasks: 2 executed\r\n```\r\n### What did you see instead?\r\n```bash\r\n ./gradlew clean compileJava\r\n> Task :clean\r\n\r\n> Task :compileJava\r\nC:\\cygwin64\\home\\mrt181\\sourcecode\\myapp\\src\\main\\java\\com\\myapp\\Main.java:20: warning: [MissingOverride] getName implements method in Behavior; expected @Override\r\n    protected String name;\r\n                     ^\r\n    (see http://errorprone.info/bugpattern/MissingOverride)\r\n  Did you mean 'protected String @Override name;'?\r\n1 warning\r\n\r\nDeprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.\r\nSee https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings\r\n\r\nBUILD SUCCESSFUL in 14s\r\n2 actionable tasks: 2 executed\r\n```\r\n\r\nThis is the generated and decompiled sourcecode, the `getName()` method has the `@Generated` annotation.\r\n\r\n```java\r\n//\r\n// Source code recreated from a .class file by IntelliJ IDEA\r\n// (powered by Fernflower decompiler)\r\n//\r\n\r\npackage com.myapp;\r\n\r\nimport lombok.Generated;\r\n\r\npublic class Main {\r\n  private final String id = \"outer\";\r\n\r\n  public Main() {\r\n  }\r\n\r\n  public class Implementation extends Main.Abstraction {\r\n    public Implementation(String name) {\r\n      super(name);\r\n    }\r\n  }\r\n\r\n  public abstract class Abstraction implements Main.Behavior {\r\n    protected String id = \"outer\" + \" inner\";\r\n    protected String name;\r\n\r\n    public Abstraction(String name) {\r\n      this.name = name;\r\n    }\r\n\r\n    @Generated\r\n    public String getId() {\r\n      return this.id;\r\n    }\r\n\r\n    @Generated\r\n    public String getName() {\r\n      return this.name;\r\n    }\r\n\r\n    @Generated\r\n    public void setId(String id) {\r\n      this.id = id;\r\n    }\r\n\r\n    @Generated\r\n    public void setName(String name) {\r\n      this.name = name;\r\n    }\r\n\r\n    @Generated\r\n    public boolean equals(Object o) {\r\n      if (o == this) {\r\n        return true;\r\n      } else if (!(o instanceof Main.Abstraction)) {\r\n        return false;\r\n      } else {\r\n        Main.Abstraction other = (Main.Abstraction)o;\r\n        if (!other.canEqual(this)) {\r\n          return false;\r\n        } else {\r\n          Object this$id = this.getId();\r\n          Object other$id = other.getId();\r\n          if (this$id == null) {\r\n            if (other$id != null) {\r\n              return false;\r\n            }\r\n          } else if (!this$id.equals(other$id)) {\r\n            return false;\r\n          }\r\n\r\n          Object this$name = this.getName();\r\n          Object other$name = other.getName();\r\n          if (this$name == null) {\r\n            if (other$name != null) {\r\n              return false;\r\n            }\r\n          } else if (!this$name.equals(other$name)) {\r\n            return false;\r\n          }\r\n\r\n          return true;\r\n        }\r\n      }\r\n    }\r\n\r\n    @Generated\r\n    protected boolean canEqual(Object other) {\r\n      return other instanceof Main.Abstraction;\r\n    }\r\n\r\n    @Generated\r\n    public int hashCode() {\r\n      int PRIME = true;\r\n      int result = 1;\r\n      Object $id = this.getId();\r\n      int resultx = result * 59 + ($id == null ? 43 : $id.hashCode());\r\n      Object $name = this.getName();\r\n      resultx = resultx * 59 + ($name == null ? 43 : $name.hashCode());\r\n      return resultx;\r\n    }\r\n\r\n    @Generated\r\n    public String toString() {\r\n      return \"Main.Abstraction(name=\" + this.getName() + \")\";\r\n    }\r\n  }\r\n\r\n  public interface Behavior {\r\n    default String getName() {\r\n      return \"interface\";\r\n    }\r\n  }\r\n}\r\n```"}}
{"actor":{"display_login":"mrt181"}}