Skip to content

Commit 65a27c3

Browse files
committed
fix: compilation error in java
1 parent eb8bd87 commit 65a27c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/cli/lib/type-generation/languages/java.js.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public class <%- toPascalCase(collection.name) %> {
7171
if (this == obj) return true;
7272
if (obj == null || getClass() != obj.getClass()) return false;
7373
<%- toPascalCase(collection.name) %> that = (<%- toPascalCase(collection.name) %>) obj;
74-
return Objects.equals(<%= collection.attributes.map(attr => toCamelCase(attr.key)).join(', ') %><%- collection.attributes.length > 1 ? ', that.' + collection.attributes.map(attr => toCamelCase(attr.key)).join(', that.') : collection.attributes.length === 1 ? ', that.' + toCamelCase(collection.attributes[0].key) : '' %>);
74+
return <% collection.attributes.forEach((attr, index) => { %>Objects.equals(<%= toCamelCase(attr.key) %>, that.<%= toCamelCase(attr.key) %>)<% if (index < collection.attributes.length - 1) { %> &&
75+
<% } }); %>;
7576
}
7677

7778
@Override

0 commit comments

Comments
 (0)