Example #1
0
 void mayCauseNPE() {
   Random rng = new Random();
   Pointers.A a = Pointers.mayReturnNull(rng.nextInt());
   // FIXME: should check for null before calling method()
   a.method();
 }
Example #2
0
 void doesNotCauseNPE() {
   Pointers.A a = Pointers.mayReturnNull(10);
   a.method();
 }