SpotBugs.

This commit is contained in:
Gilles Sadowski 2024-08-24 12:15:41 +02:00
parent 38a782bcca
commit 7b0e1a051d
5 changed files with 35 additions and 0 deletions

View File

@ -184,4 +184,11 @@ public class NeuronString {
network.addLink(network.getNeuron(size - 1), network.getNeuron(0));
}
}
/**
* Prevent finalizer attack (cf. "SpotBugs").
*/
protected final void finalize() {
// Do nothing.
}
}

View File

@ -80,4 +80,11 @@ public class ExponentialDecayFunction implements LongToDoubleFunction {
public double applyAsDouble(long numCall) {
return a * Math.exp(-numCall * oneOverB);
}
/**
* Prevent finalizer attack (cf. "SpotBugs").
*/
protected final void finalize() {
// Do nothing.
}
}

View File

@ -82,4 +82,11 @@ public class QuasiSigmoidDecayFunction implements LongToDoubleFunction {
public double applyAsDouble(long numCall) {
return scale * sigmoid.applyAsDouble((double) numCall);
}
/**
* Prevent finalizer attack (cf. "SpotBugs").
*/
protected final void finalize() {
// Do nothing.
}
}

View File

@ -815,4 +815,11 @@ public class NeuronSquareMesh2D
return mean;
}
}
/**
* Prevent finalizer attack (cf. "SpotBugs").
*/
protected final void finalize() {
// Do nothing.
}
}

View File

@ -101,4 +101,11 @@ public class LocationFinder {
public Location getLocation(Neuron n) {
return locations.get(n.getIdentifier());
}
/**
* Prevent finalizer attack (cf. "SpotBugs").
*/
protected final void finalize() {
// Do nothing.
}
}