Project

General

Profile

« Previous | Next » 

Revision d1cf4a26

Added by Katja Luther over 8 years ago

add null check for delete and minor

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonServiceImpl.java
967 967
            config = new TaxonDeletionConfigurator();
968 968
        }
969 969
    	Taxon taxon = (Taxon)dao.load(taxonUUID);
970
    	DeleteResult result = new DeleteResult();
971
    	if (taxon == null){
972
    	    result.setAbort();
973
    	    result.addException(new Exception ("The taxon was already deleted."));
974
    	    return result;
975
    	}
970 976
    	taxon = (Taxon) HibernateProxyHelper.deproxy(taxon);
971 977
    	Classification classification = HibernateProxyHelper.deproxy(classificationDao.load(classificationUuid), Classification.class);
972
        DeleteResult result = isDeletable(taxon, config);
978
        result = isDeletable(taxon, config);
973 979

  
974 980
        if (result.isOk()){
975 981
            // --- DeleteSynonymRelations
......
1242 1248
        DeleteResult result = new DeleteResult();
1243 1249
    	if (synonym == null){
1244 1250
    		result.setAbort();
1251
    		result.addException(new Exception("The synonym was already deleted."));
1245 1252
    		return result;
1246 1253
        }
1247 1254

  
1248 1255
        if (config == null){
1249 1256
            config = new SynonymDeletionConfigurator();
1250 1257
        }
1258

  
1251 1259
        result = isDeletable(synonym, config);
1252 1260

  
1253 1261

  

Also available in: Unified diff