chore: Protected no-argument constructor added to satisfy code analysis

tools

Signed-off-by: Leo Galambos <lg@hq.egothor.org>
This commit is contained in:
2025-07-15 21:25:44 +02:00
parent 28e51d89dc
commit bd7bcf54a5
2 changed files with 23 additions and 0 deletions

View File

@@ -13,6 +13,19 @@
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/resources">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>

View File

@@ -62,6 +62,16 @@ public final class CtxInstance implements CtxInterface {
private final Map<String, Class<?>> keyTypes = new ConcurrentHashMap<>();
private final Map<Key<?>, List<WeakReference<Listener<?>>>> listeners = new ConcurrentHashMap<>();
/**
* Protected no-argument constructor added to satisfy code analysis tools.
* <p>
* This constructor should not be used directly. It exists solely to comply with
* static analysis requirements (e.g., PMD) expecting at least one constructor.
*/
protected CtxInstance() {
// Intentionally left blank
}
/**
* Stores or updates the value for a given key. If the key is used for the first
* time, its type is recorded. If the key has been used before with a different