Closed RusTit closed 6 years ago
From Idea:
Reports a null check followed by an instanceof check or a method call which will surely return false when null is passed (e.g. Class.isInstance). Since the instanceof operator always returns false for null, there is no need to have an additional null check.
Here is an example of a violation:
if (x != null && x instanceof String) { ... }
The quickfix changes this code to:
if (x instanceof String) { ... }
@Nedelosk I will be grateful if you review this and #504 today
At first i thought that something is broken, but after some tests I realized that everything work (flower image sizes). So calculation can be removed. Fuchsia has one section. https://github.com/ForestryMC/Binnie/blob/4946c9d31cc2c5e02eef2cd56f659ae89a402cc4/botany/src/main/java/binnie/botany/genetics/EnumFlowerType.java#L50 Foxglove - two. https://github.com/ForestryMC/Binnie/blob/4946c9d31cc2c5e02eef2cd56f659ae89a402cc4/botany/src/main/java/binnie/botany/genetics/EnumFlowerType.java#L37