summaryrefslogtreecommitdiff
path: root/eaaf_core/src/test/java
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/src/test/java
parentecd4b586e450c4fba05db4c3539f9a898eace594 (diff)
downloadEAAF-Components-ae0e8dbdded2acf47007a20dcd878d2b51178b97.tar.gz
EAAF-Components-ae0e8dbdded2acf47007a20dcd878d2b51178b97.tar.bz2
EAAF-Components-ae0e8dbdded2acf47007a20dcd878d2b51178b97.zip
some small fixes
Diffstat (limited to 'eaaf_core/src/test/java')
-rw-r--r--eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/module/test/TestRequestImpl.java15
1 files changed, 15 insertions, 0 deletions
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);
}