summaryrefslogtreecommitdiff
path: root/eaaf_core
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-08-20 15:59:38 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-08-20 15:59:38 +0200
commitae0e8dbdded2acf47007a20dcd878d2b51178b97 (patch)
tree7ecc3193aeb5b54dab9f7a24f71bf03798147421 /eaaf_core
parentecd4b586e450c4fba05db4c3539f9a898eace594 (diff)
downloadEAAF-Components-ae0e8dbdded2acf47007a20dcd878d2b51178b97.tar.gz
EAAF-Components-ae0e8dbdded2acf47007a20dcd878d2b51178b97.tar.bz2
EAAF-Components-ae0e8dbdded2acf47007a20dcd878d2b51178b97.zip
some small fixes
Diffstat (limited to 'eaaf_core')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BPKBuilder.java2
-rw-r--r--eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java15
2 files changed, 16 insertions, 1 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BPKBuilder.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BPKBuilder.java
index 6defefdd..602546a2 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BPKBuilder.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BPKBuilder.java
@@ -206,7 +206,7 @@ public class BPKBuilder {
final String input = "V1::urn:publicid:gv.at:cdid+" + target + "::"
+ bpk + "::"
+ sdf.format(new Date());
- System.out.println(input);
+ //System.out.println(input);
byte[] result;
try {
final byte[] inputBytes = input.getBytes("ISO-8859-1");
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java
index ceb4d9fe..80451399 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java
@@ -26,10 +26,13 @@
*******************************************************************************/
package at.gv.egiz.eaaf.core.impl.idp.module.test;
+import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.idp.ISPConfiguration;
import at.gv.egiz.eaaf.core.exceptions.EAAFStorageException;
@@ -271,6 +274,18 @@ public class TestRequestImpl implements IRequest {
@Override
public void setRawDataToTransaction(String key, Object object) throws EAAFStorageException {
+ if (StringUtils.isEmpty(key)) {
+ throw new EAAFStorageException("Generic request-data can not be stored with a 'null' key", null);
+
+ }
+
+ if (object != null) {
+ if (!Serializable.class.isInstance(object)) {
+ throw new EAAFStorageException("Generic request-data can only store objects which implements the 'Seralizable' interface", null);
+
+ }
+ }
+
storage.put(key, object);
}