diff options
Diffstat (limited to 'usage_examples')
-rw-r--r-- | usage_examples/ToStringExample_pre.jpage | 2 | ||||
-rw-r--r-- | usage_examples/experimental/WitherExample_post.jpage | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usage_examples/ToStringExample_pre.jpage b/usage_examples/ToStringExample_pre.jpage index a15fb944..39b25892 100644 --- a/usage_examples/ToStringExample_pre.jpage +++ b/usage_examples/ToStringExample_pre.jpage @@ -9,7 +9,7 @@ public class ToStringExample { private int id; public String getName() { - return this.getName(); + return this.name; } @ToString(callSuper=true, includeFieldNames=true) diff --git a/usage_examples/experimental/WitherExample_post.jpage b/usage_examples/experimental/WitherExample_post.jpage index bb5952af..3447192a 100644 --- a/usage_examples/experimental/WitherExample_post.jpage +++ b/usage_examples/experimental/WitherExample_post.jpage @@ -3,19 +3,19 @@ import lombok.NonNull; public class WitherExample { private final int age; private @NonNull final String name; - + public WitherExample(String name, int age) { if (name == null) throw new NullPointerException(); this.name = name; this.age = age; } - + public WitherExample withAge(int age) { - return this.age == age ? this : new WitherExample(age, name); + return this.age == age ? this : new WitherExample(name, age); } - + protected WitherExample withName(@NonNull String name) { if (name == null) throw new java.lang.NullPointerException("name"); - return this.name == name ? this : new WitherExample(age, name); + return this.name == name ? this : new WitherExample(name, age); } }
\ No newline at end of file |