Hi,
I get a Null Analysis Error in MicroEJ SDK when I write a piece of code like:
package snippet; import ej.annotation.NonNullByDefault; @NonNullByDefault class A { A() { } void function1() { A a = new A(); A temp = a; while (true) { a = temp; function2(a); // <-- how 'a' can be null here ? } } private static void function2(A a) { } }
I don’t understand how my local variable ‘a’ can be null at this point.
Do you know what happen and how can I fix that ?