From 5614e257d1749b5a83091e4111f5107cbe645766 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 2 Jul 2014 17:03:05 +0200 Subject: [PATCH] Polishing Issue: SPR-11939 --- .../transaction/TransactionAwareCacheManagerProxy.java | 4 ++-- .../messaging/core/DestinationResolver.java | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java index 2813c0d334..c5250af744 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java +++ b/spring-context-support/src/main/java/org/springframework/cache/transaction/TransactionAwareCacheManagerProxy.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ public class TransactionAwareCacheManagerProxy implements CacheManager, Initiali @Override public void afterPropertiesSet() { if (this.targetCacheManager == null) { - throw new IllegalStateException("'targetCacheManager' is required"); + throw new IllegalArgumentException("Property 'targetCacheManager' is required"); } } diff --git a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolver.java b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolver.java index 908906e3ab..2521c05f6c 100644 --- a/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolver.java +++ b/spring-messaging/src/main/java/org/springframework/messaging/core/DestinationResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ package org.springframework.messaging.core; /** - * Strategy for resolving a String destination name into an actual destination + * Strategy for resolving a String destination name to an actual destination * of type {@code }. * * @author Mark Fisher @@ -28,7 +28,9 @@ public interface DestinationResolver { /** * Resolve the given destination name. * @param name the destination name to resolve - * @return the destination, never {@code null} + * @return the resolved destination (never {@code null}) + * @throws DestinationResolutionException if the specified destination + * wasn't found or wasn't resolvable for any other reason */ D resolveDestination(String name) throws DestinationResolutionException;