Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127
This commit is contained in:
committed by
Chris Beams
parent
44a474a014
commit
1762157ad1
@@ -609,7 +609,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
|
||||
if (userName != null) {
|
||||
return userName;
|
||||
}
|
||||
|
||||
|
||||
// Try the Portlet USER_INFO map.
|
||||
Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);
|
||||
if (userInfo != null) {
|
||||
@@ -620,7 +620,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Nothing worked...
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public abstract class GenericPortletBean extends GenericPortlet
|
||||
/** Logger available to subclasses */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
/**
|
||||
/**
|
||||
* Set of required properties (Strings) that must be supplied as
|
||||
* config parameters to this portlet.
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ public abstract class GenericPortletBean extends GenericPortlet
|
||||
if (logger.isInfoEnabled()) {
|
||||
logger.info("Initializing portlet '" + getPortletName() + "'");
|
||||
}
|
||||
|
||||
|
||||
// Set bean properties from init parameters.
|
||||
try {
|
||||
PropertyValues pvs = new PortletConfigPropertyValues(getPortletConfig(), this.requiredProperties);
|
||||
@@ -127,7 +127,7 @@ public abstract class GenericPortletBean extends GenericPortlet
|
||||
logger.info("Portlet '" + getPortletName() + "' configured successfully");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the BeanWrapper for this GenericPortletBean,
|
||||
* possibly with custom editors.
|
||||
@@ -215,7 +215,7 @@ public abstract class GenericPortletBean extends GenericPortlet
|
||||
*/
|
||||
private PortletConfigPropertyValues(PortletConfig config, Set<String> requiredProperties)
|
||||
throws PortletException {
|
||||
|
||||
|
||||
Set<String> missingProps = (requiredProperties != null && !requiredProperties.isEmpty()) ?
|
||||
new HashSet<String>(requiredProperties) : null;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ import javax.portlet.ResourceResponse;
|
||||
* @see org.springframework.web.portlet.mvc.SimpleControllerHandlerAdapter
|
||||
*/
|
||||
public interface HandlerAdapter {
|
||||
|
||||
|
||||
/**
|
||||
* Given a handler instance, return whether or not this HandlerAdapter can
|
||||
* support it. Typical HandlerAdapters will base the decision on the handler
|
||||
@@ -60,7 +60,7 @@ public interface HandlerAdapter {
|
||||
* @param handler handler object to check
|
||||
* @return whether or not this object can use the given handler
|
||||
*/
|
||||
boolean supports(Object handler);
|
||||
boolean supports(Object handler);
|
||||
|
||||
/**
|
||||
* Use the given handler to handle this action request.
|
||||
|
||||
@@ -54,7 +54,7 @@ import javax.portlet.PortletRequest;
|
||||
* @see org.springframework.web.portlet.handler.PortletModeParameterHandlerMapping
|
||||
*/
|
||||
public interface HandlerMapping {
|
||||
|
||||
|
||||
/**
|
||||
* Return a handler and any interceptors for this request. The choice may be made
|
||||
* on portlet mode, session state, or any factor the implementing class chooses.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -55,7 +55,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
|
||||
* @see org.springframework.web.portlet.DispatcherPortlet
|
||||
*/
|
||||
public abstract class PortletApplicationContextUtils {
|
||||
|
||||
|
||||
/**
|
||||
* Find the root WebApplicationContext for this portlet application, which is
|
||||
* typically loaded via ContextLoaderListener or ContextLoaderServlet.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -49,7 +49,7 @@ public class PortletContextAwareProcessor implements BeanPostProcessor {
|
||||
public PortletContextAwareProcessor(PortletContext portletContext) {
|
||||
this(portletContext, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a new PortletContextAwareProcessor for the given config.
|
||||
*/
|
||||
|
||||
@@ -111,7 +111,7 @@ public class PortletWebRequest extends PortletRequestAttributes implements Nativ
|
||||
public Iterator<String> getParameterNames() {
|
||||
return CollectionUtils.toIterator(getRequest().getParameterNames());
|
||||
}
|
||||
|
||||
|
||||
public Map<String, String[]> getParameterMap() {
|
||||
return getRequest().getParameterMap();
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
|
||||
implements ConfigurablePortletApplicationContext {
|
||||
|
||||
private ServletContext servletContext;
|
||||
|
||||
|
||||
private PortletContext portletContext;
|
||||
|
||||
private PortletConfig portletConfig;
|
||||
|
||||
@@ -26,7 +26,7 @@ import javax.portlet.ActionResponse;
|
||||
* <p>This can be useful when using {@link ParameterHandlerMapping ParameterHandlerMapping}
|
||||
* or {@link PortletModeParameterHandlerMapping PortletModeParameterHandlerMapping}.
|
||||
* It will ensure that the parameter that was used to map the <code>ActionRequest</code>
|
||||
* to a handler will be forwarded to the <code>RenderRequest</code> so that it will also be
|
||||
* to a handler will be forwarded to the <code>RenderRequest</code> so that it will also be
|
||||
* mapped the same way.
|
||||
*
|
||||
* <p>When using this Interceptor, you can still change the value of the mapping parameter
|
||||
|
||||
@@ -95,7 +95,7 @@ public abstract class PortletContentGenerator extends PortletApplicationObjectSu
|
||||
|
||||
/**
|
||||
* Check and prepare the given request and response according to the settings
|
||||
* of this generator. Checks for a required session, and applies the number of
|
||||
* of this generator. Checks for a required session, and applies the number of
|
||||
* cache seconds configured for this generator (if it is a render request/response).
|
||||
* @param request current portlet request
|
||||
* @param response current portlet response
|
||||
@@ -109,7 +109,7 @@ public abstract class PortletContentGenerator extends PortletApplicationObjectSu
|
||||
|
||||
/**
|
||||
* Check and prepare the given request and response according to the settings
|
||||
* of this generator. Checks for a required session, and applies the given
|
||||
* of this generator. Checks for a required session, and applies the given
|
||||
* number of cache seconds (if it is a render request/response).
|
||||
* @param request current portlet request
|
||||
* @param response current portlet response
|
||||
|
||||
@@ -59,7 +59,7 @@ import org.springframework.web.portlet.util.PortletUtils;
|
||||
* @see org.springframework.web.portlet.mvc.PortletWrappingController
|
||||
*/
|
||||
public class SimplePortletHandlerAdapter implements HandlerAdapter, PortletContextAware {
|
||||
|
||||
|
||||
private PortletContext portletContext;
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Map<String, MultipartFile> getFileMap() {
|
||||
return getMultipartFiles().toSingleValueMap();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -204,7 +204,7 @@ public abstract class AbstractController extends PortletContentGenerator impleme
|
||||
if (WindowState.MINIMIZED.equals(request.getWindowState()) && !this.renderWhenMinimized) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// Delegate to PortletContentGenerator for checking and preparing.
|
||||
checkAndPrepare(request, response);
|
||||
|
||||
|
||||
@@ -638,7 +638,7 @@ public abstract class AbstractFormController extends BaseCommandController {
|
||||
binder.bind(request);
|
||||
onBindOnNewForm(request, command, errors);
|
||||
}
|
||||
|
||||
|
||||
// Return BindException object that resulted from binding.
|
||||
return errors;
|
||||
}
|
||||
@@ -690,7 +690,7 @@ public abstract class AbstractFormController extends BaseCommandController {
|
||||
if (!isSessionForm()) {
|
||||
return formBackingObject(request);
|
||||
}
|
||||
|
||||
|
||||
// Session-form mode: retrieve form object from portlet session attribute.
|
||||
PortletSession session = request.getPortletSession(false);
|
||||
if (session == null) {
|
||||
@@ -821,7 +821,7 @@ public abstract class AbstractFormController extends BaseCommandController {
|
||||
// Fetch errors model as starting point, containing form object under
|
||||
// "commandName", and corresponding Errors instance under internal key.
|
||||
Map model = errors.getModel();
|
||||
|
||||
|
||||
// Merge reference data into model, if any.
|
||||
Map referenceData = referenceData(request, errors.getTarget(), errors);
|
||||
if (referenceData != null) {
|
||||
|
||||
@@ -342,7 +342,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Showing wizard page " + page + " for form bean '" + getCommandName() + "'");
|
||||
}
|
||||
|
||||
|
||||
// Set page session attribute, expose overriding request attribute.
|
||||
Integer pageInteger = new Integer(page);
|
||||
String pageAttrName = getPageSessionAttributeName(request);
|
||||
@@ -353,7 +353,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
|
||||
request.getPortletSession().setAttribute(pageAttrName, pageInteger);
|
||||
}
|
||||
request.setAttribute(pageAttrName, pageInteger);
|
||||
|
||||
|
||||
// Set page request attribute for evaluation by views.
|
||||
Map controlModel = new HashMap();
|
||||
if (this.pageAttribute != null) {
|
||||
@@ -647,7 +647,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle
|
||||
request.getPortletSession().removeAttribute(pageAttrName);
|
||||
}
|
||||
request.setAttribute(pageAttrName, new Integer(currentPage));
|
||||
|
||||
|
||||
// cancel?
|
||||
if (isCancelRequest(request)) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
|
||||
@@ -41,7 +41,7 @@ import org.springframework.web.portlet.handler.PortletSessionRequiredException;
|
||||
* <p>This controller is the base for all controllers wishing to populate
|
||||
* JavaBeans based on request parameters, validate the content of such
|
||||
* JavaBeans using {@link Validator Validators} and use custom editors (in the form of
|
||||
* {@link java.beans.PropertyEditor PropertyEditors}) to transform
|
||||
* {@link java.beans.PropertyEditor PropertyEditors}) to transform
|
||||
* objects into strings and vice versa, for example. Three notions are mentioned here:</p>
|
||||
*
|
||||
* <p><b>Command class:</b><br>
|
||||
@@ -54,7 +54,7 @@ import org.springframework.web.portlet.handler.PortletSessionRequiredException;
|
||||
* Upon receiving a request, any BaseCommandController will attempt to fill the
|
||||
* command object using the request parameters. This is done using the typical
|
||||
* and well-known JavaBeans property notation. When a request parameter named
|
||||
* <code>'firstName'</code> exists, the framework will attempt to call
|
||||
* <code>'firstName'</code> exists, the framework will attempt to call
|
||||
* <code>setFirstName([value])</code> passing the value of the parameter. Nested properties
|
||||
* are of course supported. For instance a parameter named <code>'address.city'</code>
|
||||
* will result in a <code>getAddress().setCity([value])</code> call on the
|
||||
@@ -155,14 +155,14 @@ public abstract class BaseCommandController extends AbstractController {
|
||||
* session is that we have no way of knowing when we are done re-rendering
|
||||
* the request and so we don't know when we can remove the objects from
|
||||
* the session. So we will end up polluting the session with old objects
|
||||
* when we finally leave the render of this controller and move on to
|
||||
* when we finally leave the render of this controller and move on to
|
||||
* somthing else. To minimize the pollution, we will use a static string
|
||||
* value as the session attribute name. At least this way we are only ever
|
||||
* leaving one orphaned set behind. The methods that return these names
|
||||
* can be overridden if you want to use a different method, but be aware
|
||||
* of the session pollution that may occur.
|
||||
*/
|
||||
private static final String RENDER_COMMAND_SESSION_ATTRIBUTE =
|
||||
private static final String RENDER_COMMAND_SESSION_ATTRIBUTE =
|
||||
"org.springframework.web.portlet.mvc.RenderCommand";
|
||||
|
||||
private static final String RENDER_ERRORS_SESSION_ATTRIBUTE =
|
||||
@@ -172,13 +172,13 @@ public abstract class BaseCommandController extends AbstractController {
|
||||
|
||||
|
||||
private String commandName = DEFAULT_COMMAND_NAME;
|
||||
|
||||
|
||||
private Class commandClass;
|
||||
|
||||
|
||||
private Validator[] validators;
|
||||
|
||||
|
||||
private boolean validateOnBinding = true;
|
||||
|
||||
|
||||
private MessageCodesResolver messageCodesResolver;
|
||||
|
||||
private BindingErrorProcessor bindingErrorProcessor;
|
||||
@@ -405,7 +405,7 @@ public abstract class BaseCommandController extends AbstractController {
|
||||
protected final boolean checkCommand(Object command) {
|
||||
return (this.commandClass == null || this.commandClass.isInstance(command));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Bind the parameters of the given request to the given command object.
|
||||
@@ -416,7 +416,7 @@ public abstract class BaseCommandController extends AbstractController {
|
||||
*/
|
||||
protected final PortletRequestDataBinder bindAndValidate(PortletRequest request, Object command)
|
||||
throws Exception {
|
||||
|
||||
|
||||
PortletRequestDataBinder binder = createBinder(request, command);
|
||||
if (!suppressBinding(request)) {
|
||||
binder.bind(request);
|
||||
@@ -464,7 +464,7 @@ public abstract class BaseCommandController extends AbstractController {
|
||||
*/
|
||||
protected PortletRequestDataBinder createBinder(PortletRequest request, Object command)
|
||||
throws Exception {
|
||||
|
||||
|
||||
PortletRequestDataBinder binder = new PortletRequestDataBinder(command, getCommandName());
|
||||
prepareBinder(binder);
|
||||
initBinder(request, binder);
|
||||
@@ -598,7 +598,7 @@ public abstract class BaseCommandController extends AbstractController {
|
||||
return RENDER_COMMAND_SESSION_ATTRIBUTE;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Return the name of the session attribute that holds
|
||||
* the render phase command object for this form controller.
|
||||
* @return the name of the render phase command object session attribute
|
||||
|
||||
@@ -24,8 +24,8 @@ import javax.portlet.RenderResponse;
|
||||
import org.springframework.web.portlet.ModelAndView;
|
||||
|
||||
/**
|
||||
* Base portlet Controller interface, representing a component that receives
|
||||
* RenderRequest/RenderResponse and ActionRequest/ActionResponse like a
|
||||
* Base portlet Controller interface, representing a component that receives
|
||||
* RenderRequest/RenderResponse and ActionRequest/ActionResponse like a
|
||||
* <code>Portlet</code> but is able to participate in an MVC workflow.
|
||||
*
|
||||
* <p>Any implementation of the portlet Controller interface should be a
|
||||
@@ -46,7 +46,7 @@ import org.springframework.web.portlet.ModelAndView;
|
||||
* So actually, these method are the main entrypoint for the
|
||||
* {@link org.springframework.web.portlet.DispatcherPortlet DispatcherPortlet}
|
||||
* which delegates requests to controllers.</p>
|
||||
*
|
||||
*
|
||||
* <p>So basically any <i>direct</i> implementation of the Controller interface
|
||||
* just handles RenderRequests/ActionRequests and should return a ModelAndView, to be
|
||||
* further used by the DispatcherPortlet. Any additional functionality such as
|
||||
|
||||
@@ -63,7 +63,7 @@ import org.springframework.web.portlet.ModelAndView;
|
||||
* @since 2.0
|
||||
*/
|
||||
public class ParameterizableViewController extends AbstractController {
|
||||
|
||||
|
||||
private String viewName;
|
||||
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ public abstract class PortletUtils {
|
||||
|
||||
/**
|
||||
* Get the specified session attribute under the {@link javax.portlet.PortletSession#PORTLET_SCOPE},
|
||||
* creating and setting a new attribute if no existing found. The given class
|
||||
* creating and setting a new attribute if no existing found. The given class
|
||||
* needs to have a public no-arg constructor.
|
||||
* Useful for on-demand state objects in a web tier, like shopping carts.
|
||||
* @param session current portlet session
|
||||
@@ -211,7 +211,7 @@ public abstract class PortletUtils {
|
||||
|
||||
/**
|
||||
* Get the specified session attribute in the given scope,
|
||||
* creating and setting a new attribute if no existing found. The given class
|
||||
* creating and setting a new attribute if no existing found. The given class
|
||||
* needs to have a public no-arg constructor.
|
||||
* Useful for on-demand state objects in a web tier, like shopping carts.
|
||||
* @param session current portlet session
|
||||
@@ -369,7 +369,7 @@ public abstract class PortletUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the full name of a specific input type="submit" parameter
|
||||
* Return the full name of a specific input type="submit" parameter
|
||||
* if it was sent in the request, either via a button (directly with name)
|
||||
* or via an image (name + ".x" or name + ".y").
|
||||
* @param request current portlet request
|
||||
|
||||
Reference in New Issue
Block a user