diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-04-05 14:49:11 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-04-09 10:03:25 -0500 |
commit | 7c7b9d023cd466c1771068badc020dab36beb553 (patch) | |
tree | 178877eb83e25336be7577953945fbdb0b9e1a15 /base/common/src/com/netscape/cms/servlet/base | |
parent | da1e6e2f49f66fd46c8039ff1aa4386309fba8f4 (diff) | |
download | pki-7c7b9d023cd466c1771068badc020dab36beb553.tar.gz pki-7c7b9d023cd466c1771068badc020dab36beb553.tar.xz pki-7c7b9d023cd466c1771068badc020dab36beb553.zip |
Removed whitespaces from Java code.
Whitespaces in Java code have been removed with the following command:
find . -not -path .git -name *.java -exec sed -i 's/[[:blank:]]\+$//' {} \;
Ticket #134
Diffstat (limited to 'base/common/src/com/netscape/cms/servlet/base')
12 files changed, 75 insertions, 75 deletions
diff --git a/base/common/src/com/netscape/cms/servlet/base/CMSResourceService.java b/base/common/src/com/netscape/cms/servlet/base/CMSResourceService.java index 24c3cd74d..36f33b6f8 100644 --- a/base/common/src/com/netscape/cms/servlet/base/CMSResourceService.java +++ b/base/common/src/com/netscape/cms/servlet/base/CMSResourceService.java @@ -32,9 +32,9 @@ import com.netscape.cms.servlet.cert.model.CertificateData; /** * Base class for CMS RESTful resources - * + * * @author alee - * + * */ public class CMSResourceService { diff --git a/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java b/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java index c0931ee2f..f1de3ce4a 100644 --- a/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java +++ b/base/common/src/com/netscape/cms/servlet/base/CMSServlet.java @@ -101,7 +101,7 @@ import com.netscape.cmsutil.xml.XMLObject; /** * This is the base class of all CS servlet. - * + * * @version $Revision$, $Date$ */ public abstract class CMSServlet extends HttpServlet { @@ -132,7 +132,7 @@ public abstract class CMSServlet extends HttpServlet { private final static String FAILED = "1"; private final static String HDR_LANG = "accept-language"; - // final error message - if error and exception templates don't work + // final error message - if error and exception templates don't work // send out this text string directly to output. public final static String PROP_FINAL_ERROR_MSG = "finalErrorMsg"; @@ -206,7 +206,7 @@ public abstract class CMSServlet extends HttpServlet { public static final String CERT_ATTR = "javax.servlet.request.X509Certificate"; - // members. + // members. protected boolean mRenderResult = true; protected String mFinalErrorMsg = FINAL_ERROR_MSG; @@ -222,7 +222,7 @@ public abstract class CMSServlet extends HttpServlet { protected String mId = null; protected IConfigStore mConfig = null; - // the authority, RA, CA, KRA this servlet is serving. + // the authority, RA, CA, KRA this servlet is serving. protected IAuthority mAuthority = null; protected IRequestQueue mRequestQueue = null; @@ -317,7 +317,7 @@ public abstract class CMSServlet extends HttpServlet { } try { - // get final error message. + // get final error message. // used when templates can't even be loaded. String eMsg = sc.getInitParameter(PROP_FINAL_ERROR_MSG); @@ -350,12 +350,12 @@ public abstract class CMSServlet extends HttpServlet { } } - // get http params NOT to store in a IRequest and - // get http headers TO store in a IRequest. + // get http params NOT to store in a IRequest and + // get http headers TO store in a IRequest. getDontSaveHttpParams(sc); getSaveHttpHeaders(sc); } catch (Exception e) { - // should never occur since we provide defaults above. + // should never occur since we provide defaults above. log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSGW_ERR_CONF_TEMP_PARAMS", e.toString())); @@ -393,7 +393,7 @@ public abstract class CMSServlet extends HttpServlet { while (paramNames.hasMoreElements()) { String pn = (String) paramNames.nextElement(); // added this facility so that password can be hidden, - // all sensitive parameters should be prefixed with + // all sensitive parameters should be prefixed with // __ (double underscores); however, in the event that // a security parameter slips through, we perform multiple // additional checks to insure that it is NOT displayed @@ -447,10 +447,10 @@ public abstract class CMSServlet extends HttpServlet { } CMS.debug("CMSServlet: " + mId + " start to service."); - // get a cms request + // get a cms request CMSRequest cmsRequest = newCMSRequest(); - // set argblock + // set argblock cmsRequest.setHttpParams(CMS.createArgBlock("http-request-params", toHashtable(httpReq))); // set http request @@ -522,7 +522,7 @@ public abstract class CMSServlet extends HttpServlet { /** * Create a new CMSRequest object. This should be overriden by servlets * implementing different types of request - * + * * @return a new CMSRequest object */ protected CMSRequest newCMSRequest() { @@ -532,7 +532,7 @@ public abstract class CMSServlet extends HttpServlet { /** * process an HTTP request. Servlets must override this with their * own implementation - * + * * @throws EBaseException if the servlet was unable to satisfactorily * process the request */ @@ -544,7 +544,7 @@ public abstract class CMSServlet extends HttpServlet { * Output a template. * If an error occurs while outputing the template the exception template * is used to display the error. - * + * * @param cmsReq the CS request */ protected void renderResult(CMSRequest cmsReq) @@ -688,7 +688,7 @@ public abstract class CMSServlet extends HttpServlet { * In others if an exception occurs while rendering the template the * exception template (this) is called. * <p> - * + * * @param cmsReq the CS request to pass to template filler if any. * @param e the unexpected exception */ @@ -705,8 +705,8 @@ public abstract class CMSServlet extends HttpServlet { // When an exception occurs the exit is non-local which probably // will leave the requestStatus value set to something other - // than CMSRequest.EXCEPTION, so force the requestStatus to - // EXCEPTION since it must be that if we're here. + // than CMSRequest.EXCEPTION, so force the requestStatus to + // EXCEPTION since it must be that if we're here. cmsReq.setStatus(CMSRequest.EXCEPTION); if (filler != null) { @@ -743,14 +743,14 @@ public abstract class CMSServlet extends HttpServlet { public void renderFinalError(CMSRequest cmsReq, Exception ex) throws IOException { - // this template is the last resort for all other unexpected - // errors in other templates so we can only output text. + // this template is the last resort for all other unexpected + // errors in other templates so we can only output text. HttpServletResponse httpResp = cmsReq.getHttpResp(); httpResp.setContentType("text/html"); ServletOutputStream out = httpResp.getOutputStream(); - // replace $ERRORMSG with exception message if included. + // replace $ERRORMSG with exception message if included. String finalErrMsg = mFinalErrorMsg; int tokenIdx = mFinalErrorMsg.indexOf(ERROR_MSG_TOKEN); @@ -772,10 +772,10 @@ public abstract class CMSServlet extends HttpServlet { /* try { - s = (SSLSocket) ((HTTPRequest) httpReq).getConnection().getSocket(); + s = (SSLSocket) ((HTTPRequest) httpReq).getConnection().getSocket(); } catch (ClassCastException e) { CMS.getLogger().log( - ILogger.EV_SYSTEM, ILogger.S_OTHER, ILogger.LL_WARN, + ILogger.EV_SYSTEM, ILogger.S_OTHER, ILogger.LL_WARN, CMS.getLogMessage("CMSGW_SSL_NO_INVALIDATE")); // ignore. return; @@ -831,7 +831,7 @@ public abstract class CMSServlet extends HttpServlet { mLogger.log(ILogger.EV_SYSTEM, ILogger.S_OTHER, ILogger.LL_INFO, CMS.getLogMessage("CMSGW_GETTING_SSL_CLIENT_CERT")); - // iws60 support Java Servlet Spec V2.2, attribute + // iws60 support Java Servlet Spec V2.2, attribute // javax.servlet.request.X509Certificate now contains array // of X509Certificates instead of one X509Certificate object X509Certificate[] allCerts = (X509Certificate[]) httpReq.getAttribute(CERT_ATTR); @@ -1125,7 +1125,7 @@ public abstract class CMSServlet extends HttpServlet { /** * instantiate a new filler from a class name, - * + * * @return null if can't be instantiated, new instance otherwise. */ protected ICMSTemplateFiller newFillerObject(String fillerClass) { @@ -1153,12 +1153,12 @@ public abstract class CMSServlet extends HttpServlet { */ protected void setDefaultTemplates(ServletConfig sc) { // Subclasses should override these for diff templates and params in - // their constructors. - // Set a template name to null to not use these standard ones. - // When template name is set to null nothing will be displayed. + // their constructors. + // Set a template name to null to not use these standard ones. + // When template name is set to null nothing will be displayed. // Servlet is assumed to have rendered its own output. - // The only exception is the unexpected error template where the - // default one will always be used if template name is null. + // The only exception is the unexpected error template where the + // default one will always be used if template name is null. String successTemplate = null; String errorTemplate = null; String unauthorizedTemplate = null; @@ -1237,7 +1237,7 @@ public abstract class CMSServlet extends HttpServlet { unexpectedErrorTemplate = "/" + gateway + unexpectedErrorTemplate; } } catch (Exception e) { - // this should never happen. + // this should never happen. log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSGW_IMP_INIT_SERV_ERR", e.toString(), mId)); @@ -1319,7 +1319,7 @@ public abstract class CMSServlet extends HttpServlet { private static final String IMPORT_CERT = "importCert"; private static final String IMPORT_CHAIN = "importCAChain"; private static final String IMPORT_CERT_MIME_TYPE = "importCertMimeType"; - // default mime type + // default mime type private static final String NS_X509_USER_CERT = "application/x-x509-user-cert"; private static final String NS_X509_EMAIL_CERT = "application/x-x509-email-cert"; @@ -1391,7 +1391,7 @@ public abstract class CMSServlet extends HttpServlet { caChain = ((ICertAuthority) mAuthority).getCACertChain(); caCerts = caChain.getChain(); - // set user + CA cert chain in pkcs7 + // set user + CA cert chain in pkcs7 X509CertImpl[] userChain = new X509CertImpl[caCerts.length + 1]; @@ -1511,7 +1511,7 @@ public abstract class CMSServlet extends HttpServlet { /** * make a CRL entry from a serial number and revocation reason. - * + * * @return a RevokedCertImpl that can be entered in a CRL. */ protected RevokedCertImpl formCRLEntry( @@ -1536,7 +1536,7 @@ public abstract class CMSServlet extends HttpServlet { /** * check if a certificate (serial number) is revoked on a CA. - * + * * @return true if cert is marked revoked in the CA's database. * @return false if cert is not marked revoked. */ @@ -1676,13 +1676,13 @@ public abstract class CMSServlet extends HttpServlet { /** * Authentication * <P> - * + * * <ul> * <li>signed.audit LOGGING_SIGNED_AUDIT_AUTH_FAIL used when authentication fails (in case of SSL-client auth, only * webserver env can pick up the SSL violation; CS authMgr can pick up cert mis-match, so this event is used) * <li>signed.audit LOGGING_SIGNED_AUDIT_AUTH_SUCCESS used when authentication succeeded * </ul> - * + * * @exception EBaseException an error has occurred */ public IAuthToken authenticate(HttpServletRequest httpReq, String authMgrName) @@ -1724,7 +1724,7 @@ public abstract class CMSServlet extends HttpServlet { // // check authentication by auth manager if any. - // + // if (authMgrName == null) { // Fixed Blackflag Bug #613900: Since this code block does @@ -1873,14 +1873,14 @@ public abstract class CMSServlet extends HttpServlet { /** * Authorize must occur after Authenticate * <P> - * + * * <ul> * <li>signed.audit LOGGING_SIGNED_AUDIT_AUTHZ_FAIL used when authorization has failed * <li>signed.audit LOGGING_SIGNED_AUDIT_AUTHZ_SUCCESS used when authorization is successful * <li>signed.audit LOGGING_SIGNED_AUDIT_ROLE_ASSUME used when user assumes a role (in current CS that's when one * accesses a role port) * </ul> - * + * * @param authzMgrName string representing the name of the authorization * manager * @param authToken the authentication token @@ -2033,11 +2033,11 @@ public abstract class CMSServlet extends HttpServlet { /** * Signed Audit Log - * + * * This method is inherited by all extended "CMSServlet"s, * and is called to store messages to the signed audit log. * <P> - * + * * @param msg signed audit log message */ protected void audit(String msg) { @@ -2057,12 +2057,12 @@ public abstract class CMSServlet extends HttpServlet { /** * Signed Audit Log Subject ID - * + * * This method is inherited by all extended "CMSServlet"s, * and is called to obtain the "SubjectID" for * a signed audit log message. * <P> - * + * * @return id string containing the signed audit log message SubjectID */ protected String auditSubjectID() { @@ -2097,12 +2097,12 @@ public abstract class CMSServlet extends HttpServlet { /** * Signed Audit Log Group ID - * + * * This method is inherited by all extended "CMSServlet"s, * and is called to obtain the "gid" for * a signed audit log message. * <P> - * + * * @return id string containing the signed audit log message SubjectID */ protected String auditGroupID() { @@ -2137,11 +2137,11 @@ public abstract class CMSServlet extends HttpServlet { /** * Signed Audit Groups - * + * * This method is called to extract all "groups" associated * with the "auditSubjectID()". * <P> - * + * * @param SubjectID string containing the signed audit log message SubjectID * @return a delimited string of groups associated * with the "auditSubjectID()" diff --git a/base/common/src/com/netscape/cms/servlet/base/CMSStartServlet.java b/base/common/src/com/netscape/cms/servlet/base/CMSStartServlet.java index 4bfc74607..6f9f43d3a 100644 --- a/base/common/src/com/netscape/cms/servlet/base/CMSStartServlet.java +++ b/base/common/src/com/netscape/cms/servlet/base/CMSStartServlet.java @@ -34,7 +34,7 @@ import com.netscape.cmsutil.util.Utils; /** * This servlet is started by the web server at startup, and * it starts the CMS framework. - * + * * @version $Revision$, $Date$ */ public class CMSStartServlet extends HttpServlet { diff --git a/base/common/src/com/netscape/cms/servlet/base/DisplayHtmlServlet.java b/base/common/src/com/netscape/cms/servlet/base/DisplayHtmlServlet.java index 54e453f30..a6cb97908 100644 --- a/base/common/src/com/netscape/cms/servlet/base/DisplayHtmlServlet.java +++ b/base/common/src/com/netscape/cms/servlet/base/DisplayHtmlServlet.java @@ -33,7 +33,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * This is the servlet that displays the html page for the corresponding input id. - * + * * @version $Revision$, $Date$ */ public class DisplayHtmlServlet extends CMSServlet { diff --git a/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java b/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java index 0bf726879..ceba2fc72 100644 --- a/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java +++ b/base/common/src/com/netscape/cms/servlet/base/DynamicVariablesServlet.java @@ -43,7 +43,7 @@ import com.netscape.certsrv.base.IConfigStore; * <p> * This allows the requestor (browser) to make decisions about what to present in the UI, depending on how CMS is * configured - * + * * @version $Revision$, $Date$ */ public class DynamicVariablesServlet extends CMSServlet { @@ -137,7 +137,7 @@ public class DynamicVariablesServlet extends CMSServlet { * <li>clacrlurl() - the URL to get the CRL from, in the case of a Clone CA. This is defined in the CMS * configuration parameter 'cloning.cloneMasterCrlUrl' * </ul> - * + * * @see javax.servlet.Servlet#init(ServletConfig) */ diff --git a/base/common/src/com/netscape/cms/servlet/base/GetStats.java b/base/common/src/com/netscape/cms/servlet/base/GetStats.java index c21b56835..8c32e78c3 100644 --- a/base/common/src/com/netscape/cms/servlet/base/GetStats.java +++ b/base/common/src/com/netscape/cms/servlet/base/GetStats.java @@ -44,7 +44,7 @@ import com.netscape.cms.servlet.common.ECMSGWException; /** * Retrieve information. - * + * * @version $Revision$, $Date$ */ public class GetStats extends CMSServlet { @@ -62,7 +62,7 @@ public class GetStats extends CMSServlet { /** * initialize the servlet. This servlet uses the template * file "getOCSPInfo.template" to render the result page. - * + * * @param sc servlet configuration, read from the web.xml file */ public void init(ServletConfig sc) throws ServletException { @@ -79,7 +79,7 @@ public class GetStats extends CMSServlet { /** * Process the HTTP request. - * + * * @param cmsReq the object holding the request and response information */ protected void process(CMSRequest cmsReq) diff --git a/base/common/src/com/netscape/cms/servlet/base/IndexServlet.java b/base/common/src/com/netscape/cms/servlet/base/IndexServlet.java index 95dbf2abf..b5f94bd19 100644 --- a/base/common/src/com/netscape/cms/servlet/base/IndexServlet.java +++ b/base/common/src/com/netscape/cms/servlet/base/IndexServlet.java @@ -34,7 +34,7 @@ import com.netscape.cms.servlet.common.IndexTemplateFiller; /** * This is the servlet that builds the index page in * various ports. - * + * * @version $Revision$, $Date$ */ public class IndexServlet extends CMSServlet { diff --git a/base/common/src/com/netscape/cms/servlet/base/PortsServlet.java b/base/common/src/com/netscape/cms/servlet/base/PortsServlet.java index fced583a2..a0587229a 100644 --- a/base/common/src/com/netscape/cms/servlet/base/PortsServlet.java +++ b/base/common/src/com/netscape/cms/servlet/base/PortsServlet.java @@ -33,7 +33,7 @@ import com.netscape.cmsutil.xml.XMLObject; /** * This servlet returns port information. - * + * * @version $Revision$, $Date$ */ public class PortsServlet extends CMSServlet { @@ -49,7 +49,7 @@ public class PortsServlet extends CMSServlet { public void init(ServletConfig sc) throws ServletException { super.init(sc); - // override these to output directly ourselves. + // override these to output directly ourselves. mTemplates.remove(CMSRequest.SUCCESS); mTemplates.remove(CMSRequest.ERROR); } diff --git a/base/common/src/com/netscape/cms/servlet/base/ProxyServlet.java b/base/common/src/com/netscape/cms/servlet/base/ProxyServlet.java index 41666ab31..4d7ff24f5 100644 --- a/base/common/src/com/netscape/cms/servlet/base/ProxyServlet.java +++ b/base/common/src/com/netscape/cms/servlet/base/ProxyServlet.java @@ -22,31 +22,31 @@ import com.netscape.certsrv.apps.CMS; /** * This is a servlet that proxies request to another servlet. - * + * * SERVLET REDIRECTION * Specify the URL of a servlet to forward the request to * destServlet: /ee/ca/newservlet - * + * * PARAMETER MAPPING * In the servlet configuration (as an init-param in web.xml) you * can optionally specify a value for the parameter 'parameterMap' * which contains a list of HTTP parameters which should be * translated to new names. - * + * * parameterMap: name1->newname1,name2->newname2 - * + * * Optionally, names can be set to static values: - * + * * parameterMap: name1->name2=value - * + * * Examples: * Consider the following HTTP input parameters: * vehicle:car make:ford model:explorer - * + * * The following config strings will have this effect: * parameterMap: make->manufacturer,model->name=expedition,->suv=true * output: vehicle:car manufactuer:ford model:expedition suv:true - * + * * @version $Revision$, $Date$ */ public class ProxyServlet extends HttpServlet { @@ -222,7 +222,7 @@ class ProxyWrapper extends HttpServletRequestWrapper { } } } - // Now, deal with static values set in the config + // Now, deal with static values set in the config // which weren't set in the HTTP request Set<Map.Entry<String, String[]>> s2 = mValueMap.entrySet(); Iterator<Map.Entry<String, String[]>> i2 = s2.iterator(); diff --git a/base/common/src/com/netscape/cms/servlet/base/SystemInfoServlet.java b/base/common/src/com/netscape/cms/servlet/base/SystemInfoServlet.java index f883fd373..24210f377 100644 --- a/base/common/src/com/netscape/cms/servlet/base/SystemInfoServlet.java +++ b/base/common/src/com/netscape/cms/servlet/base/SystemInfoServlet.java @@ -34,7 +34,7 @@ import com.netscape.certsrv.apps.CMS; * thread. * <p> * Also allows user to trigger a new garbage collection - * + * * @version $Revision$, $Date$ */ public class SystemInfoServlet extends HttpServlet { @@ -62,7 +62,7 @@ public class SystemInfoServlet extends HttpServlet { * <li>op = general - display information about memory, and other JVM informatino * <li>op = thread - display details about each thread. * </UL> - * + * * @see javax.servlet.http.HttpServlet#service(HttpServletRequest, HttpServletResponse) */ public void service(HttpServletRequest request, diff --git a/base/common/src/com/netscape/cms/servlet/base/UserInfo.java b/base/common/src/com/netscape/cms/servlet/base/UserInfo.java index dd8f69613..b509409da 100644 --- a/base/common/src/com/netscape/cms/servlet/base/UserInfo.java +++ b/base/common/src/com/netscape/cms/servlet/base/UserInfo.java @@ -20,7 +20,7 @@ package com.netscape.cms.servlet.base; /** * This class represents information about the client e.g. version, * langauge, vendor. - * + * * @version $Revision$, $Date$ */ public class UserInfo { @@ -35,7 +35,7 @@ public class UserInfo { /** * Returns the user language. - * + * * @param s user language info from the browser * @return user language */ @@ -52,7 +52,7 @@ public class UserInfo { /** * Returns the user country. - * + * * @param s user language info from the browser * @return user country */ @@ -69,7 +69,7 @@ public class UserInfo { /** * Returns the users agent. - * + * * @param s user language info from the browser * @return user agent */ diff --git a/base/common/src/com/netscape/cms/servlet/base/model/Link.java b/base/common/src/com/netscape/cms/servlet/base/model/Link.java index 7fd850a22..336092abe 100644 --- a/base/common/src/com/netscape/cms/servlet/base/model/Link.java +++ b/base/common/src/com/netscape/cms/servlet/base/model/Link.java @@ -22,7 +22,7 @@ import javax.xml.bind.annotation.XmlRootElement; /** * @author alee - * + * */ @XmlRootElement(name = "Link") public class Link { |