Skip to content

Commit

Permalink
IGNITE-14823 Package abbrevation (#11150)
Browse files Browse the repository at this point in the history
  • Loading branch information
nizhikov authored Dec 27, 2023
1 parent a0fc658 commit 7081017
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ private static RelFactory relFactory(String typeName) {
Class<?> clazz = null;

if (!typeName.contains(".")) {
for (String package_ : PACKAGES) {
if ((clazz = classForName(package_ + typeName, true)) != null)
for (String pkg_ : PACKAGES) {
if ((clazz = classForName(pkg_ + typeName, true)) != null)
break;
}
}
Expand Down Expand Up @@ -250,9 +250,9 @@ String classToTypeName(Class<? extends RelNode> class_) {
return class_.getSimpleName();

String canonicalName = class_.getName();
for (String package_ : PACKAGES) {
if (canonicalName.startsWith(package_)) {
String remaining = canonicalName.substring(package_.length());
for (String pkg_ : PACKAGES) {
if (canonicalName.startsWith(pkg_)) {
String remaining = canonicalName.substring(pkg_.length());
if (remaining.indexOf('.') < 0 && remaining.indexOf('$') < 0)
return remaining;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/checkstyle/src/main/resources/abbrevations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ messages,msgs
mutex,mux
network,net
object,obj
#package,pkg
package,pkg
#parameter,param
#password,pwd
#policy,plc
Expand Down

0 comments on commit 7081017

Please sign in to comment.