diff options
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java | 2 | ||||
-rw-r--r-- | test/transform/resource/after-ecj/DelegateWithDeprecated.java | 41 |
2 files changed, 20 insertions, 23 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java index 87335b4e..6977df2b 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java @@ -581,7 +581,7 @@ public class PatchDelegate { method.modifiers = ClassFileConstants.AccPublic; method.returnType = makeType(binding.returnType, source, false); - boolean isDeprecated = hasDeprecatedAnnotation(binding); + boolean isDeprecated = hasDeprecatedAnnotation(binding) || binding.isDeprecated(); method.selector = binding.selector; diff --git a/test/transform/resource/after-ecj/DelegateWithDeprecated.java b/test/transform/resource/after-ecj/DelegateWithDeprecated.java index 04e12160..2a4fdf98 100644 --- a/test/transform/resource/after-ecj/DelegateWithDeprecated.java +++ b/test/transform/resource/after-ecj/DelegateWithDeprecated.java @@ -1,24 +1,21 @@ +import lombok.Delegate; class DelegateWithDeprecated { - private Bar bar; - private interface Bar { - @Deprecated - void deprecatedAnnotation(); - /** @deprecated */ - void deprecatedComment(); - void notDeprecated(); - } - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public void deprecatedAnnotation() { - this.bar.deprecatedAnnotation(); - } - @java.lang.Deprecated - @java.lang.SuppressWarnings("all") - public void deprecatedComment() { - this.bar.deprecatedComment(); - } - @java.lang.SuppressWarnings("all") - public void notDeprecated() { - this.bar.notDeprecated(); - } + private interface Bar { + @Deprecated void deprecatedAnnotation(); + void deprecatedComment(); + void notDeprecated(); + } + private @Delegate Bar bar; + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void deprecatedAnnotation() { + this.bar.deprecatedAnnotation(); + } + public @java.lang.Deprecated @java.lang.SuppressWarnings("all") void deprecatedComment() { + this.bar.deprecatedComment(); + } + public @java.lang.SuppressWarnings("all") void notDeprecated() { + this.bar.notDeprecated(); + } + DelegateWithDeprecated() { + super(); + } }
\ No newline at end of file |