Skip to content

Commit

Permalink
Request Builder retains argument ordering for output request.
Browse files Browse the repository at this point in the history
This fixes the (intermittantly) failing unit test.
Also, imports were re-ordered automatically by IntelliJ.
  • Loading branch information
Hitobat committed May 29, 2015
1 parent 907ee0a commit 4d77142
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/fm/last/moji/tracker/impl/Request.java
Expand Up @@ -15,19 +15,19 @@
*/
package fm.last.moji.tracker.impl;

import static fm.last.moji.tracker.impl.Charsets.UTF_8;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static fm.last.moji.tracker.impl.Charsets.UTF_8;

class Request {

Expand Down Expand Up @@ -91,7 +91,7 @@ static class Builder {
private String command;

Builder(int expectedSize) {
arguments = new HashMap<String, String>(expectedSize);
arguments = new LinkedHashMap<String, String>(expectedSize);
}

Builder command(String command) {
Expand Down

0 comments on commit 4d77142

Please sign in to comment.