Commit 00d2e911 authored by Greg Messner's avatar Greg Messner
Browse files

Replaced all instances of str.length() == 0 with str.isEmpty() per lamdaV suggestion.

parent 22679222
...@@ -42,15 +42,15 @@ public class TestAccessToken { ...@@ -42,15 +42,15 @@ public class TestAccessToken {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_ACCESS_TOKEN == null || TEST_ACCESS_TOKEN.trim().length() == 0) { if (TEST_ACCESS_TOKEN == null || TEST_ACCESS_TOKEN.trim().isEmpty()) {
problems += "TEST_ACCESS_TOKEN cannot be empty\n"; problems += "TEST_ACCESS_TOKEN cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -58,19 +58,19 @@ public class TestCommitsApi { ...@@ -58,19 +58,19 @@ public class TestCommitsApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().length() == 0) { if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().isEmpty()) {
problems += "TEST_PROJECT_NAME cannot be empty\n"; problems += "TEST_PROJECT_NAME cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -38,15 +38,15 @@ public class TestDeployKeysApi { ...@@ -38,15 +38,15 @@ public class TestDeployKeysApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
if (TEST_USERNAME == null || TEST_USERNAME.trim().length() == 0) { if (TEST_USERNAME == null || TEST_USERNAME.trim().isEmpty()) {
problems += "TEST_USER_NAME cannot be empty\n"; problems += "TEST_USER_NAME cannot be empty\n";
} }
......
...@@ -51,19 +51,19 @@ public class TestEventsApi { ...@@ -51,19 +51,19 @@ public class TestEventsApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().length() == 0) { if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().isEmpty()) {
problems += "TEST_PROJECT_NAME cannot be empty\n"; problems += "TEST_PROJECT_NAME cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -45,11 +45,11 @@ public class TestGitLabApi { ...@@ -45,11 +45,11 @@ public class TestGitLabApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -61,15 +61,15 @@ public class TestGroupApi { ...@@ -61,15 +61,15 @@ public class TestGroupApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
if (TEST_USERNAME == null || TEST_USERNAME.trim().length() == 0) { if (TEST_USERNAME == null || TEST_USERNAME.trim().isEmpty()) {
problems += "TEST_USER_NAME cannot be empty\n"; problems += "TEST_USER_NAME cannot be empty\n";
} }
......
...@@ -40,11 +40,11 @@ public class TestIgnoreCertificateErrors { ...@@ -40,11 +40,11 @@ public class TestIgnoreCertificateErrors {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -85,15 +85,15 @@ public class TestIssuesApi { ...@@ -85,15 +85,15 @@ public class TestIssuesApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -46,15 +46,15 @@ public class TestNamespaceApi { ...@@ -46,15 +46,15 @@ public class TestNamespaceApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -52,19 +52,19 @@ public class TestNotesApi { ...@@ -52,19 +52,19 @@ public class TestNotesApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().length() == 0) { if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().isEmpty()) {
problems += "TEST_PROJECT_NAME cannot be empty\n"; problems += "TEST_PROJECT_NAME cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -55,19 +55,19 @@ public class TestNotificationSettingsApi { ...@@ -55,19 +55,19 @@ public class TestNotificationSettingsApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().length() == 0) { if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().isEmpty()) {
problems += "TEST_PROJECT_NAME cannot be empty\n"; problems += "TEST_PROJECT_NAME cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -55,19 +55,19 @@ public class TestPager { ...@@ -55,19 +55,19 @@ public class TestPager {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().length() == 0) { if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().isEmpty()) {
problems += "TEST_PROJECT_NAME cannot be empty\n"; problems += "TEST_PROJECT_NAME cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -92,15 +92,15 @@ public class TestProjectApi { ...@@ -92,15 +92,15 @@ public class TestProjectApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -76,15 +76,15 @@ public class TestProjectApiSnippets { ...@@ -76,15 +76,15 @@ public class TestProjectApiSnippets {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -54,19 +54,19 @@ public class TestProtectedBranchesApi { ...@@ -54,19 +54,19 @@ public class TestProtectedBranchesApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().length() == 0) { if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().isEmpty()) {
problems += "TEST_PROJECT_NAME cannot be empty\n"; problems += "TEST_PROJECT_NAME cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -68,19 +68,19 @@ public class TestRepositoryApi { ...@@ -68,19 +68,19 @@ public class TestRepositoryApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().length() == 0) { if (TEST_NAMESPACE == null || TEST_NAMESPACE.trim().isEmpty()) {
problems += "TEST_NAMESPACE cannot be empty\n"; problems += "TEST_NAMESPACE cannot be empty\n";
} }
if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().length() == 0) { if (TEST_PROJECT_NAME == null || TEST_PROJECT_NAME.trim().isEmpty()) {
problems += "TEST_PROJECT_NAME cannot be empty\n"; problems += "TEST_PROJECT_NAME cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -49,15 +49,15 @@ public class TestSystemHooksApi { ...@@ -49,15 +49,15 @@ public class TestSystemHooksApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_HOOK_URL == null || TEST_HOOK_URL.trim().length() == 0) { if (TEST_HOOK_URL == null || TEST_HOOK_URL.trim().isEmpty()) {
problems += "TEST_HOOK_URL cannot be empty\n"; problems += "TEST_HOOK_URL cannot be empty\n";
} }
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
......
...@@ -75,15 +75,15 @@ public class TestUserApi { ...@@ -75,15 +75,15 @@ public class TestUserApi {
public static void setup() { public static void setup() {
String problems = ""; String problems = "";
if (TEST_HOST_URL == null || TEST_HOST_URL.trim().length() == 0) { if (TEST_HOST_URL == null || TEST_HOST_URL.trim().isEmpty()) {
problems += "TEST_HOST_URL cannot be empty\n"; problems += "TEST_HOST_URL cannot be empty\n";
} }
if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().length() == 0) { if (TEST_PRIVATE_TOKEN == null || TEST_PRIVATE_TOKEN.trim().isEmpty()) {
problems += "TEST_PRIVATE_TOKEN cannot be empty\n"; problems += "TEST_PRIVATE_TOKEN cannot be empty\n";
} }
if (TEST_USERNAME == null || TEST_USERNAME.trim().length() == 0) { if (TEST_USERNAME == null || TEST_USERNAME.trim().isEmpty()) {
problems += "TEST_USER_NAME cannot be empty\n"; problems += "TEST_USER_NAME cannot be empty\n";
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment