예제 #1
0
파일: Hello.java 프로젝트: way-2-go/infer
 void mayCauseNPE() {
   Random rng = new Random();
   Pointers.A a = Pointers.mayReturnNull(rng.nextInt());
   // FIXME: should check for null before calling method()
   a.method();
 }
예제 #2
0
파일: Hello.java 프로젝트: way-2-go/infer
 void doesNotCauseNPE() {
   Pointers.A a = Pointers.mayReturnNull(10);
   a.method();
 }