Commit 2f3ac5ba by Tuukka Kivilahti

EJBException not found & nullpointerexception while changing user cards

1 parent 950a912f
......@@ -171,7 +171,7 @@ public class CardTemplateBean implements CardTemplateBeanLocal {
PrintedCard biggestCard = null;
for (PrintedCard card : myCards) {
if (card.getEnabled() && biggestCard == null || biggestCard.getTemplate().getPower() < card.getTemplate().getPower()) {
if (biggestCard == null || biggestCard.getTemplate().getPower() < card.getTemplate().getPower()) {
// The biggest card should be the only one enabled.
if (biggestCard != null) {
biggestCard.setEnabled(false);
......
......@@ -22,10 +22,7 @@ import java.security.Principal;
import javax.annotation.Resource;
import javax.annotation.security.DeclareRoles;
import javax.ejb.EJB;
import javax.ejb.LocalBean;
import javax.ejb.SessionContext;
import javax.ejb.Stateless;
import javax.ejb.*;
import javax.resource.spi.IllegalStateException;
import fi.codecrew.moya.enums.apps.*;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!