Project

General

Profile

« Previous | Next » 

Revision ba862b53

Added by Andreas Müller about 5 years ago

cleanup

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/FeatureNode.java
289 289
		}
290 290
		child.setSortIndex(index);
291 291
	}
292
	/**
292

  
293

  
294
    /**
293 295
	 * Removes the given feature node from the list of {@link #getChildNodes() children}
294 296
	 * of <i>this</i> feature node.
295 297
	 *
......
572 574
		FeatureNode result;
573 575
		try {
574 576
			result = (FeatureNode)super.clone();
575
			result.children = new ArrayList<FeatureNode>();
577
			result.children = new ArrayList<>();
576 578
			return result;
577 579
		}catch (CloneNotSupportedException e) {
578 580
			logger.warn("Object does not implement cloneable");
cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/description/FeatureTreeTest.java
18 18
public class FeatureTreeTest {
19 19
	@SuppressWarnings("unused")
20 20
	private static final Logger logger = Logger.getLogger(FeatureTreeTest.class);
21
	
21

  
22 22
	private FeatureTree testTree;
23 23
	private FeatureNode node1;
24 24
	private FeatureNode node2;
25 25
	private FeatureNode node3;
26 26
	private FeatureNode node4;
27
	
27

  
28 28
	@BeforeClass
29 29
	public static void setUpBeforeClass() {
30 30
		DefaultTermInitializer vocabularyStore = new DefaultTermInitializer();
......
65 65
		FeatureNode node21 = FeatureNode.NewInstance();
66 66
		node21.setFeature(Feature.ANATOMY());
67 67
		node1.addChild(node21, 1);
68
		
68

  
69 69
		assertEquals(node1.getChildNodes().size(), 2);
70 70
		assertEquals(node1.getChildNodes().get(1), node21);
71
		
72
		
71

  
72

  
73 73
		assertEquals(node21.getParent(), node1);
74
		
75
		
74

  
75

  
76 76
	}
77 77
	@Test
78 78
	public void testClone(){
......
91 91
		assertEquals(children.get(0).getChildAt(0).getFeature(), node3.getFeature());
92 92
		assertNotSame(children.get(0).getChildAt(0), node3);
93 93
	}
94
	
95
	
94

  
95

  
96 96
}

Also available in: Unified diff