Skip to content

Commit f4d4fcd

Browse files
committed
remove the toLowerCase calls on entityName
This change facilitates concrete implementation entity names with mixed case. In some circumstances the capitalization of an entity name affects how it is rendered by client applications, this change will give implementation authors more control of the names.
1 parent bf0e064 commit f4d4fcd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/java/io/radanalytics/operator/common/AbstractOperator.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,16 @@ private boolean checkIntegrity() {
297297
}
298298

299299
private void initInternals() {
300-
entityName = (named != null && !named.isEmpty()) ? named.toLowerCase() : (entityName != null && !entityName.isEmpty()) ? this.entityName.toLowerCase() : (infoClass == null ? "" : infoClass.getSimpleName().toLowerCase());
300+
// prefer "named" for the entity name, otherwise "entityName" and finally the converted class name.
301+
if (named != null && !named.isEmpty()) {
302+
entityName = named;
303+
} else if (entityName != null && !entityName.isEmpty()) {
304+
entityName = this.entityName;
305+
} else if (infoClass != null) {
306+
entityName = infoClass.getSimpleName();
307+
} else {
308+
entityName = "";
309+
}
301310
isCrd = isCrd || "true".equals(System.getenv("CRD"));
302311
prefix = prefix == null || prefix.isEmpty() ? getClass().getPackage().getName() : prefix;
303312
prefix = prefix + (!prefix.endsWith("/") ? "/" : "");

0 commit comments

Comments
 (0)