aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-13 09:24:33 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-05-13 09:24:33 +0200
commitcf817bfa1685fc5f1e893f3c8081ee5b4ab55264 (patch)
tree1192ea978495e54e398b4d1a99c71d35baaffc8f /src/main
parent5f1b6549180c82042cb0611f00a4da0e30ab9919 (diff)
downloadmoa-zs-cf817bfa1685fc5f1e893f3c8081ee5b4ab55264.tar.gz
moa-zs-cf817bfa1685fc5f1e893f3c8081ee5b4ab55264.tar.bz2
moa-zs-cf817bfa1685fc5f1e893f3c8081ee5b4ab55264.zip
Refactor RedisDeliveryRepository
- Use correct marshaller bean (mzsMarshaller). - Replace RuntimeException with MoaZSException. - Remove pointless cast.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java b/src/main/java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java
index c514210..c24902d 100644
--- a/src/main/java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java
+++ b/src/main/java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java
@@ -30,12 +30,12 @@ public class RedisDeliveryRepository implements DeliveryRepository {
private final ObjectFactory factory = new ObjectFactory();
@Autowired
- public RedisDeliveryRepository(RedisTemplate<String, Object> redisTemplate, Marshaller marshaller){
+ public RedisDeliveryRepository(RedisTemplate<String, Object> redisTemplate, Marshaller mzsMarshaller){
logger.info("RedisDeliveryRepository()");
this.redisTemplate = redisTemplate;
this.hashOperations = redisTemplate.opsForHash();
- this.marshaller = marshaller;
+ this.marshaller = mzsMarshaller;
}
@Override
@@ -49,7 +49,7 @@ public class RedisDeliveryRepository implements DeliveryRepository {
@Override
public Optional<DeliveryRequestType> getDeliveryRequest(String appDeliveryID) {
- var serializedRequest = (String) hashOperations.get(KEY, appDeliveryID);
+ var serializedRequest = hashOperations.get(KEY, appDeliveryID);
if (serializedRequest == null) {
return Optional.empty();
@@ -62,11 +62,11 @@ public class RedisDeliveryRepository implements DeliveryRepository {
@Override
public void add(DeliveryRequestStatusType status) {
- throw new RuntimeException("Not Implemented Yet");
+ throw new UnsupportedOperationException("Not Implemented Yet");
}
@Override
public Optional<DeliveryRequestStatusType> getDeliveryRequestStatus(String appDeliveryID) {
- throw new RuntimeException("Not Implemented Yet");
+ throw new UnsupportedOperationException("Not Implemented Yet");
}
}