diff --git a/src/main/java/com/redhat/devtools/intellij/telemetry/core/configuration/limits/EventCounts.java b/src/main/java/com/redhat/devtools/intellij/telemetry/core/configuration/limits/EventCounts.java index 0c50ba5..f5e6536 100644 --- a/src/main/java/com/redhat/devtools/intellij/telemetry/core/configuration/limits/EventCounts.java +++ b/src/main/java/com/redhat/devtools/intellij/telemetry/core/configuration/limits/EventCounts.java @@ -15,9 +15,9 @@ import com.intellij.openapi.components.Service; import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.xmlb.XmlSerializerUtil; import com.redhat.devtools.intellij.telemetry.core.service.Event; -import org.apache.commons.lang.StringUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -107,7 +107,7 @@ private Count createOrUpdateCount(Event event) { } private Count toCount(String string) { - if (StringUtils.isEmpty(string)) { + if (StringUtil.isEmpty(string)) { return null; } String[] split = string.split(COUNT_VALUES_SEPARATOR); diff --git a/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/BasicGlobPattern.java b/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/BasicGlobPattern.java index 2e41db3..e001334 100644 --- a/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/BasicGlobPattern.java +++ b/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/BasicGlobPattern.java @@ -29,7 +29,7 @@ ******************************************************************************/ package com.redhat.devtools.intellij.telemetry.core.util; -import org.apache.commons.lang.StringUtils; +import com.intellij.openapi.util.text.StringUtil; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; @@ -60,7 +60,7 @@ private BasicGlobPattern(Pattern globPattern) { } public boolean matches(String toMatch) { - if (StringUtils.isEmpty(toMatch)) { + if (StringUtil.isEmpty(toMatch)) { return false; } return globPattern.matcher(toMatch).matches(); diff --git a/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/FileUtils.java b/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/FileUtils.java index 13eab39..1c8eaf8 100644 --- a/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/FileUtils.java +++ b/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/FileUtils.java @@ -10,7 +10,7 @@ ******************************************************************************/ package com.redhat.devtools.intellij.telemetry.core.util; -import org.apache.commons.lang.StringUtils; +import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -60,7 +60,7 @@ public static void write(String content, Path file) throws IOException { } public static boolean isFileUrl(String url) { - return !StringUtils.isEmpty(url) + return !StringUtil.isEmpty(url) && url.startsWith(FILE_URL_PREFIX); }