default displayName to serviceName

This commit is contained in:
Doug MacEachern 2005-06-26 02:39:34 +00:00
parent bcd101741b
commit 82a5ad05ab
1 changed files with 7 additions and 10 deletions

View File

@ -137,20 +137,17 @@ public class Service extends Win32 {
throws Win32Exception
{
if (serviceName == null) {
throw new IllegalArgumentException("The serviceName argument " +
"cannot be null.");
}
if (displayName == null) {
throw new IllegalArgumentException("The displayName argument " +
"cannot be null.");
throw new IllegalArgumentException("serviceName=null");
}
if (path == null) {
throw new IllegalArgumentException("The displayName argument " +
"cannot be null.");
throw new IllegalArgumentException("path=null");
}
if (displayName == null) {
displayName = serviceName;
}
Service service = new Service();
service.service = CreateService(service.manager,
serviceName,