Bug 205587

Summary: [discovery][jmdns] registerService impl should be more robust
Product: [RT] ECF Reporter: Scott Lewis <slewis>
Component: ecf.providersAssignee: ecf.core-inbox <ecf.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bugs.eclipse.org
Version: 1.1.0   
Target Milestone: 2.0.1   
Hardware: All   
OS: Windows XP   
Whiteboard:

Description Scott Lewis CLA 2007-10-05 12:42:07 EDT
Currently the jmdns provider implementation of registerService fails to detect inappropriate IServiceID.getServiceName() values.  It should check for valid information in the IServiceInfo provided to registerService, and throw exceptions if invalid data are provided.
Comment 1 Scott Lewis CLA 2007-10-05 13:03:31 EDT
Added following check to JMDSN registerService(svcInfo) implementation:

protected void checkServiceInfo(ServiceInfo serviceInfo) throws ECFException {
	final String serviceName = serviceInfo.getName();
	if (serviceName == null)
	throw new ECFException(Messages.JMDNSDiscoveryContainer_SERVICE_NAME_NOT_NULL);
}

This checks for null service names.  Additional checks to follow (for valid JMDNS names).
Comment 2 Scott Lewis CLA 2008-05-23 15:26:11 EDT
Resolving as robustness has been added via comment #1.  Also ID creation now does more syntax checking.