You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an intellij urls user I expect that the edition folder name is community. Currently we use intellij as the folder name for the edition of intellij and getEdition returns community, only to get the correct edition from the json of Jetbrains for determining the version for the edition.
This results in a name clash within a check for url updaters, as folder names in urls do not fit to the edition name in this special case.
I've created an ugly workaround for this in my current PR, as using just the getCpeEdition method could result in possible other naming clashes with the CVE database.
Actual behavior
/**
* Retrieves the {@link AbstractUrlUpdater updater} that matches the given tool and edition.
*
* @param tool the tool to retrieve the updater for.
* @param edition the edition to retrieve the updater for.
* @return the {@link AbstractUrlUpdater updater} that matches the given tool and edition.
*/
public AbstractUrlUpdater retrieveUrlUpdater(String tool, String edition) {
for (AbstractUrlUpdater updater : updaters) {
if (updater.getTool().equals(tool) && updater.getEdition().equals(edition)) {
return updater;
}
}
return null;
}
Here getEdition() will yield: "community" but the provided edition will be "intellij" as the folder name for the edition in urls was changed from "community" to "intellij".
vs
/**
* Retrieves the {@link AbstractUrlUpdater updater} that matches the given tool and edition.
*
* @param tool the tool to retrieve the updater for.
* @param edition the edition to retrieve the updater for.
* @return the {@link AbstractUrlUpdater updater} that matches the given tool and edition.
*/
public AbstractUrlUpdater retrieveUrlUpdater(String tool, String edition) {
for (AbstractUrlUpdater updater : updaters) {
if (updater.getTool().equals(tool) && updater.getCpeEdition().equals(edition)) {
return updater;
}
}
return null;
}
Here the getCpeEdition would not fit as it might have to be changed for other tools.
Steps to reproduce (bug) / Use Case of feature request (enhancement)
See example and TODO in code.
Related/Dependent Issues
Comments/Hints:
Affected version:
OS: Windows/Linux/Mac?
Browser: Chrome/Firefox/Safari?
The text was updated successfully, but these errors were encountered:
As an intellij urls user I expect that the edition folder name is community. Currently we use intellij as the folder name for the edition of intellij and getEdition returns community, only to get the correct edition from the json of Jetbrains for determining the version for the edition.
This issue is a simple missunderstanding. For editions there was an explicit design decision to end the hacks and quirks with tool specific edition defaults and align the forever to get consistency: #1088
So in other words: For every tool «tool» there is always an edition with the same name «tool» and that is the default.
The only excuse is docker where the docker edition is DockerDesktop what requires a license so the default is rancher.
Expected behavior
As an intellij urls user I expect that the edition folder name is
community
. Currently we useintellij
as the folder name for the edition of intellij and getEdition returnscommunity
, only to get the correct edition from the json of Jetbrains for determining the version for the edition.This results in a name clash within a check for url updaters, as folder names in urls do not fit to the edition name in this special case.
I've created an ugly workaround for this in my current PR, as using just the getCpeEdition method could result in possible other naming clashes with the CVE database.
Actual behavior
Here getEdition() will yield: "community" but the provided edition will be "intellij" as the folder name for the edition in urls was changed from "community" to "intellij".
vs
Here the getCpeEdition would not fit as it might have to be changed for other tools.
Steps to reproduce (bug) / Use Case of feature request (enhancement)
Related/Dependent Issues
Comments/Hints:
Affected version:
The text was updated successfully, but these errors were encountered: