forked from External/mage
rewrote enum comparisons, iterator to removeIf, added some stream and filters
This commit is contained in:
parent
05e5ca3c78
commit
3a152ab3d6
41 changed files with 178 additions and 239 deletions
|
|
@ -52,7 +52,7 @@ public class SessionManager {
|
|||
private final ConcurrentHashMap<String, Session> sessions = new ConcurrentHashMap<>();
|
||||
|
||||
public Session getSession(String sessionId) {
|
||||
if (sessions == null || sessionId == null) {
|
||||
if (sessionId == null) {
|
||||
return null;
|
||||
}
|
||||
Session session = sessions.get(sessionId);
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ public class DraftController {
|
|||
return false;
|
||||
}
|
||||
for (DraftPlayer player: draft.getPlayers()) {
|
||||
if (player.getPlayer().isHuman() && draftSessions.get(player.getPlayer().getId()) == null) {
|
||||
if (player.getPlayer().isHuman() && !draftSessions.containsKey(player.getPlayer().getId())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue