utafrali commented on code in PR #9147:
URL: https://github.com/apache/hop/pull/9147#discussion_r4411612475
##########
core/src/test/java/org/apache/hop/i18n/GlobalMessageUtilTest.java:
##########
@@ -55,6 +58,29 @@ void isMissingKey() {
assertFalse(GlobalMessageUtil.isMissingKey(" !"));
}
+ @Test
+ void bundlesAreOnlyLookedUpAsPropertiesFiles() {
+ assertEquals(
+ ResourceBundle.Control.FORMAT_PROPERTIES,
+ new
GlobalMessageUtil.GlobalMessageControl(true).getFormats("any.base.name"));
+ }
+
+ @Test
Review Comment:
This test covers the path where `delegatesToSystemClassLoader` returns
`false` and the retry happens. It would be worth adding a companion test for
the opposite case — a loader whose parent chain includes the system class
loader — to confirm that the fallback is NOT triggered (e.g., by verifying a
bundle is found without reaching the system class loader, or that passing
`ClassLoader.getSystemClassLoader()` as the loader directly still works). Right
now there is no explicit proof that the guard short-circuits correctly for the
common app-class-loader case.
--
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]