mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed NPE in version comparator inside PyRequirement
This commit is contained in:
@@ -161,6 +161,9 @@ public class PyRequirement {
|
||||
@NotNull
|
||||
private List<String> parse(@Nullable String s) {
|
||||
// Version parsing from pkg_resources ensures that all the "pre", "alpha", "rc", etc. are sorted correctly
|
||||
if (s == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
final Pattern COMPONENT_RE = Pattern.compile("\\d+|[a-z]+|\\.|-|.+");
|
||||
final List<String> results = new ArrayList<String>();
|
||||
final Matcher matcher = COMPONENT_RE.matcher(s);
|
||||
|
||||
Reference in New Issue
Block a user