IMHO it is a better style when you don't put in one line methods which may throw npe. Then you don't have such a problem :) Even putting each invocation in a single line (but the same instruction like method1()\n.method2() and so one) is not a good idea. Simple code reformatting can put them back in one line.
If method may return null you should really check the return value each time. If the method should not return null, the getter should contain a check and throw an exception (IllegalStateException?) instead of returning null.
You can add to existing code such a check with AspectJ and load-time veave (using javaagent).
For example:
/** Throw Error if a method for creating a Point returns null */
after () returning (Point p) :
call(Point+ SubPoint+.create(..)) {
if (null == p) {
String err = "Null Point constructed when this ("
+ thisJoinPoint.getThis()
+ ") called target ("
+ thisJoinPoint.getTarget()
+ ") at join point ("
+ thisJoinPoint.getSignature()
+ ") from source location ("
+ thisJoinPoint.getSourceLocation()
+ ") with args ("
+ Arrays.asList(thisJoinPoint.getArgs())
+ ")";
throw new Error(err);
}
}