Skip to content

Commit e5e1d5f

Browse files
committed
[Build] Use String.strip() instead of trim()
This also reverts "Use trim() instead of strip() because Jenkins doesn't like it now." This reverts commit 0cc3c77.
1 parent 836dfd2 commit e5e1d5f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

JenkinsJobs/Builds/build.jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ spec:
344344

345345
def readBuildProperties(String buildPropertiesFile){
346346
return readProperties(file: buildPropertiesFile, charset: 'UTF-8').collectEntries{n, v ->
347-
v = v.trim();
347+
v = v.strip();
348348
return [n, (v.startsWith('"') && v.endsWith('"') ? v.substring(1, v.length() - 1) : v)]
349349
}
350350
}

JenkinsJobs/Releng/publishToMaven.jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def installLatestEclipse(){
266266
def props = null
267267
dir("${WORKSPACE}/git-repo") {
268268
props = readProperties(file: 'cje-production/buildproperties.txt').collectEntries{n, v ->
269-
v = v.trim();
269+
v = v.strip();
270270
return [n, (v.startsWith('"') && v.endsWith('"') ? v.substring(1, v.length() - 1) : v)]
271271
}
272272
}
@@ -276,6 +276,6 @@ def installLatestEclipse(){
276276
def install(String toolType, String url) {
277277
dir("${WORKSPACE}/tools/${toolType}") {
278278
sh "curl -L ${url} | tar -xzf -"
279-
return "${pwd()}/" + sh(script: 'ls', returnStdout: true).trim()
279+
return "${pwd()}/" + sh(script: 'ls', returnStdout: true).strip()
280280
}
281281
}

JenkinsJobs/SmokeTests/StartSmokeTests.jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,6 @@ def installJDK(String version, String os, String arch, String releaseType='ga')
158158
}
159159
dir ("${WORKSPACE}/java") {
160160
sh "curl -L https://api.adoptium.net/v3/binary/latest/${version}/${releaseType}/${os}/${arch}/jdk/hotspot/normal/eclipse | tar -xzf -"
161-
return "${pwd()}/" + sh(script: 'ls', returnStdout: true).trim()
161+
return "${pwd()}/" + sh(script: 'ls', returnStdout: true).strip()
162162
}
163163
}

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pipeline {
4343
latestCommitID=$(curl https://download.eclipse.org/eclipse/relengScripts/state)
4444
git diff --name-only ${latestCommitID} HEAD \\
4545
production/ scripts/ cje-production/ eclipse.platform.releng.tychoeclipsebuilder/
46-
''', returnStdout: true).trim().isEmpty()
46+
''', returnStdout: true).strip().isEmpty()
4747
}
4848
}
4949
}

0 commit comments

Comments
 (0)