Skip to content

Commit

Permalink
fix equals in java generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jenschude committed Aug 7, 2023
1 parent 4edf868 commit be5e5c0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,15 @@ class JavaModelClassFileProducer constructor(override val vrapTypeProvider: Vrap
| ${vrapType.simpleClassName}Impl that = (${vrapType.simpleClassName}Impl) o;
|
| return new EqualsBuilder()
| <${this.allProperties.filter { it.getAnnotation("deprecated") == null }.joinToString("\n") { it.equalsMethod() }}>
| <${this.allProperties.filterNot { it.deprecated() }.joinToString("\n") { it.equalsMethod() }}>
| <${this.allProperties.filterNot { it.deprecated() }.joinToString("\n") { it.equalsMethod() }}>
| .isEquals();
|}
|
|@Override
|public int hashCode() {
| return new HashCodeBuilder(17, 37)
| <${this.allProperties.filter { it.getAnnotation("deprecated") == null }.joinToString("\n") { it.hashMethod() }}>
| <${this.allProperties.filterNot { it.deprecated() }.joinToString("\n") { it.hashMethod() }}>
| .toHashCode();
|}
""".trimMargin().keepIndentation()
Expand Down

0 comments on commit be5e5c0

Please sign in to comment.