mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Replace StringUtils.join() with library call
Use Apache commons.lang3 instead of own implementation.
This commit is contained in:
parent
a08908a90f
commit
09e466a4a2
@ -29,6 +29,7 @@
|
||||
|
||||
package processing.app.helpers;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
@ -36,6 +36,8 @@ import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
@ -48,7 +50,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import cc.arduino.packages.BoardPort;
|
||||
import cc.arduino.packages.Discovery;
|
||||
import processing.app.PreferencesData;
|
||||
import processing.app.helpers.StringUtils;
|
||||
|
||||
public class PluggableDiscovery implements Discovery {
|
||||
|
||||
|
@ -44,7 +44,6 @@ import processing.app.debug.TargetPlatform;
|
||||
import processing.app.helpers.PreferencesMap;
|
||||
import processing.app.helpers.PreferencesMapException;
|
||||
import processing.app.helpers.StringReplacer;
|
||||
import processing.app.helpers.StringUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -54,6 +53,8 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import static processing.app.I18n.tr;
|
||||
|
||||
public class SSHUploader extends Uploader {
|
||||
|
@ -15,12 +15,4 @@ public class StringUtils {
|
||||
}
|
||||
return s.substring(0, i + 1);
|
||||
}
|
||||
|
||||
public static String join(String[] arr, String separator) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for (String s : arr) {
|
||||
sb.append(s).append(separator);
|
||||
}
|
||||
return sb.substring(0, sb.length() - separator.length());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user