|
1 |
| -/* |
2 |
| - * This file is a part of MDClasses. |
3 |
| - * |
4 |
| - * Copyright (c) 2019 - 2024 |
5 |
| - * Tymko Oleg <olegtymko@yandex.ru>, Maximov Valery <maximovvalery@gmail.com> and contributors |
6 |
| - * |
7 |
| - * SPDX-License-Identifier: LGPL-3.0-or-later |
8 |
| - * |
9 |
| - * MDClasses is free software; you can redistribute it and/or |
10 |
| - * modify it under the terms of the GNU Lesser General Public |
11 |
| - * License as published by the Free Software Foundation; either |
12 |
| - * version 3.0 of the License, or (at your option) any later version. |
13 |
| - * |
14 |
| - * MDClasses is distributed in the hope that it will be useful, |
15 |
| - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 |
| - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 |
| - * Lesser General Public License for more details. |
18 |
| - * |
19 |
| - * You should have received a copy of the GNU Lesser General Public |
20 |
| - * License along with MDClasses. |
21 |
| - */ |
22 |
| -package com.github._1c_syntax.mdclasses; |
| 1 | +/* |
| 2 | + * This file is a part of MDClasses. |
| 3 | + * |
| 4 | + * Copyright (c) 2019 - 2024 |
| 5 | + * Tymko Oleg <olegtymko@yandex.ru>, Maximov Valery <maximovvalery@gmail.com> and contributors |
| 6 | + * |
| 7 | + * SPDX-License-Identifier: LGPL-3.0-or-later |
| 8 | + * |
| 9 | + * MDClasses is free software; you can redistribute it and/or |
| 10 | + * modify it under the terms of the GNU Lesser General Public |
| 11 | + * License as published by the Free Software Foundation; either |
| 12 | + * version 3.0 of the License, or (at your option) any later version. |
| 13 | + * |
| 14 | + * MDClasses is distributed in the hope that it will be useful, |
| 15 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 | + * Lesser General Public License for more details. |
| 18 | + * |
| 19 | + * You should have received a copy of the GNU Lesser General Public |
| 20 | + * License along with MDClasses. |
| 21 | + */ |
| 22 | +package com.github._1c_syntax.mdclasses; |
23 | 23 |
|
24 | 24 | import com.github._1c_syntax.bsl.reader.MDOReader;
|
25 | 25 | import com.github._1c_syntax.bsl.reader.common.xstream.ReadConverter;
|
26 | 26 | import com.github._1c_syntax.mdclasses.mdo.support.ValueType;
|
27 | 27 | import com.thoughtworks.xstream.converters.UnmarshallingContext;
|
28 | 28 | import com.thoughtworks.xstream.io.HierarchicalStreamReader;
|
29 | 29 |
|
30 |
| -import java.util.stream.Collectors; |
31 |
| - |
32 | 30 | public class ValueTypeConverter implements ReadConverter {
|
33 | 31 |
|
34 | 32 | @Override
|
35 | 33 | public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
|
36 | 34 | var valueType = (ValueType) context.convertAnother(reader, ValueType.class,
|
37 | 35 | MDOReader.getReflectionConverter(reader));
|
38 |
| - return valueType.getTypes().stream().map(String::intern).collect(Collectors.toList()); |
| 36 | + return valueType.getTypes().stream().map(String::intern).toList(); |
39 | 37 | }
|
40 | 38 |
|
41 | 39 | @Override
|
|
0 commit comments