|
| 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 | + */ |
1 | 20 | package com.cognifide.apm.core.services;
|
2 | 21 |
|
3 | 22 | import com.cognifide.apm.api.services.DefinitionsProvider;
|
@@ -28,10 +47,10 @@ public class CustomDefinitionsProvider implements DefinitionsProvider {
|
28 | 47 | public void activate(Configuration config) {
|
29 | 48 | predefinedDefinitions = Arrays.stream(config.definitions())
|
30 | 49 | .map(definition -> definition.split("="))
|
31 |
| - .map(parts -> StringUtils.stripAll(parts)) |
32 |
| - .filter(parts -> StringUtils.isNoneEmpty(parts)) |
| 50 | + .map(StringUtils::stripAll) |
| 51 | + .filter(StringUtils::isNoneEmpty) |
33 | 52 | .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)); |
35 | 54 | }
|
36 | 55 |
|
37 | 56 | @Override
|
|
0 commit comments