@@ -219,7 +219,7 @@ private String downloadPatch(CacheStore cacheStore) throws IOException {
219219 // if the patchVersion is specified, narrow the list of patches with the value of patchVersion
220220 String patchXpath = "string(/results/patch" ;
221221 if (patchVersion != null ) {
222- patchXpath = patchXpath + "[release[@name='%s']]" ;
222+ patchXpath = String . format ( patchXpath + "[release[@name='%s']]" , patchVersion ) ;
223223 } else {
224224 String actualVersion = applyXpath (aruInfo , "string(/results/patch/release/@name)" );
225225 if (Utils .compareVersions (getVersion (), actualVersion ) != 0 ) {
@@ -236,9 +236,9 @@ private String downloadPatch(CacheStore cacheStore) throws IOException {
236236 }
237237 }
238238
239- String downloadUrlXpath = patchXpath + "/files/file/download_url/ " ;
240- String downLoadLink = applyXpath (aruInfo , downloadUrlXpath + "text())" );
241- String downLoadHost = applyXpath (aruInfo , downloadUrlXpath + "@host)" );
239+ String downloadUrlXpath = patchXpath + "/files/file/download_url" ;
240+ String downLoadLink = applyXpath (aruInfo , downloadUrlXpath + "/ text())" );
241+ String downLoadHost = applyXpath (aruInfo , downloadUrlXpath + "/ @host)" );
242242 logger .finer ("using download URL xpath = {0}, found link={1}, host={2}" ,
243243 downloadUrlXpath , downLoadLink , downLoadHost );
244244
0 commit comments