Skip to content

Commit e52e3f0

Browse files
committed
sq fixes
1 parent 1b6e05c commit e52e3f0

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

src/main/java/com/github/_1c_syntax/bsl/mdo/storage/form/FormDataPath.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
public class FormDataPath {
3232

3333
/**
34-
* ссылка на пустой элемент
34+
* Ссылка на пустой элемент
3535
*/
3636
public static final FormDataPath EMPTY = new FormDataPath();
3737

src/main/java/com/github/_1c_syntax/bsl/mdo/support/MultiLanguageString.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,13 @@ private MultiLanguageString intern() {
182182

183183
@EqualsAndHashCode
184184
public static class Entry implements Comparable<Entry> {
185+
private static final StringInterner stringInterner = new StringInterner();
186+
private static final GenericInterner<Entry> interner = new GenericInterner<>();
187+
185188
@Getter
186189
private final String langKey;
187190
@Getter
188191
private final String value;
189-
private static final StringInterner stringInterner = new StringInterner();
190-
private static final GenericInterner<Entry> interner = new GenericInterner<>();
191192

192193
private Entry(String langKey, String value) {
193194
this.langKey = stringInterner.intern(langKey);

src/main/java/com/github/_1c_syntax/bsl/mdo/utils/LazyLoader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public List<MD> computeChildren(ChildrenOwner mdo) {
9999
}
100100

101101
/**
102-
* Производит расчет списка дочерних объектов исходя из типа объекта. Список включает дочерних дочерних
102+
* Производит расчет списка дочерних объектов исходя из типа объекта. Список включает все дочерних по иерархии вниз
103103
*
104104
* @param mdo Объект, у которого есть дочерние элементы
105105
* @return Немодифицируемый список дочерних объектов
@@ -244,7 +244,7 @@ private <T> List<T> addAll(List<T> result, List<? extends T> source) {
244244
return Collections.unmodifiableList(source);
245245
} else if (source.isEmpty()) {
246246
return result;
247-
} else if (result.getClass().getSimpleName().equals("UnmodifiableRandomAccessList")) {
247+
} else if ("UnmodifiableRandomAccessList".equals(result.getClass().getSimpleName())) {
248248
// todo надо придумать как красиво тип определить
249249
List<T> newList = new ArrayList<>(result);
250250
newList.addAll(source);

src/main/java/com/github/_1c_syntax/bsl/reader/common/ReaderUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public void unmarshal(HierarchicalStreamReader reader, UnmarshallingContext cont
4646
* @param clazz Класс для преобразования
4747
* @return Прочитанное значение
4848
*/
49+
@SuppressWarnings("unchecked")
4950
public <T> T readValue(UnmarshallingContext context, Class<T> clazz) {
5051
return (T) context.convertAnother(clazz, clazz);
5152
}

src/main/java/com/github/_1c_syntax/mdclasses/ValueTypeConverter.java

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,39 @@
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;
2323

2424
import com.github._1c_syntax.bsl.reader.MDOReader;
2525
import com.github._1c_syntax.bsl.reader.common.xstream.ReadConverter;
2626
import com.github._1c_syntax.mdclasses.mdo.support.ValueType;
2727
import com.thoughtworks.xstream.converters.UnmarshallingContext;
2828
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
2929

30-
import java.util.stream.Collectors;
31-
3230
public class ValueTypeConverter implements ReadConverter {
3331

3432
@Override
3533
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
3634
var valueType = (ValueType) context.convertAnother(reader, ValueType.class,
3735
MDOReader.getReflectionConverter(reader));
38-
return valueType.getTypes().stream().map(String::intern).collect(Collectors.toList());
36+
return valueType.getTypes().stream().map(String::intern).toList();
3937
}
4038

4139
@Override

0 commit comments

Comments
 (0)