mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[lombok] tolerate non-parsable versions (IDEA-291044)
GitOrigin-RevId: a34691dc4fa9b0a3664414ee91e76c1661741b17
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9e8a128ea8
commit
482ff795d5
@@ -1,5 +1,6 @@
|
||||
package de.plushnikov.intellij.plugin;
|
||||
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.roots.OrderEntry;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -21,7 +22,13 @@ public interface Version {
|
||||
Pattern VERSION_PATTERN = Pattern.compile("(.*:)([\\d.]+)(.*)");
|
||||
|
||||
static boolean isLessThan(@Nullable String currentVersion, @Nullable String otherVersion) {
|
||||
return StringUtil.compareVersionNumbers(currentVersion, otherVersion) < 0;
|
||||
try {
|
||||
return StringUtil.compareVersionNumbers(currentVersion, otherVersion) < 0;
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
Logger.getInstance(Version.class).info("Unable to parse lombok version: " + currentVersion);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
Reference in New Issue
Block a user