diff options
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.java | 15 | 
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);  	} | 
