A single key-combo will make this:
Name name = someDao.
getMyObject(anotherObject).getName();
like this:
AnObject myObject = someDao.
getMyObject(anotherObject);
Name name = myObject.getName();
It's cool, it's Ctrl-Alt-v and it'll make debugging a NullPointerException a lot easier when you actually know which object is null. Unlike the first line where you don't know if the someDao or the AnObject is null.
No comments:
Post a Comment