From cf817bfa1685fc5f1e893f3c8081ee5b4ab55264 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Mon, 13 May 2019 09:24:33 +0200 Subject: Refactor RedisDeliveryRepository - Use correct marshaller bean (mzsMarshaller). - Replace RuntimeException with MoaZSException. - Remove pointless cast. --- .../at/gv/egiz/moazs/repository/RedisDeliveryRepository.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/at/gv/egiz/moazs') 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 redisTemplate, Marshaller marshaller){ + public RedisDeliveryRepository(RedisTemplate 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 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 getDeliveryRequestStatus(String appDeliveryID) { - throw new RuntimeException("Not Implemented Yet"); + throw new UnsupportedOperationException("Not Implemented Yet"); } } -- cgit v1.2.3