[Pki-devel] [PATCH] 0021..0023 Minor cleanups

Fraser Tweedale ftweedal at redhat.com
Wed Apr 15 02:17:43 UTC 2015


On Fri, Feb 20, 2015 at 03:24:14PM +1000, Fraser Tweedale wrote:
> I've been accumulating drive-by cleanups and other small supporting
> changes during my sub-CAs work.  To improve the signal-noise ratio
> and reduce the burden of reviewing the feature, I'm going to submit
> some of these cleanups separately for review/merge beforehand.
> 
> Here's the first few.

Ping.  These should be simple reviews.

> >From dafec603f047d4d91a90c8718d4280599f45c374 Mon Sep 17 00:00:00 2001
> From: Fraser Tweedale <frase at frase.id.au>
> Date: Wed, 28 Jan 2015 02:37:12 -0500
> Subject: [PATCH 21/23] Chain InvocationTargetException thrown during
>  PKCS10Attribute decoding
> 
> ---
>  base/util/src/netscape/security/pkcs/PKCS10Attribute.java | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/base/util/src/netscape/security/pkcs/PKCS10Attribute.java b/base/util/src/netscape/security/pkcs/PKCS10Attribute.java
> index 16c563b9e00402780cebc623c969b82248f9afbf..109990dfcc0c3ffe33540d01e1fe9f2b64d739a9 100644
> --- a/base/util/src/netscape/security/pkcs/PKCS10Attribute.java
> +++ b/base/util/src/netscape/security/pkcs/PKCS10Attribute.java
> @@ -129,7 +129,7 @@ public class PKCS10Attribute implements DerEncoder, Serializable {
>                  attributeValue = new ACertAttrSet(inAttrValue);
>              }
>          } catch (InvocationTargetException invk) {
> -            throw new IOException(invk.getTargetException().getMessage());
> +            throw new IOException(invk.getTargetException().getMessage(), invk);
>          } catch (Exception e) {
>              throw new IOException(e.toString());
>          }
> -- 
> 2.1.0
> 

> >From 9d97e153e4730a9c78425a3d9a9a37455999dcef Mon Sep 17 00:00:00 2001
> From: Fraser Tweedale <frase at frase.id.au>
> Date: Tue, 17 Feb 2015 23:24:07 -0500
> Subject: [PATCH 22/23] Remove unused RequestSubsystem constructor
> 
> ---
>  .../certsrv/request/IRequestSubsystem.java         | 28 ----------------------
>  .../netscape/cmscore/request/RequestSubsystem.java |  6 -----
>  2 files changed, 34 deletions(-)
> 
> diff --git a/base/common/src/com/netscape/certsrv/request/IRequestSubsystem.java b/base/common/src/com/netscape/certsrv/request/IRequestSubsystem.java
> index 969be8713a1667cbf95f885710ca1a1190ee9a8d..505b41e1eb34c7dac72396e99ccc4aeb1f0a5864 100644
> --- a/base/common/src/com/netscape/certsrv/request/IRequestSubsystem.java
> +++ b/base/common/src/com/netscape/certsrv/request/IRequestSubsystem.java
> @@ -64,34 +64,6 @@ public interface IRequestSubsystem {
>       *            A notifier object (optional). The notify() method of this object
>       *            is invoked when the request is completed (COMPLETE, REJECTED or
>       *            CANCELED states).
> -     * @exception EBaseException failed to retrieve request queue
> -     */
> -    public IRequestQueue
> -            getRequestQueue(String name, int increment, IPolicy p, IService s, INotify n)
> -                    throws EBaseException;
> -
> -    /**
> -     * Retrieves a request queue. This operation should only be done
> -     * once on each queue. For example, the RA subsystem should retrieve
> -     * its queue, and store it somewhere for use by related services, and
> -     * servlets.
> -     * <p>
> -     * WARNING: retrieving the same queue twice with result in multi-thread race conditions.
> -     * <p>
> -     *
> -     * @param name
> -     *            the name of the request queue. (Ex: "ca" "ra")
> -     * @param p
> -     *            A policy enforcement module. This object is called to make
> -     *            adjustments to the request, and decide whether it needs agent
> -     *            approval.
> -     * @param s
> -     *            The service object. This object actually performs the request
> -     *            after it is finalized and approved.
> -     * @param n
> -     *            A notifier object (optional). The notify() method of this object
> -     *            is invoked when the request is completed (COMPLETE, REJECTED or
> -     *            CANCELED states).
>       * @param pendingNotifier
>       *            A notifier object (optional). Like the 'n' argument, except the
>       *            notification happens if the request is made PENDING. May be the
> diff --git a/base/server/cmscore/src/com/netscape/cmscore/request/RequestSubsystem.java b/base/server/cmscore/src/com/netscape/cmscore/request/RequestSubsystem.java
> index 78d312851f13563a47d3f7480a2660a836fe2ff8..5867dde179dbb75273a538fd4a1892876c37a4b2 100644
> --- a/base/server/cmscore/src/com/netscape/cmscore/request/RequestSubsystem.java
> +++ b/base/server/cmscore/src/com/netscape/cmscore/request/RequestSubsystem.java
> @@ -79,12 +79,6 @@ public class RequestSubsystem
>      }
>  
>      public IRequestQueue
> -            getRequestQueue(String name, int increment, IPolicy p, IService s, INotify n)
> -                    throws EBaseException {
> -        return getRequestQueue(name, increment, p, s, n, null);
> -    }
> -
> -    public IRequestQueue
>              getRequestQueue(String name, int increment, IPolicy p, IService s, INotify n,
>                      INotify pendingNotifier)
>                      throws EBaseException {
> -- 
> 2.1.0
> 

> >From da9bc6ed7b5ca6ab7fb9af57f828b7ccd3a488ae Mon Sep 17 00:00:00 2001
> From: Fraser Tweedale <frase at frase.id.au>
> Date: Wed, 18 Feb 2015 02:04:15 -0500
> Subject: [PATCH 23/23] Remove duplicate getRequestQueue code
> 
> ---
>  base/server/cms/src/com/netscape/cms/profile/common/EnrollProfile.java | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfile.java b/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfile.java
> index fc17970b3765fc46c46d0f683ddc16ef9dcbe6fc..6f803ee948dbae4763db5b10e13f48bbd8b96d5f 100644
> --- a/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfile.java
> +++ b/base/server/cms/src/com/netscape/cms/profile/common/EnrollProfile.java
> @@ -334,8 +334,7 @@ public abstract class EnrollProfile extends BasicProfile
>          //   }
>          // }
>  
> -        IAuthority authority = getAuthority();
> -        IRequestQueue queue = authority.getRequestQueue();
> +        IRequestQueue queue = getRequestQueue();
>  
>          // this profile queues request that is authenticated
>          // by NoAuth
> -- 
> 2.1.0
> 

> _______________________________________________
> Pki-devel mailing list
> Pki-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/pki-devel




More information about the Pki-devel mailing list