From eb4d8d2bd66437a152767917e9078af85c562246 Mon Sep 17 00:00:00 2001
From: Adam Young <ayoung@redhat.com>
Date: Thu, 10 Nov 2011 11:24:16 -0500
Subject: [PATCH 13/14]     unnecessary block removal

    This patch removes all of the unneeded blocks that surrounded code cleaned up  with the dead code removal.

    https://bugzilla.redhat.com/show_bug.cgi?id=728303
---
 .../com/netscape/cms/authentication/CMCAuth.java   |    6 +-
 .../com/netscape/cms/logging/RollingLogFile.java   |    4 +-
 .../profile/def/AuthTokenSubjectNameDefault.java   |    4 +-
 .../def/nsTokenUserKeySubjectNameDefault.java      |    8 +--
 .../netscape/cms/servlet/cert/CloneRedirect.java   |   18 +++---
 .../com/netscape/cms/servlet/cert/DisplayCRL.java  |   18 +++---
 .../cms/servlet/csadmin/ConfigHSMLoginPanel.java   |   64 ++++++++++----------
 .../netscape/cms/servlet/csadmin/GetCookie.java    |    8 +--
 .../cms/servlet/csadmin/MainPageServlet.java       |    8 +--
 .../cms/servlet/csadmin/UpdateNumberRange.java     |   14 ++---
 .../netscape/cms/servlet/ocsp/AddCAServlet.java    |   18 +++---
 .../cms/servlet/ocsp/CheckCertServlet.java         |   18 +++---
 .../netscape/cms/servlet/ocsp/ListCAServlet.java   |   18 +++---
 .../netscape/cms/servlet/ocsp/RemoveCAServlet.java |   18 +++---
 .../com/netscape/cmscore/dbs/KeyRecordList.java    |    4 +-
 .../src/com/netscape/cmstools/CMCEnroll.java       |   12 ++--
 .../src/com/netscape/kra/EnrollmentService.java    |   14 ++---
 .../src/com/netscape/kra/KeyRecoveryAuthority.java |    4 +-
 18 files changed, 111 insertions(+), 147 deletions(-)

diff --git a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
index b7f7fb346c0c3eff13c3cdbbbdd2a081abc35c89..fef68c1cb63dfada60af1996b3b5f07f89f0c7d7 100644
--- a/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
+++ b/pki/base/common/src/com/netscape/cms/authentication/CMCAuth.java
@@ -906,10 +906,8 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
                     // find from internaldb if it's ca. (ra does not have that.)
                     // find from internaldb usrgrp info
                     
-                    {
-                        // find from certDB
-                        si.verify(digest, id);
-                    }
+                    // find from certDB
+					si.verify(digest, id);
                     
                 } // 
             }
