From: Olivier Lamy Date: Mon, 13 Oct 2014 05:19:42 +0000 (+1100) Subject: make this servlet thread safe!! X-Git-Tag: archiva-2.2.0~83 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=70bc09fbb965a922808dcf77708fabdd4216455b;p=archiva.git make this servlet thread safe!! --- diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java index ddf22be14..bc26d3642 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/rss/RssFeedServlet.java @@ -78,8 +78,6 @@ public class RssFeedServlet private Logger log = LoggerFactory.getLogger( RssFeedServlet.class ); - private RssFeedProcessor processor; - private WebApplicationContext wac; private UserRepositories userRepositories; @@ -131,6 +129,8 @@ public class RssFeedServlet return; } + RssFeedProcessor processor = null; + try { Map map = new HashMap<>(); diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java index f11620ac9..54dab14ae 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java @@ -431,7 +431,7 @@ public class RssFeedServletTest } @Ignore - public void XXX_testInvalidRequest() + public void testInvalidRequest() throws Exception { //RssFeedServlet servlet = @@ -450,7 +450,7 @@ public class RssFeedServletTest } @Ignore - public void XXX_testInvalidAuthenticationRequest() + public void testInvalidAuthenticationRequest() throws Exception { //RssFeedServlet servlet = @@ -476,7 +476,7 @@ public class RssFeedServletTest } @Ignore - public void XXX_testUnauthorizedRequest() + public void testUnauthorizedRequest() throws Exception {