Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>it.aboutbits</groupId>
<artifactId>spring-boot-toolbox</artifactId>
<version>2.4.1</version>
<version>2.4.2-RC1</version>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the Release Package workflow https://github.com/aboutbits/spring-boot-toolbox/actions/workflows/release.yml bump the artifact version?

Copy link
Copy Markdown
Contributor

@ThoSap ThoSap Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I get it now, it originates from release https://github.com/aboutbits/spring-boot-toolbox/releases/tag/v2.4.2-RC1 you ran on this branch instead of main

<description>Utility library for Spring Boot projects.</description>
<packaging>jar</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,27 @@
import org.jspecify.annotations.NullMarked;

import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

@NullMarked
public final class ClassScannerUtil {
private static final Map<String, ClassScanner> CACHE = new ConcurrentHashMap<>();

private ClassScannerUtil() {
}

public static ClassScanner getScannerForPackages(String... packages) {
return new ClassScanner(packages);
var cacheKey = Arrays.stream(packages)
.sorted()
.collect(Collectors.joining("|"));
return CACHE.computeIfAbsent(cacheKey, _ -> new ClassScanner(packages));
}

public static final class ClassScanner implements AutoCloseable {
public static final class ClassScanner {
private final ScanResult scanResult;
private final String[] packages;

Expand Down Expand Up @@ -51,10 +59,5 @@ public Set<Class<?>> getClassesAnnotatedWith(Class<? extends Annotation> clazz)
ClassInfo::loadClass
).collect(Collectors.toSet());
}

@Override
public void close() {
scanResult.close();
}
}
}