You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/03/05 14:38:21 UTC
[camel] 02/02: Avoid NPE
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 <cl...@gmail.com>
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() {