This is an automated email from the ASF dual-hosted git repository. billblough pushed a commit to branch AXIS2-4091 in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git
commit bb97c6fa7ff040b3c3ceea80fc707f34de537870 Author: Andreas Veithen <veit...@apache.org> AuthorDate: Sun Dec 17 22:42:11 2017 +0000 Use generics. --- .../axis2/description/WSDL11ToAxisServiceBuilderTest.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java b/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java index 9e896fe..f8bb920 100644 --- a/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java +++ b/modules/kernel/test/org/apache/axis2/description/WSDL11ToAxisServiceBuilderTest.java @@ -78,19 +78,18 @@ public class WSDL11ToAxisServiceBuilderTest extends TestCase { final String portName = "FooHttpGetPort"; AxisService service = new WSDL11ToAxisServiceBuilder(in, serviceName, portName).populateService(); - List schemaDocuments = service.getSchema(); - List duplicatedGlobalElements = findDuplicatedGlobalElements(schemaDocuments); + List<XmlSchema> schemaDocuments = service.getSchema(); + List<QName> duplicatedGlobalElements = findDuplicatedGlobalElements(schemaDocuments); // NO duplicated element should exists assertTrue("Duplicated global element declarations found in '" + wsdlPath, duplicatedGlobalElements.isEmpty()); } - protected List findDuplicatedGlobalElements(List schemaDocuments) { - List duplicatedGlobalElementDeclarations = new ArrayList(); - Set globalElementDeclarations = new HashSet(); + protected List<QName> findDuplicatedGlobalElements(List<XmlSchema> schemaDocuments) { + List<QName> duplicatedGlobalElementDeclarations = new ArrayList<QName>(); + Set<QName> globalElementDeclarations = new HashSet<QName>(); // Iterate over all schema documents - for (int i = 0; i < schemaDocuments.size(); i++) { - XmlSchema schemaDocument = (XmlSchema)schemaDocuments.get(i); + for (XmlSchema schemaDocument : schemaDocuments) { for (XmlSchemaObject xmlSchemaObject : schemaDocument.getItems()) { // Check only XML schema elements if (xmlSchemaObject instanceof XmlSchemaElement) {