|
16 | 16 |
|
17 | 17 | package io.appium.java_client.service.local; |
18 | 18 |
|
| 19 | +import static com.google.common.base.Preconditions.checkArgument; |
19 | 20 | import static com.google.common.base.Preconditions.checkNotNull; |
20 | 21 | import static org.openqa.selenium.remote.CapabilityType.PLATFORM_NAME; |
21 | 22 |
|
22 | 23 | import com.google.common.collect.ImmutableList; |
| 24 | + |
23 | 25 | import com.google.gson.Gson; |
24 | 26 | import com.google.gson.GsonBuilder; |
25 | 27 | import io.appium.java_client.remote.AndroidMobileCapabilityType; |
26 | 28 | import io.appium.java_client.remote.MobileBrowserType; |
27 | 29 | import io.appium.java_client.remote.MobileCapabilityType; |
28 | 30 | import io.appium.java_client.service.local.flags.GeneralServerFlag; |
29 | 31 | import io.appium.java_client.service.local.flags.ServerArgument; |
| 32 | + |
| 33 | +import lombok.SneakyThrows; |
| 34 | +import org.apache.commons.io.IOUtils; |
| 35 | +import org.apache.commons.lang3.StringUtils; |
| 36 | +import org.apache.commons.lang3.SystemUtils; |
| 37 | +import org.apache.commons.validator.routines.InetAddressValidator; |
| 38 | +import org.openqa.selenium.Capabilities; |
| 39 | +import org.openqa.selenium.Platform; |
| 40 | +import org.openqa.selenium.os.ExecutableFinder; |
| 41 | +import org.openqa.selenium.remote.Browser; |
| 42 | +import org.openqa.selenium.remote.service.DriverService; |
| 43 | + |
| 44 | +import javax.annotation.Nullable; |
30 | 45 | import java.io.File; |
31 | 46 | import java.io.IOException; |
| 47 | + |
32 | 48 | import java.nio.charset.StandardCharsets; |
33 | 49 | import java.nio.file.Path; |
34 | 50 | import java.nio.file.Paths; |
|
40 | 56 | import java.util.Map; |
41 | 57 | import java.util.Set; |
42 | 58 | import java.util.function.Function; |
43 | | -import javax.annotation.Nullable; |
44 | | -import lombok.SneakyThrows; |
45 | | -import org.apache.commons.io.IOUtils; |
46 | | -import org.apache.commons.lang3.StringUtils; |
47 | | -import org.apache.commons.lang3.SystemUtils; |
48 | | -import org.apache.commons.validator.routines.InetAddressValidator; |
49 | | -import org.openqa.selenium.Capabilities; |
50 | | -import org.openqa.selenium.Platform; |
51 | | -import org.openqa.selenium.os.ExecutableFinder; |
52 | | -import org.openqa.selenium.remote.Browser; |
53 | | -import org.openqa.selenium.remote.service.DriverService; |
54 | 59 |
|
55 | 60 | public final class AppiumServiceBuilder |
56 | 61 | extends DriverService.Builder<AppiumDriverLocalService, AppiumServiceBuilder> { |
@@ -226,7 +231,8 @@ public AppiumServiceBuilder withArgument(ServerArgument argument, String value) |
226 | 231 |
|
227 | 232 | private static String sanitizeBasePath(String basePath) { |
228 | 233 | basePath = checkNotNull(basePath).trim(); |
229 | | - Preconditions.checkArgument(!basePath.isEmpty(), "Given base path is not valid - blank or empty values are not allowed for base path"); |
| 234 | + checkArgument(!basePath.isEmpty(), |
| 235 | + "Given base path is not valid - blank or empty values are not allowed for base path"); |
230 | 236 | return basePath.endsWith("/") ? basePath : basePath + "/"; |
231 | 237 | } |
232 | 238 |
|
|
0 commit comments