Formatter instances need to be closed

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1406436 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-11-07 03:24:08 +00:00
parent 4e3cbc31a7
commit c2e94980e1
2 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,7 @@ class BasicIdGenerator {
buffer.append('.');
Formatter formatter = new Formatter(buffer, Locale.US);
formatter.format("%1$016x-%2$08x", this.count, rndnum);
formatter.close();
buffer.append('.');
buffer.append(this.hostname);
}

View File

@ -314,6 +314,7 @@ public class DigestScheme extends RFC2617Scheme {
StringBuilder sb = new StringBuilder(256);
Formatter formatter = new Formatter(sb, Locale.US);
formatter.format("%08x", nounceCount);
formatter.close();
String nc = sb.toString();
if (cnonce == null) {