package net.joelinn.riot.summoner;

import com.sun.deploy.util.StringUtils;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.core.util.MultivaluedMapImpl;
import net.joelinn.riot.AbstractClient;
import net.joelinn.riot.Region;
import net.joelinn.riot.summoner.dto.MasteryPages;
import net.joelinn.riot.summoner.dto.RunePages;
import net.joelinn.riot.summoner.dto.Summoner;
import net.joelinn.riot.summoner.dto.SummonerNameList;

import java.util.ArrayList;
import java.util.List;

/**
 * Joe Linn
 * 12/14/13
 * @see <a href="https://developer.riotgames.com/api/methods#!/293">https://developer.riotgames.com/api/methods#!/293</a>
 */
public class SummonerClient extends AbstractClient{

    public SummonerClient(String apiKey, Region region) {
        super(apiKey, region);
    }

    @Override
    protected String getVersion() {
        return "1.2";
    }

    public MasteryPages getMasteries(long summonerId){
        return get(String.format("%s/masteries", summonerId)).getEntity(MasteryPages.class);
    }

    public RunePages getRunes(long summonerId){
        return get(String.format("%s/runes", summonerId)).getEntity(RunePages.class);
    }

    public Summoner getSummoner(String name){
        return get(String.format("by-name/%s", name)).getEntity(Summoner.class);
    }

    public Summoner getSummoner(long summonerId){
        return get(Long.toString(summonerId)).getEntity(Summoner.class);
    }

    public SummonerNameList getSummonerNames(long... summonerIds){
        List<String> list = new ArrayList<>(summonerIds.length);
        for(long id : summonerIds){
            list.add(Long.toString(id));
        }
        return get(String.format("%s/name", StringUtils.join(list, ","))).getEntity(SummonerNameList.class);
    }

    @Override
    protected ClientResponse request(String method, String url, MultivaluedMapImpl queryParams, MultivaluedMapImpl data) {
        return super.request(method, "summoner/" + url, queryParams, data);
    }
}

@@ -33,48 +33,8 @@
 r;%0A%0A
-import com.sun.deploy.util.StringUtils;%0A
 impo
@@ -408,59 +408,8 @@
 t;%0A%0A
-import java.util.ArrayList;%0Aimport java.util.List;%0A
 %0A/**
@@ -1426,63 +1426,53 @@
     
-List%3C
 String
-%3E list = new ArrayList%3C%3E(summonerIds.length)
+ joined = %22%22;%0A        String comma = %22%22
 ;%0A  
@@ -1521,35 +1521,68 @@
     
-list.add(Long.toString(id))
+joined += comma + Long.toString(id);%0A            comma = %22,%22
 ;%0A  
@@ -1637,35 +1637,14 @@
 e%22, 
-StringUtils.join(list, %22,%22)
+joined
 )).g

Remove use of com.sun.util.deploy join() from SummonerClient