Skip to content

Commit

Permalink
ftp: fix broken back-port
Browse files Browse the repository at this point in the history
The back-port of CKSM fix assumes a later version of the Guava library.
This patch provides similar functionality as the splitToList method.
Patch developed in consultation with Gerd, although without a formal
Ship It.
  • Loading branch information
paulmillar committed Apr 7, 2014
1 parent 69d722b commit d2fbc56
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -69,6 +69,8 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
package diskCacheV111.doors;

import com.google.common.base.Strings;
import com.google.common.base.Splitter;
import com.google.common.collect.Lists;
import com.google.common.collect.Ranges;

import javax.security.auth.Subject;
Expand All @@ -92,12 +94,14 @@ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
import java.security.NoSuchAlgorithmException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
Expand Down Expand Up @@ -2235,7 +2239,7 @@ public void ac_cksm(String arg)
{
checkLoggedIn();

List<String> st = Splitter.on(' ').limit(4).splitToList(arg);
List<String> st = Lists.newArrayList(Splitter.on(' ').limit(4).split(arg));
if (st.size() != 4) {
reply("500 Unsupported CKSM command operands");
return;
Expand Down

0 comments on commit d2fbc56

Please sign in to comment.