Skip to content

Commit

Permalink
Revert to previous naming behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaber committed Dec 31, 2023
1 parent 513bc54 commit 9879fa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ private static class SnakeToCamelNamingStrategy extends NamingBase {

@Override
public String translate(String fieldName) {
return fieldName.contains("_")
? CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, fieldName)
: fieldName;
return CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, fieldName);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ public String nameForField(

assertThat(tree.isObject()).isTrue();
assertThat(tree.size()).isEqualTo(1);
assertThat(tree.get("stringAttribute")).isNotNull();
assertThat(tree.get("stringAttribute").textValue())
assertThat(tree.get("stringattribute")).isNotNull();
assertThat(tree.get("stringattribute").textValue())
.isEqualTo(message.getStringAttribute());
}

Expand Down Expand Up @@ -202,8 +202,8 @@ public String nameForField(

assertThat(subTree.isObject()).isTrue();
assertThat(subTree.size()).isEqualTo(1);
assertThat(subTree.get("stringAttribute")).isNotNull();
assertThat(subTree.get("stringAttribute").textValue())
assertThat(subTree.get("stringattribute")).isNotNull();
assertThat(subTree.get("stringattribute").textValue())
.isEqualTo(messages.get(i).getStringAttribute());
}
}
Expand Down

0 comments on commit 9879fa1

Please sign in to comment.