1 16 package com.j2biz.pencil.test.scenario.impl.npe; 17 18 import com.j2biz.pencil.test.additional.TestLog; 19 import com.j2biz.pencil.test.stuff.Person; 20 21 22 public class SimpleNullPointerTest { 23 24 private PersonWrapper nullWrapper = null; 25 private PersonWrapper wrapper = new PersonWrapper(); 26 27 private class PersonWrapper { 28 private Person person = null; 29 } 30 31 SimpleNullPointerTest() { 32 final Person person = null; 33 TestLog.debug("npe.SimpleNullPointerTest.firstElementIsNull = ${NULL.type}"); TestLog.debug("npe.SimpleNullPointerTest.secondElementIsNull = ${NULL.type}"); TestLog.debug("npe.SimpleNullPointerTest.noElementAfterNull = null"); 36 TestLog.debug("npe.SimpleNullPointerTest.firstElementOfLongRefIsNull = ${NULL.person.type}"); 37 } 38 39 public static void main(String [] args) { 40 new SimpleNullPointerTest(); 41 } 42 } 43 | Popular Tags |