Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3121 from JohnPaulTaylorII/master
Fixes #3120
- Loading branch information
Showing
6 changed files
with
72 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
test/transform/resource/after-delombok/EqualsAndHashCodeWithNonNullByDefault.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import javax.annotation.ParametersAreNonnullByDefault; | ||
@ParametersAreNonnullByDefault | ||
class EqualsAndHashCodeWithNonNullByDefault { | ||
@java.lang.Override | ||
@java.lang.SuppressWarnings("all") | ||
public boolean equals(@javax.annotation.Nullable final java.lang.Object o) { | ||
if (o == this) return true; | ||
if (!(o instanceof EqualsAndHashCodeWithNonNullByDefault)) return false; | ||
final EqualsAndHashCodeWithNonNullByDefault other = (EqualsAndHashCodeWithNonNullByDefault) o; | ||
if (!other.canEqual((java.lang.Object) this)) return false; | ||
return true; | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
protected boolean canEqual(@javax.annotation.Nullable final java.lang.Object other) { | ||
return other instanceof EqualsAndHashCodeWithNonNullByDefault; | ||
} | ||
@java.lang.Override | ||
@java.lang.SuppressWarnings("all") | ||
public int hashCode() { | ||
final int result = 1; | ||
return result; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
test/transform/resource/after-ecj/EqualsAndHashCodeWithNonNullByDefault.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import javax.annotation.ParametersAreNonnullByDefault; | ||
@lombok.EqualsAndHashCode @ParametersAreNonnullByDefault class EqualsAndHashCodeWithNonNullByDefault { | ||
EqualsAndHashCodeWithNonNullByDefault() { | ||
super(); | ||
} | ||
public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final @javax.annotation.Nullable java.lang.Object o) { | ||
if ((o == this)) | ||
return true; | ||
if ((! (o instanceof EqualsAndHashCodeWithNonNullByDefault))) | ||
return false; | ||
final EqualsAndHashCodeWithNonNullByDefault other = (EqualsAndHashCodeWithNonNullByDefault) o; | ||
if ((! other.canEqual((java.lang.Object) this))) | ||
return false; | ||
return true; | ||
} | ||
protected @java.lang.SuppressWarnings("all") boolean canEqual(final @javax.annotation.Nullable java.lang.Object other) { | ||
return (other instanceof EqualsAndHashCodeWithNonNullByDefault); | ||
} | ||
public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { | ||
final int result = 1; | ||
return result; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
test/transform/resource/before/EqualsAndHashCodeWithNonNullByDefault.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//CONF: lombok.addNullAnnotations = javax | ||
import javax.annotation.ParametersAreNonnullByDefault; | ||
@lombok.EqualsAndHashCode | ||
@ParametersAreNonnullByDefault | ||
class EqualsAndHashCodeWithNonNullByDefault { | ||
} |