@@ -75,9 +75,9 @@ public static Collection<FailureEnricher> getFailureEnrichers(
75
75
@ VisibleForTesting
76
76
static Collection <FailureEnricher > getFailureEnrichers (
77
77
final Configuration configuration , final PluginManager pluginManager ) {
78
- Set <String > includedEnrichers = getIncludedFailureEnrichers (configuration );
78
+ final Set <String > enrichersToLoad = getIncludedFailureEnrichers (configuration );
79
79
// When empty, NO enrichers will be started.
80
- if (includedEnrichers .isEmpty ()) {
80
+ if (enrichersToLoad .isEmpty ()) {
81
81
return Collections .emptySet ();
82
82
}
83
83
final Iterator <FailureEnricherFactory > factoryIterator =
@@ -87,7 +87,7 @@ static Collection<FailureEnricher> getFailureEnrichers(
87
87
final FailureEnricherFactory failureEnricherFactory = factoryIterator .next ();
88
88
final FailureEnricher failureEnricher =
89
89
failureEnricherFactory .createFailureEnricher (configuration );
90
- if (includedEnrichers . contains (failureEnricher .getClass ().getName ())) {
90
+ if (enrichersToLoad . remove (failureEnricher .getClass ().getName ())) {
91
91
failureEnrichers .add (failureEnricher );
92
92
LOG .info (
93
93
"Found failure enricher {} at {}." ,
@@ -102,10 +102,16 @@ static Collection<FailureEnricher> getFailureEnrichers(
102
102
LOG .debug (
103
103
"Excluding failure enricher {}, not configured in enricher list ({})." ,
104
104
failureEnricherFactory .getClass ().getName (),
105
- includedEnrichers );
105
+ enrichersToLoad );
106
106
}
107
107
}
108
108
109
+ if (!enrichersToLoad .isEmpty ()) {
110
+ LOG .error (
111
+ "The following failure enrichers were configured but not found on the classpath: {}." ,
112
+ enrichersToLoad );
113
+ }
114
+
109
115
return filterInvalidEnrichers (failureEnrichers );
110
116
}
111
117
0 commit comments