Fix warnings.
Some checks failed
ci/woodpecker/push/build Pipeline was successful
CodeQL / Analyze (push) Has been cancelled
Java CI with Gradle / build (push) Has been cancelled
Deploy Jekyll site to Pages / build (push) Has been cancelled
Deploy Jekyll site to Pages / deploy (push) Has been cancelled

This commit is contained in:
Michael Lipp 2025-08-11 20:32:08 +02:00
parent 470c266157
commit c6c6358426
74 changed files with 56 additions and 215 deletions

View file

@ -24,7 +24,6 @@ import org.jgrapes.core.Event;
/**
* Assign a VM from a pool to a user.
*/
@SuppressWarnings("PMD.DataClass")
public class AssignVm extends Event<VmData> {
private final String fromPool;

View file

@ -43,7 +43,6 @@ public interface ChannelDictionary<K, C extends Channel, A> {
* @param channel the channel
* @param associated the associated
*/
@SuppressWarnings("PMD.ShortClassName")
public record Value<C extends Channel, A>(C channel, A associated) {
}

View file

@ -149,8 +149,6 @@ public class ChannelManager<K, C extends Channel, A>
* @param supplier the supplier
* @return the channel
*/
@SuppressWarnings({ "PMD.AssignmentInOperand",
"PMD.DataflowAnomalyAnalysis" })
public C computeIfAbsent(K key, Function<K, C> supplier) {
return entries.computeIfAbsent(key,
k -> new Value<>(supplier.apply(k), null)).channel();

View file

@ -24,7 +24,6 @@ import org.jgrapes.core.Event;
/**
* Gets the current display secret and optionally updates it.
*/
@SuppressWarnings("PMD.DataClass")
public class GetDisplaySecret extends Event<String> {
private final VmDefinition vmDef;

View file

@ -27,7 +27,6 @@ import org.jgrapes.core.Event;
/**
* Gets the known pools' definitions.
*/
@SuppressWarnings("PMD.DataClass")
public class GetPools extends Event<List<VmPool>> {
private String name;

View file

@ -27,7 +27,6 @@ import org.jgrapes.core.Event;
/**
* Gets the known VMs' definitions and channels.
*/
@SuppressWarnings("PMD.DataClass")
public class GetVms extends Event<List<GetVms.VmData>> {
private String name;

View file

@ -24,7 +24,6 @@ import org.jgrapes.core.Event;
/**
* Modifies a VM.
*/
@SuppressWarnings("PMD.DataClass")
public class ModifyVm extends Event<Void> {
private final String name;

View file

@ -23,7 +23,6 @@ import org.jgrapes.core.Event;
/**
* Triggers a reset of the VM.
*/
@SuppressWarnings("PMD.DataClass")
public class ResetVm extends Event<String> {
private final String vmName;

View file

@ -24,7 +24,6 @@ import org.jgrapes.core.Event;
/**
* Note the assignment to a user in the VM status.
*/
@SuppressWarnings("PMD.DataClass")
public class UpdateAssignment extends Event<Boolean> {
private final VmPool fromPool;

View file

@ -28,7 +28,6 @@ import org.jgrapes.core.Subchannel.DefaultSubchannel;
/**
* A subchannel used to send the events related to a specific VM.
*/
@SuppressWarnings("PMD.DataClass")
public class VmChannel extends DefaultSubchannel {
private final EventPipeline pipeline;
@ -56,7 +55,6 @@ public class VmChannel extends DefaultSubchannel {
* @param definition the definition
* @return the watch channel
*/
@SuppressWarnings("PMD.LinguisticNaming")
public VmChannel setVmDefinition(VmDefinition definition) {
this.definition = definition;
return this;
@ -87,7 +85,6 @@ public class VmChannel extends DefaultSubchannel {
* @param generation the generation to set
* @return true if value has changed
*/
@SuppressWarnings("PMD.LinguisticNaming")
public boolean setGeneration(long generation) {
if (this.generation == generation) {
return false;

View file

@ -26,7 +26,6 @@ import org.jgrapes.core.Event;
/**
* Indicates a change in a pool configuration.
*/
@SuppressWarnings("PMD.DataClass")
public class VmPoolChanged extends Event<Void> {
private final VmPool vmPool;