|
17 | 17 |
|
18 | 18 | package pl.project13.core; |
19 | 19 |
|
20 | | -import com.google.common.annotations.VisibleForTesting; |
21 | | -import com.google.errorprone.annotations.CanIgnoreReturnValue; |
22 | 20 | import pl.project13.core.git.GitDescribeConfig; |
23 | 21 | import pl.project13.core.cibuild.BuildServerDataProvider; |
24 | 22 | import pl.project13.core.cibuild.UnknownBuildServerData; |
|
27 | 25 |
|
28 | 26 | import javax.annotation.Nonnull; |
29 | 27 | import java.net.URI; |
30 | | -import java.net.URISyntaxException; |
31 | 28 | import java.util.*; |
32 | 29 | import java.text.SimpleDateFormat; |
33 | 30 | import java.util.concurrent.atomic.AtomicBoolean; |
34 | 31 | import java.util.concurrent.atomic.AtomicReference; |
35 | 32 | import java.util.regex.Pattern; |
36 | 33 |
|
37 | | -import static com.google.common.base.Strings.isNullOrEmpty; |
38 | | - |
39 | 34 | public abstract class GitDataProvider implements GitProvider { |
40 | 35 |
|
41 | 36 | @Nonnull |
@@ -229,7 +224,7 @@ protected String determineBranchName(@Nonnull Map<String, String> env) throws Gi |
229 | 224 | BuildServerDataProvider buildServerDataProvider = BuildServerDataProvider.getBuildServerProvider(env,log); |
230 | 225 | if (useBranchNameFromBuildEnvironment && !(buildServerDataProvider instanceof UnknownBuildServerData)) { |
231 | 226 | String branchName = buildServerDataProvider.getBuildBranch(); |
232 | | - if (isNullOrEmpty(branchName)) { |
| 227 | + if (branchName == null || branchName.isEmpty()) { |
233 | 228 | log.info("Detected that running on CI environment, but using repository branch, no GIT_BRANCH detected."); |
234 | 229 | return getBranchName(); |
235 | 230 | } |
@@ -262,7 +257,6 @@ protected void maybePut(@Nonnull Properties properties, String key, SupplierEx<S |
262 | 257 |
|
263 | 258 | @FunctionalInterface |
264 | 259 | public interface SupplierEx<T> { |
265 | | - @CanIgnoreReturnValue |
266 | 260 | T get() throws GitCommitIdExecutionException; |
267 | 261 | } |
268 | 262 |
|
|
0 commit comments