Github user albertostratio commented on a diff in the pull request:
https://github.com/apache/metamodel/pull/70#discussion_r45444580
--- Diff: core/src/main/java/org/apache/metamodel/query/FromClause.java ---
@@ -75,7 +75,13 @@ public FromItem getItemByReference(String reference) {
return null;
}
- private FromItem getItemByReference(FromItem item, String reference) {
+ private FromItem getItemByReference(final FromItem item, final String
reference) {
+ if (reference.equals(item.toStringNoAlias(false))) {
+ return item;
+ }
+ if (reference.equals(item.toStringNoAlias(true))) {
+ return item;
+ }
final String alias = item.getAlias();
--- End diff --
Wouldn't it be better to write just one if instead of two? I'd rewrite it
to:
if (reference.equals(item.toStringNoAlias(false)) ||
reference.equals(item.toStringNoAlias(true))) {
return item;
}
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---