|
32 | 32 | import java.util.Map; |
33 | 33 | import java.util.Map.Entry; |
34 | 34 | import java.util.Set; |
| 35 | +import java.util.regex.Pattern; |
35 | 36 | import java.util.stream.Collectors; |
36 | 37 | import java.util.stream.Stream; |
37 | 38 |
|
|
73 | 74 | */ |
74 | 75 | public class FrontendDependencies extends AbstractDependenciesScanner { |
75 | 76 |
|
| 77 | + //@formatter:off |
| 78 | + private static final Pattern VISITABLE_CLASS_PATTERN = Pattern.compile("(^$|" |
| 79 | + + ".*(slf4j).*|" |
| 80 | + // #5803 |
| 81 | + + "^(java|sun|oracle|elemental|javax|jakarta|oshi|" |
| 82 | + + "org\\.(apache|atmosphere|jsoup|jboss|w3c|spring|joda|hibernate|glassfish|hsqldb|osgi|jooq)|" |
| 83 | + + "com\\.(helger|spring|gwt|lowagie|fasterxml|sun|nimbusds|googlecode)|" |
| 84 | + + "net\\.(sf|bytebuddy)" |
| 85 | + + ").*|" |
| 86 | + + ".*(Exception)$" |
| 87 | + + ")"); |
| 88 | + //@formatter:on |
| 89 | + |
76 | 90 | private final HashMap<String, EntryPointData> entryPoints = new LinkedHashMap<>(); |
77 | 91 | private ThemeDefinition themeDefinition; |
78 | 92 | private AbstractTheme themeInstance; |
@@ -798,15 +812,8 @@ private boolean shouldVisit(String className) { |
798 | 812 | // factories. This is the reason of having just a blacklist of some |
799 | 813 | // common name-spaces that would not have components. |
800 | 814 | // We also exclude Feature-Flag classes |
801 | | - return className != null && // @formatter:off |
802 | | - !isExperimental(className) && |
803 | | - !className.matches( |
804 | | - "(^$|" |
805 | | - + ".*(slf4j).*|" |
806 | | - // #5803 |
807 | | - + "^(java|sun|elemental|javax|jakarta|oshi|org.(apache|atmosphere|jsoup|jboss|w3c|spring|joda|hibernate|glassfish|hsqldb)|com.(helger|spring|gwt|lowagie|fasterxml|sun|nimbusds)|net.(sf|bytebuddy)).*|" |
808 | | - + ".*(Exception)$" |
809 | | - + ")"); // @formatter:on |
| 815 | + return className != null && !isExperimental(className) |
| 816 | + && !VISITABLE_CLASS_PATTERN.matcher(className).matches(); |
810 | 817 | } |
811 | 818 |
|
812 | 819 | private URL getUrl(String className) { |
|
0 commit comments