File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
framework/base/src/main/java/org/apache/ofbiz/base/component Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -136,18 +136,17 @@ public static List<ServiceResourceInfo> getAllServiceResourceInfos(String type)
136
136
.collect (Collectors .toList ());
137
137
}
138
138
139
- public static List <TestSuiteInfo > getAllTestSuiteInfos () {
140
- return getAllTestSuiteInfos (null );
141
- }
142
-
143
- public static List <TestSuiteInfo > getAllTestSuiteInfos (String componentName ) {
144
- List <TestSuiteInfo > testSuiteInfos = new ArrayList <>();
145
- for (ComponentConfig cc : getAllComponents ()) {
146
- if (componentName == null || componentName .equals (cc .getComponentName ())) {
147
- testSuiteInfos .addAll (cc .getTestSuiteInfos ());
148
- }
149
- }
150
- return testSuiteInfos ;
139
+ /**
140
+ * Provides the list of all the test-suite information matching a component name.
141
+ *
142
+ * @param name the name of the component to match where {@code null} means "any"
143
+ * @return a list of test-suite information
144
+ */
145
+ public static List <TestSuiteInfo > getAllTestSuiteInfos (String name ) {
146
+ return getAllComponents ().stream ()
147
+ .filter (cc -> name == null || name .equals (cc .getComponentName ()))
148
+ .flatMap (cc -> cc .getTestSuiteInfos ().stream ())
149
+ .collect (Collectors .toList ());
151
150
}
152
151
153
152
public static List <WebappInfo > getAllWebappResourceInfos () {
You can’t perform that action at this time.
0 commit comments