minor cleanup work
This commit is contained in:
parent
df2a789fa2
commit
be4c05ad2d
|
@ -15,7 +15,6 @@
|
|||
<version>1.2.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.baeldung.main;
|
||||
|
||||
|
||||
import org.baeldung.service.LoginService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
|
|
|
@ -16,13 +16,10 @@ public class LoginServiceImpl implements LoginService {
|
|||
|
||||
public boolean login(String userName, char[] password) {
|
||||
boolean success;
|
||||
if (userName.equals("admin") && "secret".toCharArray().equals(password))
|
||||
{
|
||||
if (userName.equals("admin") && "secret".toCharArray().equals(password)) {
|
||||
counterService.increment("counter.login.success");
|
||||
success = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
counterService.increment("counter.login.failure");
|
||||
success = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue