Permalink
Browse files

minor fixes

  • Loading branch information...
1 parent 28cd174 commit 045914d2c0b1a049509fd9ddcdc77efff075985a @fernandezpablo85 fernandezpablo85 committed Feb 14, 2013
@@ -16,6 +16,7 @@
{
private static final String PARAM_SEPARATOR = ", ";
private static final String PREAMBLE = "OAuth ";
+ public static final int ESTIMATED_PARAM_LENGTH = 20;
/**
* {@inheritDoc}
@@ -24,7 +25,7 @@ public String extract(OAuthRequest request)
{
checkPreconditions(request);
Map<String, String> parameters = request.getOauthParameters();
- StringBuffer header = new StringBuffer(parameters.size() * 20);
+ StringBuilder header = new StringBuilder(parameters.size() * ESTIMATED_PARAM_LENGTH);
header.append(PREAMBLE);
for (Map.Entry<String, String> entry : parameters.entrySet())
{
@@ -1,9 +1,6 @@
package org.scribe.model;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import org.scribe.exceptions.OAuthException;
-import org.scribe.utils.OAuthEncoder;
+import org.scribe.utils.*;
/**
* @author: Pablo Fernandez

0 comments on commit 045914d

Please sign in to comment.