Skip to content

Commit

Permalink
Revert "fix(java): inconsistent version resolution (#1957)" (#1993)
Browse files Browse the repository at this point in the history
This reverts commit 454bee9.
  • Loading branch information
jdx authored Apr 29, 2024
1 parent ed91c1c commit 07884eb
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/plugins/core/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,17 +415,7 @@ fn fuzzy_match_filter(versions: Vec<String>, query: &str) -> eyre::Result<Vec<St
if query == "latest" {
query = "[0-9].*";
}

// check for major versions (e.g. openjdk-17)
// for which we fuzzy match the exact version without minor/patch (see #1887)
let major_version_regex = Regex::new(r"[a-z]-\d{1,}$")?;
let query_regex_str = if major_version_regex.is_match(query) {
format!("^{}([+-].+)?$", query)
} else {
format!("^{}([+-.].+)?$", query)
};

let query_regex = Regex::new(&query_regex_str)?;
let query_regex = Regex::new(&format!("^{}([+-.].+)?$", query))?;
let versions = versions
.into_iter()
.filter(|v| {
Expand Down

0 comments on commit 07884eb

Please sign in to comment.