Skip to content

Commit

Permalink
fix: using built in version to compare versions
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmaaa committed Sep 30, 2024
1 parent 7ab20e4 commit 5d478d6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*******************************************************************************/
package com.espressif.idf.ui.size;

import java.lang.module.ModuleDescriptor.Version;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand All @@ -19,7 +20,6 @@
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.osgi.framework.Version;

import com.espressif.idf.core.IDFCorePlugin;
import com.espressif.idf.core.IDFEnvironmentVariables;
Expand Down Expand Up @@ -209,8 +209,8 @@ private List<String> addJsonParseCommand()

public boolean isVersionAtLeast(String currentIDFVersion, String minimumIDFVersion)
{
Version currentVersion = Version.parseVersion(currentIDFVersion);
Version minVersion = Version.parseVersion(minimumIDFVersion);
Version currentVersion = Version.parse(currentIDFVersion);
Version minVersion = Version.parse(minimumIDFVersion);
return currentVersion.compareTo(minVersion) >= 0;
}

Expand Down

0 comments on commit 5d478d6

Please sign in to comment.