Skip to content

Commit

Permalink
Remove unused parsing method
Browse files Browse the repository at this point in the history
  • Loading branch information
nlisker committed Nov 23, 2024
1 parent bc8b13a commit 1da5385
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -235,29 +235,6 @@ void setupTools(String name, Closure loader, Closure processor) {
}
}

//String[] parseJavaVersion(String jRuntimeVersion) {
// def jVersion = jRuntimeVersion.split("[-\\+]")[0]
// def tmpBuildNumber = "0"
// if (jVersion.startsWith("1.")) {
// // This is a pre-JEP-223 version string
// def dashbIdx = jRuntimeVersion.lastIndexOf("-b")
// if (dashbIdx != -1) {
// tmpBuildNumber = jRuntimeVersion.substring(dashbIdx + 2)
// }
// } else {
// // This is a post-JEP-223 version string
// def plusIdx = jRuntimeVersion.indexOf("+")
// if (plusIdx != -1) {
// tmpBuildNumber = jRuntimeVersion.substring(plusIdx + 1)
// }
// }
// def jBuildNumber = tmpBuildNumber.split("[-\\+]")[0]
// def versionInfo = new String[2];
// versionInfo[0] = jVersion
// versionInfo[1] = jBuildNumber
// return versionInfo
//}

/**
* Fails the build with the specified error message
*
Expand Down Expand Up @@ -760,7 +737,7 @@ if (!file(JAVADOC).exists()) throw new Exception("Missing or incorrect path to '
//
// We need to parse the second line
Version jdkVersionInfo;
try(BufferedReader inStream = new java.io.BufferedReader(new java.io.InputStreamReader(
try (BufferedReader inStream = new java.io.BufferedReader(new java.io.InputStreamReader(
new java.lang.ProcessBuilder(JAVA, "-fullversion").start().getErrorStream()))) {
String v = inStream.readLine().trim();
if (v != null) {
Expand Down

0 comments on commit 1da5385

Please sign in to comment.