Capitalize string used in getRotation (#103)

Closes StratusNetwork/Issues#265
This commit is contained in:
Randy Kinne 2019-01-03 19:36:59 -05:00 committed by Austin Mayes
parent 63b3ac4c75
commit ae0ea7e30a
1 changed files with 11 additions and 1 deletions

View File

@ -26,7 +26,17 @@ public abstract class AbstractRotationProvider implements RotationProvider {
public @Nullable RotationState getRotation(@Nonnull String name) {
Preconditions.checkNotNull(name, "rotation name");
synchronized(this) {
return this.rotations.get(name);
RotationState state = this.rotations.get(name);
if (state != null) return state
for (String key : this.rotations.keySet()) {
if (key.equalsIgnoreCase(name)) {
state = this.rotations.get(key);
break;
}
}
return state;
}
}