diff --git a/pki/base/common/src/com/netscape/cms/logging/RollingLogFile.java b/pki/base/common/src/com/netscape/cms/logging/RollingLogFile.java
index becd8a3b77d2544a6a6af7702106e00caa4a4d7f..2f97dcaac3d4173a9c237333842896a850acc526 100644
--- a/pki/base/common/src/com/netscape/cms/logging/RollingLogFile.java
+++ b/pki/base/common/src/com/netscape/cms/logging/RollingLogFile.java
@@ -321,9 +321,7 @@ public class RollingLogFile extends LogFile {
         if (index != -1) { // "/"  exist in fileName
             pathName = fileName.substring(0, index);
             baseName = fileName.substring(index + 1);
-            {
-                dirName = dirName.concat("/" + pathName);
-            }
+            dirName = dirName.concat("/" + pathName);
         }else { // "/" NOT exist in fileName
             baseName = fileName;
         }
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/AuthTokenSubjectNameDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/AuthTokenSubjectNameDefault.java
index 52c588a8133c4e643966c3652560f8b31d7bec80..a308e2ebfcc6cea292fe33178c2bd03dc5400777 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/AuthTokenSubjectNameDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/AuthTokenSubjectNameDefault.java
@@ -79,9 +79,7 @@ public class AuthTokenSubjectNameDefault extends EnrollDefault {
 
             try {
                 x500name = new X500Name(value);
-                {
-                    CMS.debug("AuthTokenSubjectNameDefault: setValue x500name=" + x500name.toString());
-                }
+                CMS.debug("AuthTokenSubjectNameDefault: setValue x500name=" + x500name.toString());
             } catch (IOException e) {
                 CMS.debug("AuthTokenSubjectNameDefault: setValue " + 
                     e.toString());
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/nsTokenUserKeySubjectNameDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/nsTokenUserKeySubjectNameDefault.java
index d364037585b2764173ddcc69135acc88e7ba5782..ac98a0cbb892c189eefe108020cc36db5bf3b742 100644
--- a/pki/base/common/src/com/netscape/cms/profile/def/nsTokenUserKeySubjectNameDefault.java
+++ b/pki/base/common/src/com/netscape/cms/profile/def/nsTokenUserKeySubjectNameDefault.java
@@ -429,11 +429,9 @@ ldapInit();
                        request.setExtData(mLdapStringAttrs[i], escapeValueRfc1779(sla[0], false).toString());
                }
             }
-            {
-                CMS.debug("pattern = "+pattern);
-                sbjname = mapPattern(request, pattern);
-                CMS.debug("nsTokenUserKeySubjectNameDefault: getSubjectName(): subject name mapping done");
-            }
+            CMS.debug("pattern = "+pattern);
+			sbjname = mapPattern(request, pattern);
+			CMS.debug("nsTokenUserKeySubjectNameDefault: getSubjectName(): subject name mapping done");
             CMS.debug("nsTokenUserKeySubjectNameDefault: getSubjectName(): attributes set in request");
 
         } catch (Exception e) {
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/CloneRedirect.java b/pki/base/common/src/com/netscape/cms/servlet/cert/CloneRedirect.java
index 0bc7e2061ea724f4e62c8524b5ea0e7808d25cad..2f58e85cd8a445300202e62776f4c9d3154f4c82 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/CloneRedirect.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/CloneRedirect.java
@@ -124,16 +124,14 @@ public class CloneRedirect extends CMSServlet {
         try {
             ServletOutputStream out = resp.getOutputStream();
 
-            {
-                String xmlOutput = req.getParameter("xml");
-                if (xmlOutput != null && xmlOutput.equals("true")) {
-                  outputXML(resp, argSet);
-                } else {
-                  resp.setContentType("text/html");
-                  form.renderOutput(out, argSet);
-                  cmsReq.setStatus(CMSRequest.SUCCESS);
-                }
-            }
+            String xmlOutput = req.getParameter("xml");
+			if (xmlOutput != null && xmlOutput.equals("true")) {
+			  outputXML(resp, argSet);
+			} else {
+			  resp.setContentType("text/html");
+			  form.renderOutput(out, argSet);
+			  cmsReq.setStatus(CMSRequest.SUCCESS);
+			}
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, 
                 CMS.getLogMessage("ADMIN_SRVLT_ERR_STREAM_TEMPLATE", e.toString()));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java
index 94c4738c19f4d883a560b95a004c2cab1ee81e34..cc21ab3de39469fdcdd4c0ef95cc83448253a2f3 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/cert/DisplayCRL.java
@@ -149,16 +149,14 @@ public class DisplayCRL extends CMSServlet {
         try {
             ServletOutputStream out = resp.getOutputStream();
 
-            {
-                String xmlOutput = req.getParameter("xml");
-                if (xmlOutput != null && xmlOutput.equals("true")) {
-                  outputXML(resp, argSet);
-                } else {
-                  resp.setContentType("text/html");
-                  form.renderOutput(out, argSet);
-                  cmsReq.setStatus(CMSRequest.SUCCESS);
-                }
-            }
+            String xmlOutput = req.getParameter("xml");
+			if (xmlOutput != null && xmlOutput.equals("true")) {
+			  outputXML(resp, argSet);
+			} else {
+			  resp.setContentType("text/html");
+			  form.renderOutput(out, argSet);
+			  cmsReq.setStatus(CMSRequest.SUCCESS);
+			}
         } catch (IOException e) {
             log(ILogger.LL_FAILURE, 
                 CMS.getLogMessage("CMSGW_ERR_BAD_SERV_OUT_STREAM", e.toString()));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMLoginPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMLoginPanel.java
index d8db2f66a86464271c9d90735f92f449afd02103..d04fbf2f1be9dbb80bf06b7450f98ce0c521b774 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMLoginPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/ConfigHSMLoginPanel.java
@@ -156,39 +156,37 @@ public class ConfigHSMLoginPanel extends WizardPanelBase {
 
         password = new Password(tokPwd.toCharArray());
 
-        {
-            try {
-                if (token.passwordIsInitialized()) {
-                    CMS.debug(
-                            "ConfigHSMLoginPanel: loginToken():token password is initialized");
-                    if (!token.isLoggedIn()) {
-                        CMS.debug(
-                                "ConfigHSMLoginPanel: loginToken():Token is not logged in, try it");
-                        token.login(password);
-                        context.put("status", "justLoggedIn");
-                    } else {
-                        CMS.debug(
-                                "ConfigHSMLoginPanel:Token has already logged on");
-                        context.put("status", "alreadyLoggedIn");
-                    }
-                } else {
-                    CMS.debug(
-                            "ConfigHSMLoginPanel: loginToken():Token password not initialized");
-                    context.put("status", "tokenPasswordNotInitialized");
-                    rv = false;
-                }
-		
-            } catch (IncorrectPasswordException e) {
-                context.put("status", "incorrectPassword");
-                context.put("errorString", e.toString());
-                CMS.debug("ConfigHSMLoginPanel: loginToken():" + e.toString());
-                rv = false;
-            } catch (Exception e) {
-                CMS.debug("ConfigHSMLoginPanel: loginToken():" + e.toString());
-                context.put("errorString", e.toString());
-                rv = false;
-            }
-        }
+        try {
+		    if (token.passwordIsInitialized()) {
+		        CMS.debug(
+		                "ConfigHSMLoginPanel: loginToken():token password is initialized");
+		        if (!token.isLoggedIn()) {
+		            CMS.debug(
+		                    "ConfigHSMLoginPanel: loginToken():Token is not logged in, try it");
+		            token.login(password);
+		            context.put("status", "justLoggedIn");
+		        } else {
+		            CMS.debug(
+		                    "ConfigHSMLoginPanel:Token has already logged on");
+		            context.put("status", "alreadyLoggedIn");
+		        }
+		    } else {
+		        CMS.debug(
+		                "ConfigHSMLoginPanel: loginToken():Token password not initialized");
+		        context.put("status", "tokenPasswordNotInitialized");
+		        rv = false;
+		    }
+
+		} catch (IncorrectPasswordException e) {
+		    context.put("status", "incorrectPassword");
+		    context.put("errorString", e.toString());
+		    CMS.debug("ConfigHSMLoginPanel: loginToken():" + e.toString());
+		    rv = false;
+		} catch (Exception e) {
+		    CMS.debug("ConfigHSMLoginPanel: loginToken():" + e.toString());
+		    context.put("errorString", e.toString());
+		    rv = false;
+		}
         return rv;
     }
 
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCookie.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCookie.java
index 43f3f956a39be30df891e4a10a04da7bba995cf3..c02655ec019e4adc35f65ce49e9a588412cd422a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCookie.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/GetCookie.java
@@ -249,11 +249,9 @@ public class GetCookie extends CMSServlet {
                         try {
                             ServletOutputStream out = httpResp.getOutputStream();
 
-                            {
-                                cmsReq.setStatus(CMSRequest.SUCCESS);
-                                httpResp.setContentType("text/html");
-                                form.renderOutput(out, argSet);
-                            }
+                            cmsReq.setStatus(CMSRequest.SUCCESS);
+							httpResp.setContentType("text/html");
+							form.renderOutput(out, argSet);
                         } catch (IOException e) {
                             log(ILogger.LL_FAILURE,
                                 CMS.getLogMessage("CMSGW_ERR_OUT_STREAM_TEMPLATE", e.toString()));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/MainPageServlet.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/MainPageServlet.java
index b0eff4405a9638086c2d78ba566fdbf15f9007c5..31b76ee6ead1ddb86a450db9c4433437a7a26c18 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/MainPageServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/MainPageServlet.java
@@ -85,11 +85,9 @@ public class MainPageServlet extends CMSServlet {
         try {
             ServletOutputStream out = response.getOutputStream();
 
-            {
-                cmsReq.setStatus(CMSRequest.SUCCESS);
-                response.setContentType("text/html");
-                form.renderOutput(out, argSet);
-            }
+            cmsReq.setStatus(CMSRequest.SUCCESS);
+			response.setContentType("text/html");
+			form.renderOutput(out, argSet);
         } catch (IOException e) {
             log(ILogger.LL_FAILURE,
                 CMS.getLogMessage("CMSGW_ERR_OUT_STREAM_TEMPLATE", e.toString()));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateNumberRange.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateNumberRange.java
index b2bf21be44ffe6c842467e875b13e20807a7784a..013d09208827c8f859d46d699c0a1aed9111b12b 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateNumberRange.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/UpdateNumberRange.java
@@ -187,14 +187,12 @@ public class UpdateNumberRange extends CMSServlet {
             if (beginNum.compareTo(repo.getTheSerialNumber()) < 0) {
                 String nextEndNumStr = cs.getString(nextEndConfig, "");
                 BigInteger endNum2 = new BigInteger(nextEndNumStr, radix);
-                {
-                    CMS.debug("Transferring from the end of on-deck range");
-                    String newValStr = endNum2.subtract(decrement).toString(radix);
-                    repo.setNextMaxSerial(newValStr);
-                    cs.putString(nextEndConfig, newValStr);
-                    beginNum = endNum2.subtract(decrement).add(oneNum);
-                    endNum = endNum2;
-                }
+                CMS.debug("Transferring from the end of on-deck range");
+				String newValStr = endNum2.subtract(decrement).toString(radix);
+				repo.setNextMaxSerial(newValStr);
+				cs.putString(nextEndConfig, newValStr);
+				beginNum = endNum2.subtract(decrement).add(oneNum);
+				endNum = endNum2;
             } else {
                 CMS.debug("Transferring from the end of the current range");
                 String newValStr = beginNum.subtract(oneNum).toString(radix);
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java
index 939a0af75d5627faad880daec2d936207d62f0ca..5c5eb56624d7e7f2bfbcb5b9c1c79d84fb972652 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java
@@ -292,16 +292,14 @@ public class AddCAServlet extends CMSServlet {
             ServletOutputStream out = resp.getOutputStream();
             String error = null;
 
-            {
-                String xmlOutput = req.getParameter("xml");
-                if (xmlOutput != null && xmlOutput.equals("true")) {
-                  outputXML(resp, argSet);
-                } else {
-                  resp.setContentType("text/html");
-                  form.renderOutput(out, argSet);
-                  cmsReq.setStatus(CMSRequest.SUCCESS);
-                }
-            }
+            String xmlOutput = req.getParameter("xml");
+			if (xmlOutput != null && xmlOutput.equals("true")) {
+			  outputXML(resp, argSet);
+			} else {
+			  resp.setContentType("text/html");
+			  form.renderOutput(out, argSet);
+			  cmsReq.setStatus(CMSRequest.SUCCESS);
+			}
         } catch (IOException e) {
             log(ILogger.LL_FAILURE,
                 CMS.getLogMessage("CMSGW_ERR_STREAM_TEMPLATE", e.toString()));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java
index 57ec1cc84881b15e1ae5b87afa7f8be179b55cee..d976a4d54c5742ce805b102d18eac7db31690563 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/CheckCertServlet.java
@@ -196,16 +196,14 @@ public class CheckCertServlet extends CMSServlet {
             ServletOutputStream out = resp.getOutputStream();
             String error = null;
 
-            {
-                String xmlOutput = req.getParameter("xml");
-                if (xmlOutput != null && xmlOutput.equals("true")) {
-                  outputXML(resp, argSet);
-                } else {
-                  resp.setContentType("text/html");
-                  form.renderOutput(out, argSet);
-                  cmsReq.setStatus(CMSRequest.SUCCESS);
-                }
-            }
+            String xmlOutput = req.getParameter("xml");
+			if (xmlOutput != null && xmlOutput.equals("true")) {
+			  outputXML(resp, argSet);
+			} else {
+			  resp.setContentType("text/html");
+			  form.renderOutput(out, argSet);
+			  cmsReq.setStatus(CMSRequest.SUCCESS);
+			}
         } catch (IOException e) {
             log(ILogger.LL_FAILURE,
                 CMS.getLogMessage("CMSGW_ERR_STREAM_TEMPLATE", e.toString()));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java
index 931031a756a3b8ce37efb5b46dff3712c5fc879f..c217acd8524305ccc4b91e19bbeb3a2fc00989a3 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/ListCAServlet.java
@@ -180,16 +180,14 @@ public class ListCAServlet extends CMSServlet {
             ServletOutputStream out = resp.getOutputStream();
             String error = null;
 
-            {
-                String xmlOutput = req.getParameter("xml");
-                if (xmlOutput != null && xmlOutput.equals("true")) {
-                  outputXML(resp, argSet);
-                } else {
-                  resp.setContentType("text/html");
-                  form.renderOutput(out, argSet);
-                  cmsReq.setStatus(CMSRequest.SUCCESS);
-                }
-            }
+            String xmlOutput = req.getParameter("xml");
+			if (xmlOutput != null && xmlOutput.equals("true")) {
+			  outputXML(resp, argSet);
+			} else {
+			  resp.setContentType("text/html");
+			  form.renderOutput(out, argSet);
+			  cmsReq.setStatus(CMSRequest.SUCCESS);
+			}
         } catch (IOException e) {
             log(ILogger.LL_FAILURE,
                 CMS.getLogMessage("CMSGW_ERR_STREAM_TEMPLATE", e.toString()));
diff --git a/pki/base/common/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java b/pki/base/common/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java
index bc9612e4c7920db39a53d0f2767f1756f5218115..93df589114879cfddb5f56bd307dd579b9b2028e 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java
@@ -198,16 +198,14 @@ public class RemoveCAServlet extends CMSServlet {
             ServletOutputStream out = resp.getOutputStream();
             String error = null;
 
-            {
-                String xmlOutput = req.getParameter("xml");
-                if (xmlOutput != null && xmlOutput.equals("true")) {
-                  outputXML(resp, argSet);
-                } else {
-                  resp.setContentType("text/html");
-                  form.renderOutput(out, argSet);
-                  cmsReq.setStatus(CMSRequest.SUCCESS);
-                }
-            }
+            String xmlOutput = req.getParameter("xml");
+			if (xmlOutput != null && xmlOutput.equals("true")) {
+			  outputXML(resp, argSet);
+			} else {
+			  resp.setContentType("text/html");
+			  form.renderOutput(out, argSet);
+			  cmsReq.setStatus(CMSRequest.SUCCESS);
+			}
         } catch (IOException e) {
             log(ILogger.LL_FAILURE,
                 CMS.getLogMessage("CMSGW_ERR_STREAM_TEMPLATE", e.toString()));
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java
index d672b51578cf823bf96cc389b8b2a9e8ddbe2e7e..f4882ffc40ce9f08c0a5fc72032faaf9c37aa7e0 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/KeyRecordList.java
@@ -84,8 +84,6 @@ public class KeyRecordList implements IKeyRecordList {
                 entries.addElement(element);
             }
         }
-        {
-            return entries.elements();
-        }
+        return entries.elements();
     }
 }
diff --git a/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java b/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java
index 7298fd2b399c40defe2797ef87ae03200e13f985..368ef8278bc937411142be5e94e207f60a6e709d 100644
--- a/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java
+++ b/pki/base/java-tools/src/com/netscape/cmstools/CMCEnroll.java
@@ -288,14 +288,12 @@ public class CMCEnroll {
             ByteArrayOutputStream bs = new ByteArrayOutputStream();
             PrintStream ps = new PrintStream(bs);
             
-            {
-                // format is PR_REQUEST_CMC
-                ByteArrayOutputStream os = new ByteArrayOutputStream();
+            // format is PR_REQUEST_CMC
+			ByteArrayOutputStream os = new ByteArrayOutputStream();
 
-                fullEnrollmentReq.encode(os);
-                ps.print(com.netscape.osutil.OSUtil.BtoA(os.toByteArray()));
-                //fullEnrollmentReq.print(ps); // no header/trailer
-            }
+			fullEnrollmentReq.encode(os);
+			ps.print(com.netscape.osutil.OSUtil.BtoA(os.toByteArray()));
+			//fullEnrollmentReq.print(ps); // no header/trailer
             asciiBASE64Blob = bs.toString();
         } catch (Exception e) {
             e.printStackTrace();
diff --git a/pki/base/kra/src/com/netscape/kra/EnrollmentService.java b/pki/base/kra/src/com/netscape/kra/EnrollmentService.java
index 8f9a08b29ee47982ea43d5c605279a98a5f4deba..397793bfcdefbc4c303c074ecc20b705580cdf2f 100644
--- a/pki/base/kra/src/com/netscape/kra/EnrollmentService.java
+++ b/pki/base/kra/src/com/netscape/kra/EnrollmentService.java
@@ -774,15 +774,13 @@ public class EnrollmentService implements IService {
             }
         }
 
-        {
-            key = key.trim();
+        key = key.trim();
 
-            if (key.equals("")) {
-                return ILogger.SIGNED_AUDIT_EMPTY_VALUE;
-            } else {
-                return key;
-            }
-        }
+		if (key.equals("")) {
+		    return ILogger.SIGNED_AUDIT_EMPTY_VALUE;
+		} else {
+		    return key;
+		}
     }
     /**
      * Signed Audit Log Subject ID
diff --git a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
index 50819f7d79e963af26cfcabbcfb1baa6d17a3075..230a2240f18bb847d26417e284f83d1ac8a1c4d1 100644
--- a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
+++ b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java
@@ -1688,9 +1688,7 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove
             }
         }
 
-        {
-            return ILogger.SIGNED_AUDIT_EMPTY_VALUE;
-        }
+        return ILogger.SIGNED_AUDIT_EMPTY_VALUE;
     }
 
     /**
-- 
1.7.7

