diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-03-15 03:04:03 +0100 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-03-15 03:04:03 +0100 |
commit | 3edac649118dff4a48d7218dc31a727f13537fea (patch) | |
tree | c76a8f72aa997625f3f1c409a68bb540b56578d2 /test/transform/resource/after-ecj | |
parent | 6356482555e07e1cfeb7cb5a5b31f78dfc91c34b (diff) | |
download | lombok-3edac649118dff4a48d7218dc31a727f13537fea.tar.gz lombok-3edac649118dff4a48d7218dc31a727f13537fea.tar.bz2 lombok-3edac649118dff4a48d7218dc31a727f13537fea.zip |
[fixes #2386] [checkerframework]
Now generating checkerframework `@Pure` instead of `@SideEffectFree` where appropriate.
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r-- | test/transform/resource/after-ecj/CheckerFrameworkBasic.java | 6 | ||||
-rw-r--r-- | test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/test/transform/resource/after-ecj/CheckerFrameworkBasic.java b/test/transform/resource/after-ecj/CheckerFrameworkBasic.java index 25b28c4b..ce4d11f8 100644 --- a/test/transform/resource/after-ecj/CheckerFrameworkBasic.java +++ b/test/transform/resource/after-ecj/CheckerFrameworkBasic.java @@ -8,10 +8,10 @@ import lombok.With; public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkBasic withX(final int x) { return ((this.x == x) ? this : new CheckerFrameworkBasic(x, this.y, this.z)); } - public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") int getX() { + public @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") int getX() { return this.x; } - public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") int getY() { + public @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") int getY() { return this.y; } public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") int getZ() { @@ -37,7 +37,7 @@ import lombok.With; return false; return true; } - protected @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { + protected @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) { return (other instanceof CheckerFrameworkBasic); } public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") int hashCode() { diff --git a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java index 163e9d68..5bd4e1b3 100644 --- a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java +++ b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java @@ -10,7 +10,7 @@ class CheckerFrameworkSuperBuilder { private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> names; public ParentBuilder() { } - protected abstract @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") B self(); + protected abstract @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") B self(); public abstract @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkSuperBuilder.Parent.ParentBuilder this); public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B x(final @org.checkerframework.checker.builder.qual.NotCalledMethods("x") CheckerFrameworkSuperBuilder.Parent.ParentBuilder this, final int x) { this.x$value = x; @@ -53,7 +53,7 @@ class CheckerFrameworkSuperBuilder { private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends CheckerFrameworkSuperBuilder.Parent.ParentBuilder<CheckerFrameworkSuperBuilder.Parent, CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl> { private ParentBuilderImpl() { } - protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl self() { + protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl self() { return this; } public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Parent build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl this) { @@ -99,7 +99,7 @@ class CheckerFrameworkSuperBuilder { private @java.lang.SuppressWarnings("all") int b; public ChildBuilder() { } - protected abstract @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") B self(); + protected abstract @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") B self(); public abstract @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilder this); public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B a(final @org.checkerframework.checker.builder.qual.NotCalledMethods("a") CheckerFrameworkSuperBuilder.Child.ChildBuilder this, final int a) { this.a$value = a; @@ -117,7 +117,7 @@ class CheckerFrameworkSuperBuilder { private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends CheckerFrameworkSuperBuilder.Child.ChildBuilder<CheckerFrameworkSuperBuilder.Child, CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl> { private ChildBuilderImpl() { } - protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl self() { + protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl self() { return this; } public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Child build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl this) { |