remove old code why did i commit this to the repo

This commit is contained in:
JeremyStar™ 2024-09-04 17:03:48 +02:00
parent 07cbbb9bb3
commit 9cd888299f
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -308,53 +308,6 @@ public final class DependencyResolver {
unmetDependencies.add("Dependency \"" + dependency + "\" is not met: Version " + vector.getVersion() + " is smaller than " + versionBigger); unmetDependencies.add("Dependency \"" + dependency + "\" is not met: Version " + vector.getVersion() + " is smaller than " + versionBigger);
} }
} }
/*
if (dependency.contains("=")) {
// Check for '<' and '>'
if (dependency.contains("<") || dependency.contains(">"))
throw new IllegalStateException("The dependency listing \"" + dependency + "\" can't require a specific version and have minimum and maximum version specifiers");
// Check for multiple '='
if (dependency.split("\\\\=").length != 1)
throw new IllegalStateException("The dependency listing \"" + dependency + "\" can't include multiple equals characters");
// Get identifier and required version
int index = dependency.indexOf("=");
String identifier = dependency.substring(0, index);
String version = dependency.substring(index + 1);
DependencyVector dependencyResolved = getMatchingVector(identifier);
if (dependencyResolved == null)
unmetDependencies.add("Dependency \"" + dependency + "\" is not met: Not found");
else {
VersioningSystem versioningSystemResolved;
VersioningSystem versioningSystemEquals;
// Create VersioningSystem instances for comparing versions
try {
versioningSystemResolved = dependencyResolved.getVersioningSystem().getDeclaredConstructor(String.class).newInstance(dependencyResolved.getVersion());
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException |
InvocationTargetException exception) {
logger.crash("Unable to check version of dependency \"" + dependency + "\": Unable to initialize versioning system " + dependencyResolved.getVersioningSystem().getName(), exception);
break;
}
try {
versioningSystemEquals = dependencyResolved.getVersioningSystem().getDeclaredConstructor(String.class).newInstance(version);
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException |
InvocationTargetException exception) {
logger.crash("Unable to initialize versioning system " + vector.getVersioningSystem().getName() + " of vector " + vector.getIdentifier(), exception);
break;
}
// Compare versions
if (versioningSystemResolved.compare(versioningSystemEquals) != 1)
unmetDependencies.add("Dependency \"" + dependency + "\" is not met: Expected version " + version + " does not match found version " + vector.getVersion());
}
} else {
throw new IllegalStateException("The dependency listing \"" + dependency + "\" does not contain a version identifier");
}
*/
} }
return unmetDependencies; return unmetDependencies;