summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-05-17 19:25:20 +0200
committerEndi S. Dewata <edewata@redhat.com>2017-05-17 19:57:31 +0200
commitc6ed9679acba5d0072a16878ecf98e0843ab6a3a (patch)
treefa73f75713adc1cb8625000ae69310197ed9c886 /base
parente54873d6dbb95e82632f888b90dc6d0d7836ad4d (diff)
downloadpki-c6ed9679acba5d0072a16878ecf98e0843ab6a3a.tar.gz
pki-c6ed9679acba5d0072a16878ecf98e0843ab6a3a.tar.xz
pki-c6ed9679acba5d0072a16878ecf98e0843ab6a3a.zip
Refactored UpdateCRL.process() (part 1).
The UpdateCRL.process() has been refactored to reduce deeply nested if-statements with early return. https://pagure.io/dogtagpki/issue/2651 Change-Id: I507bf72e28c3ba0ab98f24466bac2a40f1e6b198
Diffstat (limited to 'base')
-rw-r--r--base/server/cms/src/com/netscape/cms/servlet/cert/UpdateCRL.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/base/server/cms/src/com/netscape/cms/servlet/cert/UpdateCRL.java b/base/server/cms/src/com/netscape/cms/servlet/cert/UpdateCRL.java
index d873b1a33..118292220 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/cert/UpdateCRL.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/cert/UpdateCRL.java
@@ -331,7 +331,11 @@ public class UpdateCRL extends CMSServlet {
header.addStringValue("crlIssuingPoint", crlIssuingPointId);
IPublisherProcessor lpm = mCA.getPublisherProcessor();
- if (crlIssuingPoint != null) {
+ if (crlIssuingPoint == null) {
+ CMS.debug("UpdateCRL: no CRL issuing point");
+ return;
+ }
+
if (clearCache != null && clearCache.equals("true") &&
crlIssuingPoint.isCRLGenerationEnabled() &&
crlIssuingPoint.isCRLUpdateInProgress() == ICRLIssuingPoint.CRL_UPDATE_DONE &&
@@ -523,7 +527,5 @@ public class UpdateCRL extends CMSServlet {
header.addStringValue("crlUpdate", "Scheduled");
}
}
- }
- return;
}
}