File tree Expand file tree Collapse file tree
src/test/kotlin/com/lambda/lambdaLoader Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ class VersionControllerTest {
1515 // This is necessary because FabricLoader is not available in the test environment
1616
1717 companion object {
18- private val mavenReleasesUrl = " https://maven.lambda-client.org/releases/com/lambda/lambda/maven-metadata.xml"
19- private val mavenSnapshotsUrl = " https://maven.lambda-client.org/snapshots/com/lambda/lambda/maven-metadata.xml"
18+ private const val MAVEN_RELEASES_URL = " https://maven.lambda-client.org/releases/com/lambda/lambda/maven-metadata.xml"
19+ private const val MAVEN_SNAPSHOTS_URL = " https://maven.lambda-client.org/snapshots/com/lambda/lambda/maven-metadata.xml"
2020
2121 /* *
2222 * Fetches all unique Minecraft versions available in Maven repositories
@@ -26,15 +26,15 @@ class VersionControllerTest {
2626
2727 // Get versions from releases
2828 try {
29- val releasesXml = URI (mavenReleasesUrl ).toURL().readText()
29+ val releasesXml = URI (MAVEN_RELEASES_URL ).toURL().readText()
3030 versions.addAll(parseMinecraftVersionsFromMaven(releasesXml))
3131 } catch (e: Exception ) {
3232 println (" Warning: Could not fetch releases: ${e.message} " )
3333 }
3434
3535 // Get versions from snapshots
3636 try {
37- val snapshotsXml = URI (mavenSnapshotsUrl ).toURL().readText()
37+ val snapshotsXml = URI (MAVEN_SNAPSHOTS_URL ).toURL().readText()
3838 versions.addAll(parseMinecraftVersionsFromMaven(snapshotsXml))
3939 } catch (e: Exception ) {
4040 println (" Warning: Could not fetch snapshots: ${e.message} " )
You can’t perform that action at this time.
0 commit comments