mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
when checking class file version, consider only 'major' part
This commit is contained in:
+2
-2
@@ -20,7 +20,6 @@ import com.intellij.compiler.instrumentation.InstrumentationClassFinder;
|
||||
import com.intellij.compiler.notNullVerification.NotNullVerifyingInstrumenter;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -68,7 +67,8 @@ public class NotNullInstrumentingBuilder extends BaseInstrumentingBuilder{
|
||||
|
||||
@Override
|
||||
protected boolean canInstrument(CompiledClass compiledClass, int classFileVersion) {
|
||||
return classFileVersion >= Opcodes.V1_5 && !"module-info".equals(compiledClass.getClassName());
|
||||
// in the class version consider only 'major' part
|
||||
return (classFileVersion & 0xFF) >= Opcodes.V1_5 && !"module-info".equals(compiledClass.getClassName());
|
||||
}
|
||||
|
||||
// todo: probably instrument other NotNull-like annotations defined in project settings?
|
||||
|
||||
Reference in New Issue
Block a user