You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/04/03 17:55:07 UTC
[tomcat] branch 9.0.x updated: Fix typo. Better test coverage.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new debf532 Fix typo. Better test coverage.
debf532 is described below
commit debf5329db23e5d7cf119e0e3e99708347afc9a0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Apr 3 18:54:03 2020 +0100
Fix typo. Better test coverage.
---
test/org/apache/tomcat/util/res/TestStringManager.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/test/org/apache/tomcat/util/res/TestStringManager.java b/test/org/apache/tomcat/util/res/TestStringManager.java
index 7caeead..97959ab 100644
--- a/test/org/apache/tomcat/util/res/TestStringManager.java
+++ b/test/org/apache/tomcat/util/res/TestStringManager.java
@@ -53,9 +53,17 @@ public class TestStringManager {
}
@Test
- public void testMissing() {
+ public void testMissingWithTccl() {
Thread.currentThread().setContextClassLoader(TestStringManager.class.getClassLoader());
- StringManager sm = StringManager.getManager("org.does.no.exist");
+ StringManager sm = StringManager.getManager("org.does.not.exist");
+ Assert.assertNull(sm.getLocale());
+ }
+
+
+ @Test
+ public void testMissingNullTccl() {
+ Thread.currentThread().setContextClassLoader(null);
+ StringManager sm = StringManager.getManager("org.does.not.exist");
Assert.assertNull(sm.getLocale());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org