Merge pull request #160 from manugoyal/master

Fixed Constants.PATH_SEPARATOR everywhere and ran eclipse code formatter
Check if the List is null before using it

The variable "List<NetAddress> locations" might be null, so we should
check it before using its method size() in case that it throws a
NullPointerException.
Merge pull request #161 from WangTaoTheTonic/master

Check if the List is null before using it