Merge pull request #1479 from jb--/master

fixing documentation mixup
This commit is contained in:
Roel Spilker authored and GitHub committed 2017-10-02 21:16:50 +02:00
commit 214cff5dd2
2 files changed
+10 -10

No files matched your search

@@ -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);
}
}
@@ -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);
}
}