diff options
author | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-01-20 17:01:09 +0000 |
---|---|---|
committer | clemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2009-01-20 17:01:09 +0000 |
commit | a7d404cd6db2724d36523e59c87c3007fa86a258 (patch) | |
tree | e938b10cccf606c062fdb4cf569b8245a83b8a37 /smccSTAL/src | |
parent | c97c49eb4399829603816e4b3e47c74b67d0f27b (diff) | |
parent | ce598ba5142ff7673085dd90865f9323d69574be (diff) | |
download | mocca-a7d404cd6db2724d36523e59c87c3007fa86a258.tar.gz mocca-a7d404cd6db2724d36523e59c87c3007fa86a258.tar.bz2 mocca-a7d404cd6db2724d36523e59c87c3007fa86a258.zip |
[maven-release-plugin] copy for tag mocca-1.0.2mocca-1.0.2
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/tags/mocca-1.0.2@276 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smccSTAL/src')
3 files changed, 20 insertions, 8 deletions
diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractSMCCSTAL.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractSMCCSTAL.java index 04d8d0dd..6f08a135 100644 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractSMCCSTAL.java +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractSMCCSTAL.java @@ -24,8 +24,6 @@ import java.util.Locale; import java.util.Map; import java.util.Set; -import java.util.logging.Level; -import java.util.logging.Logger; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -36,7 +34,6 @@ import at.gv.egiz.stal.InfoboxReadRequest; import at.gv.egiz.stal.STAL; import at.gv.egiz.stal.STALRequest; import at.gv.egiz.stal.STALResponse; -import java.util.Collections; public abstract class AbstractSMCCSTAL implements STAL { private static Log log = LogFactory.getLog(AbstractSMCCSTAL.class); @@ -106,7 +103,7 @@ public abstract class AbstractSMCCSTAL implements STAL { log.info("Interrupt in handleRequest, do not retry"); throw e; } catch (Exception e) { - log.info("Error while handling STAL request:" + e); + log.info("Error while handling STAL request:", e); if (++retryCounter < maxRetries) { signatureCard.disconnect(true); signatureCard = null; @@ -124,7 +121,7 @@ public abstract class AbstractSMCCSTAL implements STAL { } @Override - public List<STALResponse> handleRequest(List<STALRequest> requestList) { + public List<STALResponse> handleRequest(List<? extends STALRequest> requestList) { log.debug("Got request list containing " + requestList.size() + " STAL requests"); List<STALResponse> responseList = new ArrayList<STALResponse>(requestList @@ -143,8 +140,7 @@ public abstract class AbstractSMCCSTAL implements STAL { } } catch (InterruptedException ex) { log.error("got interrupted, return ErrorResponse 6001"); - responseList = Collections.singletonList((STALResponse) new ErrorResponse(6001)); - break; + throw new RuntimeException(ex); } } diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java index 04f179e7..5a54e97f 100644 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java @@ -103,6 +103,9 @@ public class InfoBoxReadRequestHandler extends AbstractRequestHandler implements stalResp.setInfoboxValue(resp); return stalResp; } + } catch (IllegalArgumentException e) { + log.info("Infobox " + infoBox.getInfoboxIdentifier() + " not supported."); + return new ErrorResponse(4002); } catch (NotActivatedException e) { log.info("Citizen card not activated.", e); gui.showErrorDialog(BKUGUIFacade.ERR_CARD_NOTACTIVATED, null, this, null); diff --git a/smccSTAL/src/test/java/at/gv/egiz/smcc/AbstractSMCCSTALTest.java b/smccSTAL/src/test/java/at/gv/egiz/smcc/AbstractSMCCSTALTest.java index 59ea141c..77997217 100644 --- a/smccSTAL/src/test/java/at/gv/egiz/smcc/AbstractSMCCSTALTest.java +++ b/smccSTAL/src/test/java/at/gv/egiz/smcc/AbstractSMCCSTALTest.java @@ -5,6 +5,7 @@ import java.util.List; import java.util.Locale;
import javax.smartcardio.Card;
+import javax.smartcardio.CardTerminal;
import org.junit.Assert;
import org.junit.Before;
@@ -61,7 +62,7 @@ public class AbstractSMCCSTALTest extends AbstractSMCCSTAL implements }
@Override
- public void init(Card card) {
+ public void init(Card card, CardTerminal cardTerminal) {
// TODO Auto-generated method stub
}
@@ -71,6 +72,18 @@ public class AbstractSMCCSTALTest extends AbstractSMCCSTAL implements // TODO Auto-generated method stub
}
+
+ @Override
+ public Card getCard() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public void reset() throws SignatureCardException {
+ // TODO Auto-generated method stub
+
+ }
};
return false;
|