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 throws Win32Exception
{ {
if (serviceName == null) { if (serviceName == null) {
throw new IllegalArgumentException("The serviceName argument " + throw new IllegalArgumentException("serviceName=null");
"cannot be null.");
}
if (displayName == null) {
throw new IllegalArgumentException("The displayName argument " +
"cannot be null.");
} }
if (path == null) { if (path == null) {
throw new IllegalArgumentException("The displayName argument " + throw new IllegalArgumentException("path=null");
"cannot be null.");
} }
if (displayName == null) {
displayName = serviceName;
}
Service service = new Service(); Service service = new Service();
service.service = CreateService(service.manager, service.service = CreateService(service.manager,
serviceName, serviceName,