fixing javadoc and potential npe warnings in eclipse