void () { File root = tempDir.getRoot(); while (root.getParentFile() != null) root = root.getParentFile(); String diskRoot = UriUtil.trimTrailingSlashes(FileUtil.toSystemIndependentName(root.getPath())); assertJarSeparatorParsedCorrectlyForFileInsideJar("/", "!/", null, "_"); assertJarSeparatorParsedCorrectlyForFileInsideJar("!/", "!/", null, "_"); assertJarSeparatorParsedCorrectlyForFileInsideJar("!/xxx", "!/xxx", "xxx", "xxx"); assertJarSeparatorParsedCorrectlyForFileInsideJar("!/xxx/!/yyy", "!/xxx/!/yyy", "yyy", "xxx/!/yyy"); if (SystemInfo.isWindows) { assertJarSeparatorParsedCorrectly("jar://" + diskRoot + "/!/abc", "jar://" + diskRoot + "!/abc", "abc"); assertJarSeparatorParsedCorrectly("jar://" + diskRoot + "!/abc", "jar://" + diskRoot + "!/abc", "abc"); } }