Skip to content

Commit 5ac3df2

Browse files
committed
Finish v0.6.2
2 parents dd266fc + 1a1b4b0 commit 5ac3df2

File tree

11 files changed

+72
-23
lines changed

11 files changed

+72
-23
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
java_version: ['17', '20']
11+
java_version: ['17', '21']
1212
os: [ubuntu-latest, windows-latest, macOS-latest]
1313
steps:
1414
- uses: actions/checkout@v4

.idea/compiler.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ plugins {
77
jacoco
88
signing
99
id("org.cadixdev.licenser") version "0.6.1"
10-
id("me.qoomon.git-versioning") version "6.4.3"
10+
id("me.qoomon.git-versioning") version "6.4.4"
1111
id("com.gorylenko.gradle-git-properties") version "2.4.2"
12-
id("io.freefair.lombok") version "8.6"
13-
id("io.freefair.javadoc-links") version "8.6"
14-
id("io.freefair.javadoc-utf-8") version "8.6"
15-
id("io.freefair.maven-central.validate-poms") version "8.6"
12+
id("io.freefair.lombok") version "8.11"
13+
id("io.freefair.javadoc-links") version "8.11"
14+
id("io.freefair.javadoc-utf-8") version "8.11"
15+
id("io.freefair.maven-central.validate-poms") version "8.11"
1616
id("com.github.ben-manes.versions") version "0.51.0"
1717
id("ru.vyarus.pom") version "3.0.0"
1818
id("io.codearte.nexus-staging") version "0.30.0"
@@ -40,13 +40,11 @@ repositories {
4040
mavenCentral()
4141
}
4242

43-
val junitVersion = "5.7.0"
44-
4543
dependencies {
46-
compileOnly("com.github.spotbugs:spotbugs-annotations:4.8.5")
47-
testImplementation("org.junit.jupiter", "junit-jupiter-api", junitVersion)
48-
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", junitVersion)
49-
testImplementation("org.assertj", "assertj-core", "3.18.1")
44+
compileOnly("com.github.spotbugs", "spotbugs-annotations", "4.8.6")
45+
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.11.4")
46+
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.11.4")
47+
testImplementation("org.assertj", "assertj-core", "3.27.0")
5048
}
5149

5250
java {
@@ -81,7 +79,7 @@ tasks.check {
8179
tasks.jacocoTestReport {
8280
reports {
8381
xml.required.set(true)
84-
xml.outputLocation.set(File("$buildDir/reports/jacoco/test/jacoco.xml"))
82+
xml.outputLocation.set(layout.buildDirectory.file("reports/jacoco/test/jacoco.xml"))
8583
}
8684
}
8785

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

src/main/java/com/github/_1c_syntax/utils/Absolute.java

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is a part of 1c-syntax utils.
33
*
4-
* Copyright (c) 2018-2024
4+
* Copyright (c) 2018-2025
55
* Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com> and contributors
66
*
77
* SPDX-License-Identifier: LGPL-3.0-or-later
@@ -40,6 +40,12 @@
4040
@UtilityClass
4141
public final class Absolute {
4242

43+
/**
44+
* Получение URI из строки
45+
*
46+
* @param uri - строковое представление URI
47+
* @return - полученное значение
48+
*/
4349
public static URI uri(@NonNull String uri) {
4450
try {
4551
var url = new URL(uri);
@@ -60,28 +66,64 @@ public static URI uri(@NonNull String uri) {
6066
}
6167
}
6268

69+
/**
70+
* Получение абсолютного URI из URI с валидацией
71+
*
72+
* @param uri - исходный URI
73+
* @return - полученное значение
74+
*/
6375
public static URI uri(@NonNull URI uri) {
6476
var decodedUri = URI.create(uri.getScheme() + ":" + encodePath(uri.getSchemeSpecificPart()));
6577

6678
return checkFileAuthorityAndReturnURI(decodedUri);
6779
}
6880

81+
/**
82+
* Получение URI файла
83+
*
84+
* @param file - исходный файл
85+
* @return - полученное значение
86+
*/
6987
public static URI uri(@NonNull File file) {
7088
return uri(path(file).toUri());
7189
}
7290

91+
/**
92+
* Получение пути (path) из строки
93+
*
94+
* @param path - строковое представление пути
95+
* @return - полученное значение
96+
*/
7397
public static Path path(@NonNull String path) {
7498
return path(Path.of(path));
7599
}
76100

101+
/**
102+
* Получение пути (path) из URI
103+
*
104+
* @param uri - исходное значение URI
105+
* @return - полученное значение
106+
*/
77107
public static Path path(@NonNull URI uri) {
78108
return path(Path.of(uri(uri)));
79109
}
80110

111+
/**
112+
* Получение абсолютного пути (path) из Path
113+
*
114+
* @param path - исходное значение пути
115+
* @return - полученное значение
116+
*/
81117
public static Path path(@NonNull Path path) {
82118
return path(path.toFile());
83119
}
84120

121+
/**
122+
* Получение пути файла
123+
*
124+
* @param file - исходный файл
125+
* @return - полученное значение
126+
*/
85127
@SneakyThrows
86128
public static Path path(@NonNull File file) {
87129
return file.getCanonicalFile().toPath().toAbsolutePath();

src/main/java/com/github/_1c_syntax/utils/CaseInsensitivePattern.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is a part of 1c-syntax utils.
33
*
4-
* Copyright (c) 2018-2024
4+
* Copyright (c) 2018-2025
55
* Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com> and contributors
66
*
77
* SPDX-License-Identifier: LGPL-3.0-or-later

src/main/java/com/github/_1c_syntax/utils/GenericInterner.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is a part of 1c-syntax utils.
33
*
4-
* Copyright (c) 2018-2024
4+
* Copyright (c) 2018-2025
55
* Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com> and contributors
66
*
77
* SPDX-License-Identifier: LGPL-3.0-or-later
@@ -25,17 +25,26 @@
2525
import java.util.concurrent.ConcurrentHashMap;
2626

2727
/**
28-
* Реализация интернера
28+
* Реализация универсального интернера
2929
*/
3030
public class GenericInterner<T> {
3131

3232
private final Map<T, T> map = new ConcurrentHashMap<>();
3333

34+
/**
35+
* Метод интернирования значения
36+
*
37+
* @param object Интернируемый объект
38+
* @return значение из кеша
39+
*/
3440
public T intern(T object) {
3541
var exist = map.putIfAbsent(object, object);
3642
return (exist == null) ? object : exist;
3743
}
3844

45+
/**
46+
* Очистка кеша интернера
47+
*/
3948
public void clear() {
4049
map.clear();
4150
}

src/main/java/com/github/_1c_syntax/utils/Lazy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is a part of 1c-syntax utils.
33
*
4-
* Copyright (c) 2018-2024
4+
* Copyright (c) 2018-2025
55
* Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com> and contributors
66
*
77
* SPDX-License-Identifier: LGPL-3.0-or-later

src/main/java/com/github/_1c_syntax/utils/StringInterner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is a part of 1c-syntax utils.
33
*
4-
* Copyright (c) 2018-2024
4+
* Copyright (c) 2018-2025
55
* Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com> and contributors
66
*
77
* SPDX-License-Identifier: LGPL-3.0-or-later

src/test/java/com/github/_1c_syntax/utils/AbsoluteTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This file is a part of 1c-syntax utils.
33
*
4-
* Copyright (c) 2018-2024
4+
* Copyright (c) 2018-2025
55
* Alexey Sosnoviy <labotamy@gmail.com>, Nikita Fedkin <nixel2007@gmail.com> and contributors
66
*
77
* SPDX-License-Identifier: LGPL-3.0-or-later

0 commit comments

Comments
 (0)