File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public class HeaderExtractorImpl implements HeaderExtractor
1616{
1717 private static final String PARAM_SEPARATOR = ", " ;
1818 private static final String PREAMBLE = "OAuth " ;
19+ public static final int ESTIMATED_PARAM_LENGTH = 20 ;
1920
2021 /**
2122 * {@inheritDoc}
@@ -24,7 +25,7 @@ public String extract(OAuthRequest request)
2425 {
2526 checkPreconditions (request );
2627 Map <String , String > parameters = request .getOauthParameters ();
27- StringBuffer header = new StringBuffer (parameters .size () * 20 );
28+ StringBuilder header = new StringBuilder (parameters .size () * ESTIMATED_PARAM_LENGTH );
2829 header .append (PREAMBLE );
2930 for (Map .Entry <String , String > entry : parameters .entrySet ())
3031 {
Original file line number Diff line number Diff line change 11package org .scribe .model ;
22
3- import java .io .UnsupportedEncodingException ;
4- import java .net .URLEncoder ;
5- import org .scribe .exceptions .OAuthException ;
6- import org .scribe .utils .OAuthEncoder ;
3+ import org .scribe .utils .*;
74
85/**
96 * @author: Pablo Fernandez
You can’t perform that action at this time.
0 commit comments