3

I have a little app I started putting together under Intellij-14. It compiled and ran there. When I updated to 15, I started getting NotNull Instrumentation errors for all of the classes. The error message simply states that the class failed -- there is no indication of a specific method, member, or variable. I have add annotations to the project library and changed the compile options to point to them. I have run "infer nullity" and "run inspection by name" trying to find out where I have gone wrong to no avail. Since this is my first attempt at using GUI elements, I am probably making some very basic mistakes. For example:

public class lguiException extends Exception {

private String msg = " ";

public String GetLearnGUIMsg(){
        return(msg);
}

public void SetLearnGUIMsg(String instr){
        msg = instr;
    }

public void HandleLearnGUIExceps(){

    System.out.println(msg);
}

}

produces the error:

Error:NotNull instrumentation: @NotNull instrumentation failed for lguiException.java: com.intellij.compiler.notNullVerification.NotNullVerifyingInstrumenter.processClassFile(Lorg/jetbrains/org/objectweb/asm/ClassReader;Lorg/jetbrains/org/objectweb/asm/ClassVisitor;)Z

The infer nullity preview says there is nothing to be annotated here and the code inspection comes up clean. So where do I start?

GEM
  • 31
  • 4

1 Answers1

3

Edit: The actions below did not fix every issue I had so I ended up deleting the old installation directory and re-extracting, and that got rid of every problem I had. Moral: don't upgrade IDEA by extracting into old installation directories.

I ran into the same issue after upgrading from 14 to 15. For me the fix was to go into settings -> compiler and disable the add @NotNull assertions checkmark.

Daan Reid
  • 339
  • 2
  • 7
  • 1
    I think I was my own worst enemy here. I changed the directory that I was executing from and copied the application files into it. Though the app looked like it was working, no settings allowed me to compile clean. I reread the installation instructions, deleted everything in the target directory, moved the installation tar into that directory and unpacked it there. I can now use the settings and can compile clean. It's always something stupid, and in this case, I can see the source of the stupidity in the mirror. – GEM Jan 28 '16 at 19:27
  • Glad you got it fixed! – Daan Reid Jan 29 '16 at 15:06
  • This saved me. I just unchecked that "add @NotNull assertions" compiler setting, compiled the project and then it worked. After that I reverted the unchecking, compiled and then it also worked. ¯\\_(ツ)_/¯ – dnl.re Apr 19 '22 at 13:42