File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed
src/main/kotlin/com/lambda/loader Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ abstract class BaseMavenVersionController(
8484 if (matchingVersions.isEmpty()) {
8585 if (ConfigManager .config.debug) {
8686 val versionMsg = versionToMatch?.let { " for version $it " } ? : " "
87- logger.warning(" No ${ artifactName} versions found $versionMsg " )
87+ logger.warning(" No $artifactName versions found $versionMsg " )
8888 logger.warning(" Available versions: ${versions.joinToString(" , " )} " )
8989 }
9090 return null
@@ -93,7 +93,7 @@ abstract class BaseMavenVersionController(
9393 val latestVersion = matchingVersions.last()
9494 if (ConfigManager .config.debug) {
9595 val versionMsg = versionToMatch?.let { " for version $it " } ? : " "
96- logger.info(" Found latest ${ artifactName} version $versionMsg : $latestVersion " )
96+ logger.info(" Found latest $artifactName version $versionMsg : $latestVersion " )
9797 }
9898 latestVersion
9999 } catch (e: Exception ) {
@@ -265,7 +265,7 @@ abstract class BaseMavenVersionController(
265265 return false
266266 }
267267
268- val actualChecksum = cache.checksumBytes (jarData)
268+ val actualChecksum = cache.checkSumBytes (jarData)
269269 if (actualChecksum != expectedChecksum) {
270270 logger.severe(" Checksum mismatch! Expected: $expectedChecksum , Got: $actualChecksum " )
271271 return false
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class Cache(baseDir: File = File("lambda")) {
1717 }
1818
1919
20- private fun checkSumBytes (bytes : ByteArray ): String {
20+ fun checkSumBytes (bytes : ByteArray ): String {
2121 val digest = md.digest(bytes)
2222 return digest.joinToString(" " ) { " %02x" .format(it) }
2323 }
@@ -62,9 +62,4 @@ class Cache(baseDir: File = File("lambda")) {
6262 val cachedData = getCachedVersionBytes(name) ? : return false
6363 return checkSumBytes(cachedData) == checksum.lowercase()
6464 }
65-
66- fun checksumBytes (bytes : ByteArray ): String {
67- return checkSumBytes(bytes)
68- }
69-
7065}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ class LoaderVersionController(
6464 val latestVersion = when (getReleaseMode()) {
6565 ReleaseMode .Stable -> checkStableVersion()
6666 ReleaseMode .Snapshot -> checkSnapshotVersion()
67- }
67+ }?.substringBefore( " + " )
6868
6969 if (latestVersion == null ) {
7070 logger.warning(" Could not fetch latest loader version" )
You can’t perform that action at this time.
0 commit comments