dsmiley commented on code in PR #4535:
URL: https://github.com/apache/solr/pull/4535#discussion_r3436368969


##########
solr/solrj/src/java/org/apache/solr/common/util/EnvUtils.java:
##########
@@ -75,7 +75,9 @@ public class EnvUtils {
           CUSTOM_MAPPINGS.put(key, props.getProperty(key));
         }
         for (String key : deprecatedProps.stringPropertyNames()) {
-          DEPRECATED_MAPPINGS.put(deprecatedProps.getProperty(key), key);
+          // The lookup side (findDeprecatedMappingKey) normalises incoming 
"-D" keys to

Review Comment:
   ```suggestion
             // The lookup side (findDeprecatedMappingKey) normalizes system 
properties to
   ```
   
   Would that be just as correct?



##########
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() {
+    // Here the *old* name in the mappings file is itself camelCase 
(collection.configName), unlike
+    // deprecatedCamelCaseDFlagIsTranslatedToCurrentPropertyName where the 
file uses a dot-separated
+    // old name. Passing the camelCase old name verbatim as a -D flag must 
still be migrated. See

Review Comment:
   In general, as a Java developer, I simply say "system property".  I don't 
say "-D" flag... while yes I understand that is the argument to Java to pass 
them in on startup.



-- 
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]

Reply via email to