1 | package edu.ucsb.cs156.courses.services; | |
2 | ||
3 | import edu.ucsb.cs156.courses.entities.User; | |
4 | import edu.ucsb.cs156.courses.models.CurrentUser; | |
5 | import java.util.Collection; | |
6 | import org.springframework.security.core.GrantedAuthority; | |
7 | ||
8 | public abstract class CurrentUserService { | |
9 | public abstract User getUser(); | |
10 | ||
11 | public abstract CurrentUser getCurrentUser(); | |
12 | ||
13 | public abstract Collection<? extends GrantedAuthority> getRoles(); | |
14 | ||
15 | public final boolean isLoggedIn() { | |
16 |
2
1. isLoggedIn : negated conditional → KILLED 2. isLoggedIn : replaced boolean return with true for edu/ucsb/cs156/courses/services/CurrentUserService::isLoggedIn → KILLED |
return getUser() != null; |
17 | } | |
18 | } | |
Mutations | ||
16 |
1.1 2.2 |