Project

General

Profile

Revision 2a233487

ID2a233487ecea59d912e3437d8a0cd82cb9365ad1
Parent 7c8ca82e
Child aea6cf18

Added by Katja Luther about 7 years ago

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/TaxonNameBase.java
1338 1338
        Method method = ReflectionUtils.findMethod(TaxonBase.class, "setName", new Class[] {TaxonNameBase.class});
1339 1339
        ReflectionUtils.makeAccessible(method);
1340 1340
        ReflectionUtils.invokeMethod(method, taxonBase, new Object[] {null});
1341
        Boolean test = null;
1341
        boolean removed = false;
1342 1342
        
1343 1343
        if (taxonBases.contains(taxonBase)){
1344
        	 test = taxonBases.remove(taxonBase);
1344
        	 removed = taxonBases.remove(taxonBase);
1345 1345
        }
1346
        if (test != null){
1347
	       if (!test && !taxonBases.isEmpty()){
1346
        if (!removed){
1347
	       if (!removed && !taxonBases.isEmpty()){
1348 1348
		       HashSet<TaxonBase> copyTaxonBase = new HashSet<TaxonBase>();
1349 1349
		       Iterator<TaxonBase> iterator = taxonBases.iterator();
1350 1350
		       while (iterator.hasNext()){
1351 1351
		    	   TaxonBase taxonBaseTest = iterator.next();
1352 1352
		    	   if (taxonBaseTest.equals(taxonBase)){
1353
		    		   test = taxonBases.remove(taxonBaseTest);
1353
		    		   removed = taxonBases.remove(taxonBaseTest);
1354 1354
		    	   }
1355 1355
		    	   
1356 1356
		    	   

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)