Skip to content

Commit c803ba5

Browse files
committed
refactor
1 parent 22c2d3b commit c803ba5

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

app/aem/core/src/main/java/com/cognifide/apm/core/services/CustomDefinitionsProvider.java

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*-
2+
* ========================LICENSE_START=================================
3+
* AEM Permission Management
4+
* %%
5+
* Copyright (C) 2013 Wunderman Thompson Technology
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* =========================LICENSE_END==================================
19+
*/
120
package com.cognifide.apm.core.services;
221

322
import com.cognifide.apm.api.services.DefinitionsProvider;
@@ -28,10 +47,10 @@ public class CustomDefinitionsProvider implements DefinitionsProvider {
2847
public void activate(Configuration config) {
2948
predefinedDefinitions = Arrays.stream(config.definitions())
3049
.map(definition -> definition.split("="))
31-
.map(parts -> StringUtils.stripAll(parts))
32-
.filter(parts -> StringUtils.isNoneEmpty(parts))
50+
.map(StringUtils::stripAll)
51+
.filter(StringUtils::isNoneEmpty)
3352
.filter(parts -> parts.length == 2)
34-
.collect(Collectors.toMap(parts -> parts[0], parts -> parts[1], (a, b) -> b);
53+
.collect(Collectors.toMap(parts -> parts[0], parts -> parts[1], (first, second) -> first));
3554
}
3655

3756
@Override

0 commit comments

Comments
 (0)