This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit fc9413af2cf8dab2c74754dc9eabd8de235a45ff
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Mar 5 15:37:48 2021 +0100

    Avoid NPE
---
 .../test/java/org/apache/camel/oaipmh/utils/MockOaipmhServer.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-oaipmh/src/test/java/org/apache/camel/oaipmh/utils/MockOaipmhServer.java
 
b/components/camel-oaipmh/src/test/java/org/apache/camel/oaipmh/utils/MockOaipmhServer.java
index de7349b..eed6792 100644
--- 
a/components/camel-oaipmh/src/test/java/org/apache/camel/oaipmh/utils/MockOaipmhServer.java
+++ 
b/components/camel-oaipmh/src/test/java/org/apache/camel/oaipmh/utils/MockOaipmhServer.java
@@ -103,7 +103,10 @@ public final class MockOaipmhServer {
     }
 
     public void stop() {
-        server.stop();
+        if (server != null) {
+            server.stop();
+            server = null;
+        }
     }
 
     public int getHttpPort() {

Reply via email to