centic9 commented on code in PR #732:
URL: https://github.com/apache/commons-text/pull/732#discussion_r2613237765
##########
src/test/java/org/apache/commons/text/lookup/StringLookupFactoryTest.java:
##########
@@ -279,4 +289,9 @@ void testXmlStringLookupExternalEntityOn() {
assertEquals(XmlStringLookupTest.DATA,
StringLookupFactory.INSTANCE.xmlStringLookup(XmlStringLookupTest.EMPTY_MAP).apply(key).trim());
}
+ @Test
+ void testClear() {
+ // this will clear out the global cache in ConstantStringLookup
+ StringLookupFactory.clear();
Review Comment:
Very hard to perform a check as only the underlying internal cache s
cleared.
BTW, this internal "static final" cache is quite strange anyway as different
implementations could lead to different values for the same key in the global
cache and thus would caus very strange bugs.
--
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]