You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by ju...@apache.org on 2020/03/31 17:41:25 UTC
[jspwiki] 13/14: Rename servlet context listener so it shows
intentionality more clearly
This is an automated email from the ASF dual-hosted git repository.
juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 58b04636cca69c81e4ed6a754dc1bf3fbac702f5
Author: juanpablo <ju...@apache.org>
AuthorDate: Tue Mar 31 19:31:16 2020 +0200
Rename servlet context listener so it shows intentionality more clearly
---
...textListener.java => WikiBootstrapServletContextListener.java} | 2 +-
...enerTest.java => WikiBootstrapServletContextListenerTest.java} | 8 ++++----
.../jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml | 2 +-
.../jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml | 2 +-
.../src/main/webapp/WEB-INF/web.xml | 2 +-
.../jspwiki-it-test-custom-jdbc/src/main/webapp/WEB-INF/web.xml | 2 +-
.../jspwiki-it-test-custom/src/main/webapp/WEB-INF/web.xml | 2 +-
jspwiki-main/src/test/resources/WEB-INF/web.xml | 2 +-
jspwiki-war/src/main/webapp/WEB-INF/web.xml | 2 +-
9 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/jspwiki-bootstrap/src/main/java/org/apache/wiki/bootstrap/WikiSPIServletContextListener.java b/jspwiki-bootstrap/src/main/java/org/apache/wiki/bootstrap/WikiBootstrapServletContextListener.java
similarity index 97%
rename from jspwiki-bootstrap/src/main/java/org/apache/wiki/bootstrap/WikiSPIServletContextListener.java
rename to jspwiki-bootstrap/src/main/java/org/apache/wiki/bootstrap/WikiBootstrapServletContextListener.java
index 172c140..f8731d2 100644
--- a/jspwiki-bootstrap/src/main/java/org/apache/wiki/bootstrap/WikiSPIServletContextListener.java
+++ b/jspwiki-bootstrap/src/main/java/org/apache/wiki/bootstrap/WikiBootstrapServletContextListener.java
@@ -28,7 +28,7 @@ import javax.servlet.ServletContextListener;
import java.util.Properties;
-public class WikiSPIServletContextListener implements ServletContextListener {
+public class WikiBootstrapServletContextListener implements ServletContextListener {
/** {@inheritDoc} */
@Override
diff --git a/jspwiki-bootstrap/src/test/java/org/apache/wiki/bootstrap/WikiSPIServletContextListenerTest.java b/jspwiki-bootstrap/src/test/java/org/apache/wiki/bootstrap/WikiBootstrapServletContextListenerTest.java
similarity index 85%
rename from jspwiki-bootstrap/src/test/java/org/apache/wiki/bootstrap/WikiSPIServletContextListenerTest.java
rename to jspwiki-bootstrap/src/test/java/org/apache/wiki/bootstrap/WikiBootstrapServletContextListenerTest.java
index 7193f46..42aa2e1 100644
--- a/jspwiki-bootstrap/src/test/java/org/apache/wiki/bootstrap/WikiSPIServletContextListenerTest.java
+++ b/jspwiki-bootstrap/src/test/java/org/apache/wiki/bootstrap/WikiBootstrapServletContextListenerTest.java
@@ -30,7 +30,7 @@ import java.util.Properties;
@ExtendWith( MockitoExtension.class )
-public class WikiSPIServletContextListenerTest {
+public class WikiBootstrapServletContextListenerTest {
@Mock
ServletContext sc;
@@ -38,7 +38,7 @@ public class WikiSPIServletContextListenerTest {
@Test
public void testWikiInit() {
final ServletContextEvent sce = new ServletContextEvent( sc );
- final WikiSPIServletContextListener listener = new WikiSPIServletContextListener();
+ final WikiBootstrapServletContextListener listener = new WikiBootstrapServletContextListener();
final Properties properties = listener.initWikiSPIs( sce );
Assertions.assertEquals( 5, properties.size() );
@@ -46,7 +46,7 @@ public class WikiSPIServletContextListenerTest {
@Test
public void testLoggingFrameworkInit() {
- final WikiSPIServletContextListener listener = new WikiSPIServletContextListener();
+ final WikiBootstrapServletContextListener listener = new WikiBootstrapServletContextListener();
final Properties properties = new Properties();
Assertions.assertTrue( listener.initWikiLoggingFramework( properties ) );
@@ -57,7 +57,7 @@ public class WikiSPIServletContextListenerTest {
@Test
public void testServletContextListenerLifeCycle() {
final ServletContextEvent sce = new ServletContextEvent( sc );
- final WikiSPIServletContextListener listener = new WikiSPIServletContextListener();
+ final WikiBootstrapServletContextListener listener = new WikiBootstrapServletContextListener();
Assertions.assertDoesNotThrow( () -> listener.contextInitialized( sce ) );
Assertions.assertDoesNotThrow( () -> listener.contextDestroyed( sce ) );
}
diff --git a/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml b/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml
index 4076ec4..618a204 100644
--- a/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-cma-jdbc/src/main/webapp/WEB-INF/web.xml
@@ -102,7 +102,7 @@
<!-- servlet context listener to configure API's SPI -->
<listener>
- <listener-class>org.apache.wiki.bootstrap.WikiSPIServletContextListener</listener-class>
+ <listener-class>org.apache.wiki.bootstrap.WikiBootstrapServletContextListener</listener-class>
</listener>
<!--
diff --git a/jspwiki-it-tests/jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml b/jspwiki-it-tests/jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml
index cbfcb34..b876d31 100644
--- a/jspwiki-it-tests/jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-cma/src/main/webapp/WEB-INF/web.xml
@@ -102,7 +102,7 @@
<!-- servlet context listener to configure API's SPI -->
<listener>
- <listener-class>org.apache.wiki.bootstrap.WikiSPIServletContextListener</listener-class>
+ <listener-class>org.apache.wiki.bootstrap.WikiBootstrapServletContextListener</listener-class>
</listener>
<!--
diff --git a/jspwiki-it-tests/jspwiki-it-test-custom-absolute-urls/src/main/webapp/WEB-INF/web.xml b/jspwiki-it-tests/jspwiki-it-test-custom-absolute-urls/src/main/webapp/WEB-INF/web.xml
index 811f6af..c4c37d5 100644
--- a/jspwiki-it-tests/jspwiki-it-test-custom-absolute-urls/src/main/webapp/WEB-INF/web.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-custom-absolute-urls/src/main/webapp/WEB-INF/web.xml
@@ -102,7 +102,7 @@
<!-- servlet context listener to configure API's SPI -->
<listener>
- <listener-class>org.apache.wiki.bootstrap.WikiSPIServletContextListener</listener-class>
+ <listener-class>org.apache.wiki.bootstrap.WikiBootstrapServletContextListener</listener-class>
</listener>
<!--
diff --git a/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/src/main/webapp/WEB-INF/web.xml b/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/src/main/webapp/WEB-INF/web.xml
index 811f6af..c4c37d5 100644
--- a/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/src/main/webapp/WEB-INF/web.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-custom-jdbc/src/main/webapp/WEB-INF/web.xml
@@ -102,7 +102,7 @@
<!-- servlet context listener to configure API's SPI -->
<listener>
- <listener-class>org.apache.wiki.bootstrap.WikiSPIServletContextListener</listener-class>
+ <listener-class>org.apache.wiki.bootstrap.WikiBootstrapServletContextListener</listener-class>
</listener>
<!--
diff --git a/jspwiki-it-tests/jspwiki-it-test-custom/src/main/webapp/WEB-INF/web.xml b/jspwiki-it-tests/jspwiki-it-test-custom/src/main/webapp/WEB-INF/web.xml
index 811f6af..c4c37d5 100644
--- a/jspwiki-it-tests/jspwiki-it-test-custom/src/main/webapp/WEB-INF/web.xml
+++ b/jspwiki-it-tests/jspwiki-it-test-custom/src/main/webapp/WEB-INF/web.xml
@@ -102,7 +102,7 @@
<!-- servlet context listener to configure API's SPI -->
<listener>
- <listener-class>org.apache.wiki.bootstrap.WikiSPIServletContextListener</listener-class>
+ <listener-class>org.apache.wiki.bootstrap.WikiBootstrapServletContextListener</listener-class>
</listener>
<!--
diff --git a/jspwiki-main/src/test/resources/WEB-INF/web.xml b/jspwiki-main/src/test/resources/WEB-INF/web.xml
index d7acc31..52a51a2 100644
--- a/jspwiki-main/src/test/resources/WEB-INF/web.xml
+++ b/jspwiki-main/src/test/resources/WEB-INF/web.xml
@@ -103,7 +103,7 @@
<!-- servlet context listener to configure API's SPI -->
<listener>
- <listener-class>org.apache.wiki.bootstrap.WikiSPIServletContextListener</listener-class>
+ <listener-class>org.apache.wiki.bootstrap.WikiBootstrapServletContextListener</listener-class>
</listener>
<!--
diff --git a/jspwiki-war/src/main/webapp/WEB-INF/web.xml b/jspwiki-war/src/main/webapp/WEB-INF/web.xml
index 0a64865..ed73743 100644
--- a/jspwiki-war/src/main/webapp/WEB-INF/web.xml
+++ b/jspwiki-war/src/main/webapp/WEB-INF/web.xml
@@ -96,7 +96,7 @@
<!-- servlet context listener to configure API's SPI -->
<listener>
- <listener-class>org.apache.wiki.bootstrap.WikiSPIServletContextListener</listener-class>
+ <listener-class>org.apache.wiki.bootstrap.WikiBootstrapServletContextListener</listener-class>
</listener>
<!--