default displayName to serviceName
This commit is contained in:
parent
bcd101741b
commit
82a5ad05ab
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue