@Test public void testNullKey() { List<String> keys = new ArrayList<String>(); keys.add(null); InitializeCacheExecution sut = new InitializeCacheExecution(null, keys); sut.execute(actionContext); context.assertIsSatisfied(); }
@Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (cache != null) { log.info("Clearing Cache"); cache.clear(); } else { log.info("Skipping Cache clearing"); } for (String key : actionKeys) { if (key != null && !key.isEmpty()) { log.info("Queueing up action: " + key); inActionContext.getUserActionRequests().add(new UserActionRequest(key, null, null)); } } return null; }
InitializeCacheExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (cache != null) { log.info("Clearing Cache"); cache.clear(); } else { log.info("Skipping Cache clearing"); } for (String key : actionKeys) { if (key != null && !key.isEmpty()) { log.info("Queueing up action: " + key); inActionContext.getUserActionRequests().add(new UserActionRequest(key, null, null)); } } return null; } }
InitializeCacheExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (cache != null) { log.info("Clearing Cache"); cache.clear(); } else { log.info("Skipping Cache clearing"); } for (String key : actionKeys) { if (key != null && !key.isEmpty()) { log.info("Queueing up action: " + key); inActionContext.getUserActionRequests().add(new UserActionRequest(key, null, null)); } } return null; } InitializeCacheExecution(final Cache inCache, final List<String> inActionKeys); }
InitializeCacheExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (cache != null) { log.info("Clearing Cache"); cache.clear(); } else { log.info("Skipping Cache clearing"); } for (String key : actionKeys) { if (key != null && !key.isEmpty()) { log.info("Queueing up action: " + key); inActionContext.getUserActionRequests().add(new UserActionRequest(key, null, null)); } } return null; } InitializeCacheExecution(final Cache inCache, final List<String> inActionKeys); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext); }
InitializeCacheExecution implements TaskHandlerExecutionStrategy<ActionContext> { @Override public Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext) { if (cache != null) { log.info("Clearing Cache"); cache.clear(); } else { log.info("Skipping Cache clearing"); } for (String key : actionKeys) { if (key != null && !key.isEmpty()) { log.info("Queueing up action: " + key); inActionContext.getUserActionRequests().add(new UserActionRequest(key, null, null)); } } return null; } InitializeCacheExecution(final Cache inCache, final List<String> inActionKeys); @Override Serializable execute(final TaskHandlerActionContext<ActionContext> inActionContext);  }