|
1 | 1 | package io.jenkins.plugins.fontawesome; |
2 | 2 |
|
| 3 | +import org.apache.commons.lang3.Strings; |
| 4 | + |
| 5 | +import edu.umd.cs.findbugs.annotations.CheckForNull; |
| 6 | + |
3 | 7 | import java.io.IOException; |
4 | 8 | import java.net.URI; |
5 | 9 | import java.net.URISyntaxException; |
|
17 | 21 | import java.util.stream.Collectors; |
18 | 22 | import java.util.stream.Stream; |
19 | 23 |
|
20 | | -import org.apache.commons.lang3.StringUtils; |
21 | | - |
22 | | -import edu.umd.cs.findbugs.annotations.CheckForNull; |
23 | | - |
24 | 24 | import io.jenkins.plugins.fontawesome.SvgTag.FontAwesomeStyle; |
25 | 25 |
|
26 | 26 | /** |
@@ -75,10 +75,10 @@ private static Map<String, String> getIconsFromClasspath(@CheckForNull final Fon |
75 | 75 | while (urls.hasMoreElements()) { |
76 | 76 | URL url = urls.nextElement(); |
77 | 77 |
|
78 | | - if (StringUtils.contains(url.toExternalForm(), FONT_AWESOME_API_PLUGIN)) { |
| 78 | + if (Strings.CS.contains(url.toExternalForm(), FONT_AWESOME_API_PLUGIN)) { |
79 | 79 | URI uri = url.toURI(); |
80 | 80 |
|
81 | | - if (StringUtils.equals(uri.getScheme(), "jar")) { |
| 81 | + if (Strings.CS.contains(uri.getScheme(), "jar")) { |
82 | 82 | try (FileSystem fileSystem = FileSystems.newFileSystem(uri, Collections.emptyMap())) { |
83 | 83 | return filterIcons(fileSystem.getPath(IMAGES_SYMBOLS_PATH), filter); |
84 | 84 | } |
@@ -114,11 +114,11 @@ private static Stream<Path> createIconStream(final Path iconFolder, @CheckForNul |
114 | 114 |
|
115 | 115 | private static String createFileName(final Path icon) { |
116 | 116 | return icon.getParent().getFileName() + "/" |
117 | | - + StringUtils.removeEnd(icon.getFileName().toString(), SVG_FILE_ENDING); |
| 117 | + + Strings.CS.removeEnd(icon.getFileName().toString(), SVG_FILE_ENDING); |
118 | 118 | } |
119 | 119 |
|
120 | 120 | private static boolean isSvgImage(final Path path) { |
121 | | - return StringUtils.endsWith(path.getFileName().toString(), SVG_FILE_ENDING); |
| 121 | + return Strings.CS.endsWith(path.getFileName().toString(), SVG_FILE_ENDING); |
122 | 122 | } |
123 | 123 |
|
124 | 124 | private FontAwesomeIcons() { |
|
0 commit comments