-
Bug
-
Resolution: Fixed
-
Critical
-
None
While testing some changes in custom-folder-icons plugin I noticed that the FontAwesome icons seemed broken. Upon further investigation it shows that calling FontAwesomeIcons#getAvailableIcons() causes a java.nio.file.ClosedFileSystemException.
The culprit lies in https://github.com/jenkinsci/font-awesome-api-plugin/blob/3d36626f1b333cc52b7dde2d59968582eac0e72a/src/main/java/io/jenkins/plugins/fontawesome/FontAwesomeIcons.java#L105
if (StringUtils.equals(uri.getScheme(), "jar")) { try (FileSystem fileSystem = FileSystems.newFileSystem(uri, Collections.emptyMap())) { return fileSystem.getPath(IMAGES_SYMBOLS_PATH); } }
I suspect that this regression was introduced during https://github.com/strangelookingnerd/font-awesome-api-plugin/commit/1b418244a68942ae1ff27f5ece969b918d27d614 since the previous revision does not have this issue.
Please note that this does not happen in the JUnit tests of the plugin because the classpath of the tests is built different and therefor will not read from the plugin JAR file but the target folder.
- links to
I could reproduce it using a modified classpath configuration: