Skip to content

Commit a4cf0f1

Browse files
committed
Update build.sbt
1 parent 27fe6f0 commit a4cf0f1

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

build.sbt

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ scalaMajorVersion := {
6060
}
6161
}
6262

63-
val addJava17Tests: Boolean = compareVersions(System.getProperty("java.version"), "17.0.0") >= 0
63+
val addJava17Tests: Boolean = System.getProperty("java.specification.version").toDouble >= 17
6464

6565
scalacOptions ++= {
6666
val additionalSettings =
@@ -167,23 +167,3 @@ enablePlugins(ReproducibleBuildsPlugin)
167167
enablePlugins(SiteScaladocPlugin)
168168
//enablePlugins(GhpagesPlugin)
169169
git.remoteRepo := "git@github.com:FasterXML/jackson-module-scala.git"
170-
171-
def compareVersions(version1: String, version2: String): Int = {
172-
var comparisonResult = 0
173-
val version1Splits = version1.split("\\.")
174-
val version2Splits = version2.split("\\.")
175-
val maxLengthOfVersionSplits = Math.max(version1Splits.length, version2Splits.length)
176-
var i = 0
177-
while (comparisonResult == 0 && i < maxLengthOfVersionSplits) {
178-
val v1 = if (i < version1Splits.length) version1Splits(i).toInt
179-
else 0
180-
val v2 = if (i < version2Splits.length) version2Splits(i).toInt
181-
else 0
182-
val compare = v1.compareTo(v2)
183-
if (compare != 0) {
184-
comparisonResult = compare
185-
}
186-
i += 1
187-
}
188-
comparisonResult
189-
}

0 commit comments

Comments
 (0)