From d3ddbd634302bd1a2df0d1575892abf07a1c550b Mon Sep 17 00:00:00 2001 From: Ben Liblit Date: Thu, 18 Jan 2018 18:09:13 -0600 Subject: [PATCH] Be more concise by omitting implicit "it." in closures --- com.ibm.wala.cast.js.nodejs/build.gradle | 8 ++++---- com.ibm.wala.cast.js.test.data/build.gradle | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/com.ibm.wala.cast.js.nodejs/build.gradle b/com.ibm.wala.cast.js.nodejs/build.gradle index ff66e0719..8237a729f 100644 --- a/com.ibm.wala.cast.js.nodejs/build.gradle +++ b/com.ibm.wala.cast.js.nodejs/build.gradle @@ -24,11 +24,11 @@ task verifyNodeJS(type: VerifyWithStamp, dependsOn: downloadNodeJS) { task unpackNodeJSLib(type: Sync, dependsOn: verifyNodeJS) { from(zipTree(verifyNodeJS.src)) { eachFile { - if (it.relativePath.pathString.startsWith('nodejs-node-0a604e9/lib/')) { - def renamedRelative = new RelativePath(!it.directory, 'core-modules', it.relativePath.lastName) - it.relativePath = renamedRelative + if (relativePath.pathString.startsWith('nodejs-node-0a604e9/lib/')) { + def renamedRelative = new RelativePath(!directory, 'core-modules', relativePath.lastName) + relativePath = renamedRelative } else - it.exclude() + exclude() } } diff --git a/com.ibm.wala.cast.js.test.data/build.gradle b/com.ibm.wala.cast.js.test.data/build.gradle index 538712810..cc9b36320 100644 --- a/com.ibm.wala.cast.js.test.data/build.gradle +++ b/com.ibm.wala.cast.js.test.data/build.gradle @@ -16,9 +16,8 @@ task verifyAjaxslt(type: VerifyWithStamp, dependsOn: downloadAjaxslt) { task unpackAjaxslt(type: Copy, dependsOn: verifyAjaxslt) { from(tarTree(verifyAjaxslt.src)) { eachFile { - def newSegments = ['ajaxslt'] + it.relativePath.segments[1 .. -1] as String[] - def newPath = new RelativePath(!it.directory, newSegments) - it.relativePath = newPath + def newSegments = ['ajaxslt'] + relativePath.segments[1 .. -1] as String[] + relativePath = new RelativePath(!directory, newSegments) } } into 'examples-src'