2
0
Fork 0
mirror of https://github.com/ethauvin/rife2.git synced 2025-04-30 10:38:12 -07:00

Don't make the repository aliases resolve ignoring case

This commit is contained in:
Geert Bevin 2023-04-04 16:54:54 -04:00
parent 422cf1eaf6
commit f47069bd03

View file

@ -77,21 +77,15 @@ public record Repository(String location, String username, String password) {
return new Repository(location, username, password);
}
if (locationOrName.equalsIgnoreCase("MAVEN_LOCAL")) {
return Repository.MAVEN_LOCAL;
} else if (locationOrName.equalsIgnoreCase("MAVEN_CENTRAL")) {
return Repository.MAVEN_CENTRAL;
} else if (locationOrName.equalsIgnoreCase("SONATYPE_RELEASES")) {
return Repository.SONATYPE_RELEASES;
} else if (locationOrName.equalsIgnoreCase("SONATYPE_SNAPSHOTS")) {
return Repository.SONATYPE_SNAPSHOTS;
} else if (locationOrName.equalsIgnoreCase("APACHE")) {
return Repository.APACHE;
} else if (locationOrName.equalsIgnoreCase("RIFE2")) {
return Repository.RIFE2;
}
return new Repository(locationOrName);
return switch (locationOrName) {
case "MAVEN_LOCAL" -> Repository.MAVEN_LOCAL;
case "MAVEN_CENTRAL" -> Repository.MAVEN_CENTRAL;
case "SONATYPE_RELEASES" -> Repository.SONATYPE_RELEASES;
case "SONATYPE_SNAPSHOTS" -> Repository.SONATYPE_SNAPSHOTS;
case "APACHE" -> Repository.APACHE;
case "RIFE2" -> Repository.RIFE2;
default -> new Repository(locationOrName);
};
}
/**