[Pki-devel] [PATCH] 0056 Avoid superfluous ConfigStore commit during profile creation
Fraser Tweedale
ftweedal at redhat.com
Mon Nov 23 06:04:25 UTC 2015
The attached patch is a drive-by improvement during analysis of
https://fedorahosted.org/pki/ticket/1700.
Thanks,
Fraser
-------------- next part --------------
From 8436f33d84e1dc3eb8fbefa8e5f174511547afbc Mon Sep 17 00:00:00 2001
From: Fraser Tweedale <ftweedal at redhat.com>
Date: Fri, 20 Nov 2015 16:15:06 +1100
Subject: [PATCH] Avoid superfluous ConfigStore commit during profile creation
Part of: https://fedorahosted.org/pki/ticket/1700
---
base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java b/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java
index a1dba8064314cd36179715272c80f1da2cbc6244..488dd5ab960fd45fa3dad0dd83398b4317f2cb4f 100644
--- a/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java
+++ b/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java
@@ -605,9 +605,8 @@ public class ProfileService extends PKIService implements ProfileResource {
// no error thrown, proceed with profile creation
profile = ps.createProfile(profileId, classId, className);
- profile.getConfigStore().commit(false);
profile.getConfigStore().load(new ByteArrayInputStream(data));
- ps.disableProfile(profileId);
+ ps.disableProfile(profileId); // also commits
auditProfileChange(
ScopeDef.SC_PROFILE_RULES,
--
2.4.3
More information about the Pki-devel
mailing list