Source:
<code>private synchronized File unpackFromJarURL(URL url, String fileName, ClassLoader cl) { ZipFile zip = null; try { String path = url.getPath(); int idx1 = path.lastIndexOf(".jar!"); if (idx1 == -1) { idx1 = path.lastIndexOf(".zip!"); } int idx2 = path.lastIndexOf(".jar!", idx1 - 1); if (idx2 == -1) { idx2 = path.lastIndexOf(".zip!", idx1 - 1); } if (idx2 == -1) { File file = new File(URLDecoder.decode(path.substring(5, idx1 + 4), "UTF-8")); zip = new ZipFile(file); } else { String s = path.substring(idx2 + 6, idx1 + 4); File file = resolveFile(s); zip = new ZipFile(file); } String inJarPath = path.substring(idx1 + 6); String[] parts = JAR_URL_SEP_PATTERN.split(inJarPath); StringBuilder prefixBuilder = new StringBuilder(); for (int i = 0; i < parts.length - 1; i++) { prefixBuilder.append(parts[i]).append("/"); } String prefix = prefixBuilder.toString(); Enumeration<? extends ZipEntry> entries = zip.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); String name = entry.getName(); <START> if (name.startsWith(prefix + fileName)) { <END> File file = new File(cacheDir, name.substring(prefix.length())); if (name.endsWith("/")) { file.mkdirs(); } else { file.getParentFile().mkdirs(); try (InputStream is = zip.getInputStream(entry)) { if (ENABLE_CACHING) { Files.copy(is, file.toPath()); } else { Files.copy(is, file.toPath(), StandardCopyOption.REPLACE_EXISTING); } } catch (FileAlreadyExistsException ignore) { } } } } } catch (IOException e) { throw new VertxException(e); } finally { closeQuietly(zip); } return new File(cacheDir, fileName); }</code><technical_language>if prefix empty avoid string concat fileName</technical_language>

Target:
private synchronized File unpackFromJarURL(URL url, String fileName, ClassLoader cl) { ZipFile zip = null; try { String path = url.getPath(); int idx1 = path.lastIndexOf(".jar!"); if (idx1 == -1) { idx1 = path.lastIndexOf(".zip!"); } int idx2 = path.lastIndexOf(".jar!", idx1 - 1); if (idx2 == -1) { idx2 = path.lastIndexOf(".zip!", idx1 - 1); } if (idx2 == -1) { File file = new File(URLDecoder.decode(path.substring(5, idx1 + 4), "UTF-8")); zip = new ZipFile(file); } else { String s = path.substring(idx2 + 6, idx1 + 4); File file = resolveFile(s); zip = new ZipFile(file); } String inJarPath = path.substring(idx1 + 6); String[] parts = JAR_URL_SEP_PATTERN.split(inJarPath); StringBuilder prefixBuilder = new StringBuilder(); for (int i = 0; i < parts.length - 1; i++) { prefixBuilder.append(parts[i]).append("/"); } String prefix = prefixBuilder.toString(); Enumeration<? extends ZipEntry> entries = zip.entries(); while (entries.hasMoreElements()) { ZipEntry entry = entries.nextElement(); String name = entry.getName(); if (name.startsWith(prefix.isEmpty() ? fileName : prefix + fileName)) { File file = new File(cacheDir, prefix.isEmpty() ? name : name.substring(prefix.length())); if (name.endsWith("/")) { file.mkdirs(); } else { file.getParentFile().mkdirs(); try (InputStream is = zip.getInputStream(entry)) { if (ENABLE_CACHING) { Files.copy(is, file.toPath()); } else { Files.copy(is, file.toPath(), StandardCopyOption.REPLACE_EXISTING); } } catch (FileAlreadyExistsException ignore) { } } } } } catch (IOException e) { throw new VertxException(e); } finally { closeQuietly(zip); } return new File(cacheDir, fileName); }