Skip to content

Commit 7d7e13f

Browse files
committed
should not be compared with ==. This is a reference comparison operator. Use .equals() instead.
1 parent 9f22829 commit 7d7e13f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

delivery-sdk-generators/src/main/java/kontent/ai/delivery/generators/CodeGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public JavaFile generateSource(ContentType type) {
140140
if (typeName != null) {
141141
//Add the field
142142
String fieldName = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, element.getKey());
143-
Class annoClass = element.getValue().getType() == "modular_content" ?
143+
Class annoClass = element.getValue().getType().equals("modular_content") ?
144144
ContentItemMapping.class : ElementMapping.class;
145145
fieldSpecs.add(
146146
FieldSpec.builder(typeName, fieldName)

0 commit comments

Comments
 (0)