1
0
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:
Pieter12345 2019-03-21 21:15:38 +01:00 committed by Cristian Maglie
parent a08908a90f
commit 09e466a4a2
4 changed files with 5 additions and 10 deletions

View File

@ -29,6 +29,7 @@
package processing.app.helpers;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

View File

@ -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 {

View File

@ -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 {

View File

@ -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());
}
}