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