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 { ...@@ -171,7 +171,7 @@ public class CardTemplateBean implements CardTemplateBeanLocal {
PrintedCard biggestCard = null; PrintedCard biggestCard = null;
for (PrintedCard card : myCards) { 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. // The biggest card should be the only one enabled.
if (biggestCard != null) { if (biggestCard != null) {
biggestCard.setEnabled(false); biggestCard.setEnabled(false);
......
...@@ -22,10 +22,7 @@ import java.security.Principal; ...@@ -22,10 +22,7 @@ import java.security.Principal;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.annotation.security.DeclareRoles; import javax.annotation.security.DeclareRoles;
import javax.ejb.EJB; import javax.ejb.*;
import javax.ejb.LocalBean;
import javax.ejb.SessionContext;
import javax.ejb.Stateless;
import javax.resource.spi.IllegalStateException; import javax.resource.spi.IllegalStateException;
import fi.codecrew.moya.enums.apps.*; 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!