Issue 18423: Operations with Collection as parameter should provide a "varargs" alternative (dds-psm-java-rtf) Source: ADLINK Technology Ltd (Mr. Julien Enoch, julien.enoch(at)adlinktech.com) Nature: Enhancement Severity: Significant Summary: The use of Collection for providing a single "parameter" is rather cumbersome and could be greatly improved by providing a "varargs" alternative. Here is an example that showcases the issue: p = dp.createPublisher( dp.getDefaultPublisherQos().withPolicy( pf.Partition().withName(Arrays.asList("MyPartition")) )); In this case a withName(String... names) operation will simplify the code as shown below: p = dp.createPublisher( dp.getDefaultPublisherQos().withPolicy( pf.Partition().withName("MyPartition") )); Moreover the use of Collection type could lead to compilation error as in the following case: statusCondition.setEnabledStatuses(Arrays.toList(DataAvailableStatus.class)); Resolution: Revised Text: Actions taken: February 6, 2013: received issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 06 Feb 2013 05:56:35 -0500 To: Subject: Issue/Bug Report ******************************************************************************* Name: Julien Enoch Employer: PrismTech mailFrom: julien.enoch@prismtech.com Terms_Agreement: I agree Specification: Java 5 DDS PSM Section: N/A FormalNumber: ptc/12-12-04 Version: 1.0 Doc_Year: Year Doc_Month: Month Doc_Day: Day Page: 0 Title: Operations with Collection as parameter should provide a "varargs" alternative Nature: Enhancement Severity: Significant CODE: 3TMw8 B1: Report Issue Description: The use of Collection for providing a single "parameter" is rather cumbersome and could be greatly improved by providing a "varargs" alternative. Here is an example that showcases the issue: p = dp.createPublisher( dp.getDefaultPublisherQos().withPolicy( pf.Partition().withName(Arrays.asList("MyPartition")) )); In this case a withName(String... names) operation will simplify the code as shown below: p = dp.createPublisher( dp.getDefaultPublisherQos().withPolicy( pf.Partition().withName("MyPartition") )); Moreover the use of Collection type could lead to compilation error as in the following case: statusCondition.setEnabledStatuses(Arrays.toList(DataAvailableStatus.class));