Skip to content

Commit

Permalink
Use static methods in Request HttpOperation
Browse files Browse the repository at this point in the history
Currently org.ocpsoft.rewrite.servlet.config.Request is abstract and contains only instance methods.
If you want to use this class, you will have to create an (anonymous) instance to invoke its methods.
This commit changes the methods within Request to be static.
  • Loading branch information
wienczny committed Mar 4, 2015
1 parent f68857d commit 170a4e3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public abstract class Request extends HttpOperation
*
* @param encoding The encoding to apply
*/
public Request setCharacterEncoding(final String encoding)
public static Request setCharacterEncoding(final String encoding)
{
return new Request() {
@Override
Expand All @@ -63,9 +63,9 @@ public String toString()
* Creates an {@link HttpOperation} that calls {@link HttpServletRequest#setCharacterEncoding(String)} on the current
* request.
*
* @param encoding The character set to apply
* @param charset The character set to apply
*/
public Request setCharacterEncoding(final Charset charset)
public static Request setCharacterEncoding(final Charset charset)
{
return setCharacterEncoding(charset.name());
}
Expand All @@ -77,7 +77,7 @@ public Request setCharacterEncoding(final Charset charset)
* @param name The name of the request attribute
* @param value The value to set
*/
public Request setAttribute(final String name, final Object value)
public static Request setAttribute(final String name, final Object value)
{
return new Request() {
@Override
Expand Down

0 comments on commit 170a4e3

Please sign in to comment.