From 70bc09fbb965a922808dcf77708fabdd4216455b Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Mon, 13 Oct 2014 16:19:42 +1100 Subject: [PATCH] make this servlet thread safe!! --- .../java/org/apache/archiva/web/rss/RssFeedServlet.java | 4 ++-- .../java/org/apache/archiva/web/rss/RssFeedServletTest.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 { -- 2.39.5