ppkarwasz commented on code in PR #1268:
URL: https://github.com/apache/logging-log4j2/pull/1268#discussion_r1098507631
##########
log4j-api/src/main/java/org/apache/logging/log4j/util/PropertySource.java:
##########
@@ -71,6 +71,20 @@ default CharSequence getNormalForm(Iterable<? extends
CharSequence> tokens) {
return null;
}
+ /**
+ * Converts a list of property name tokens into a normal form of legacy
type. For example, a list of tokens such as
+ * "foo", "bar", "baz", might be normalized into the property name
"log4j.fooBarBaz".
+ * </p>
+ * This is not supposed to be implemented by newer implementations, but
only exists to add compatibility support
+ * for existing implementations.
+ *
+ * @param tokens list of property name tokens
+ * @return a normalized legacy property name using the given tokens
+ */
+ default CharSequence getLegacyNormalForm(Iterable<? extends CharSequence>
tokens) {
+ return null;
+ }
+
Review Comment:
There is no legacy normal form.
Legacy properties have an incoherent naming policy (cf.
[documentation](https://logging.apache.org/log4j/2.x/manual/configuration.html#SystemProperties)),
that is why they were replaced with the new normalized version.
However Log4j2 code uses **only** legacy properties internally, so you can
be sure that the parameter of an `Environment#get(String)` call is a legacy
property.
--
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]