utsav00 commented on code in PR #4535:
URL: https://github.com/apache/solr/pull/4535#discussion_r3436807891
##########
solr/solrj/src/java/org/apache/solr/common/util/EnvUtils.java:
##########
Review Comment:
Not fix blocking but some small refactor: With this load time lookup
normalization, we can remove these methods that were added in the initial fix
and the original loop can be simplified again to
```suggestion
var dotKey = camelCaseToDotSeparated(deprecatedKey);
if (DEPRECATED_MAPPINGS.containsKey(dotKey) ||
DEPRECATED_MAPPINGS.containsKey("!" + dotKey)) {
applyDeprecatedPropertyMapping(deprecatedKey, dotKey, sysProperties);
}
```
##########
solr/solrj/src/test/org/apache/solr/common/util/EnvUtilsTest.java:
##########
@@ -118,6 +118,18 @@ public void
deprecatedCamelCaseDFlagIsTranslatedToCurrentPropertyName() {
assertTrue(EnvUtils.getPropertyAsBool("solr.auth.jwt.outbound.http.enabled"));
}
+ @Test
+ public void deprecatedCamelCaseOldNameInMappingsFileIsTranslated() {
Review Comment:
This looks good. Can we also add a test for deprecated inverted camel case
property to cover all the cases?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]