Author: mthl Date: Fri Mar 1 13:52:57 2019 New Revision: 1854585 URL: http://svn.apache.org/viewvc?rev=1854585&view=rev Log: Improved: rewrite ‘subprojectExists’ in build script (OFBIZ-10695)
Use ‘anyMatch’ which is semantically equivalent but clearer. Modified: ofbiz/ofbiz-framework/trunk/build.gradle Modified: ofbiz/ofbiz-framework/trunk/build.gradle URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/build.gradle?rev=1854585&r1=1854584&r2=1854585&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/build.gradle (original) +++ ofbiz/ofbiz-framework/trunk/build.gradle Fri Mar 1 13:52:57 2019 @@ -1099,9 +1099,7 @@ def getJarManifestClasspathForCurrentOs( def subprojectExists(fullyQualifiedProject) { subprojects.stream() - .filter { it.path == fullyQualifiedProject.toString() } - .findAny() - .isPresent() + .anyMatch { it.path == fullyQualifiedProject.toString() } } def taskExistsInproject(fullyQualifiedProject, taskName) {