r2084 - branches/wao-4.0-obsvente/wao-services/src/main/java/fr/ifremer/wao/services/service
Author: bleny Date: 2014-06-21 15:45:48 +0200 (Sat, 21 Jun 2014) New Revision: 2084 Url: http://forge.codelutin.com/projects/wao/repository/revisions/2084 Log: fix npe Modified: branches/wao-4.0-obsvente/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java Modified: branches/wao-4.0-obsvente/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java =================================================================== --- branches/wao-4.0-obsvente/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java 2014-06-21 12:15:41 UTC (rev 2083) +++ branches/wao-4.0-obsvente/wao-services/src/main/java/fr/ifremer/wao/services/service/ContactsService.java 2014-06-21 13:45:48 UTC (rev 2084) @@ -210,8 +210,10 @@ Set<String> secondaryObserversTopiaIds = contact.getSecondaryObserversTopiaIds(); updateContactCommand.setSecondaryObserverIds(secondaryObserversTopiaIds); - String terrestrialLocationId = contact.getTerrestrialLocation().getTopiaId(); - updateContactCommand.setTerrestrialLocationId(terrestrialLocationId); + if (contact.getTerrestrialLocation() != null) { + String terrestrialLocationId = contact.getTerrestrialLocation().getTopiaId(); + updateContactCommand.setTerrestrialLocationId(terrestrialLocationId); + } } else {
participants (1)
-
bleny@users.forge.codelutin.com