mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-19 03:49:07 +00:00
More null annotations
This commit is contained in:
1 parent
da8a833485
commit
a5daa93bf1
163 files changed
+952
-849
No files matched your search
@@ -4,6 +4,7 @@ import binnie.Constants;
|
||||
import binnie.core.genetics.ForestryAllele;
|
||||
import binnie.extratrees.block.EnumETLog;
|
||||
import binnie.extratrees.gen.*;
|
||||
import com.google.common.base.Preconditions;
|
||||
import forestry.api.arboriculture.*;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
@@ -2258,9 +2259,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
}
|
||||
|
||||
public <T extends Enum<T> & IChromosomeType> void set(T chromosomeType, IAllele allele) {
|
||||
if (allele == null) {
|
||||
throw new NullPointerException("Allele must not be null");
|
||||
}
|
||||
Preconditions.checkNotNull(allele, "Allele must not be null");
|
||||
if (!chromosomeType.getAlleleClass().isInstance(allele)) {
|
||||
throw new IllegalArgumentException("Allele is the wrong type. Expected: " + chromosomeType + " Got: " + allele);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user