Polishing
This commit is contained in:
parent
c3dbaed4ce
commit
23c8f712c4
|
@ -57,9 +57,18 @@ import static org.springframework.core.annotation.AnnotationUtils.*;
|
||||||
*/
|
*/
|
||||||
public class AnnotationUtilsTests {
|
public class AnnotationUtilsTests {
|
||||||
|
|
||||||
|
@Rule
|
||||||
|
public final ExpectedException exception = ExpectedException.none();
|
||||||
|
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void clearCachesBeforeTests() {
|
||||||
|
clearCaches();
|
||||||
|
}
|
||||||
|
|
||||||
static void clearCaches() {
|
static void clearCaches() {
|
||||||
clearCache("findAnnotationCache", "annotatedInterfaceCache", "metaPresentCache", "synthesizableCache",
|
clearCache("findAnnotationCache", "annotatedInterfaceCache", "metaPresentCache", "synthesizableCache",
|
||||||
"attributeAliasesCache", "attributeMethodsCache", "aliasDescriptorCache");
|
"attributeAliasesCache", "attributeMethodsCache", "aliasDescriptorCache");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clearCache(String... cacheNames) {
|
static void clearCache(String... cacheNames) {
|
||||||
|
@ -73,15 +82,6 @@ public class AnnotationUtilsTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Rule
|
|
||||||
public final ExpectedException exception = ExpectedException.none();
|
|
||||||
|
|
||||||
|
|
||||||
@Before
|
|
||||||
public void clearCachesBeforeTests() {
|
|
||||||
clearCaches();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void findMethodAnnotationOnLeaf() throws Exception {
|
public void findMethodAnnotationOnLeaf() throws Exception {
|
||||||
Method m = Leaf.class.getMethod("annotatedOnLeaf");
|
Method m = Leaf.class.getMethod("annotatedOnLeaf");
|
||||||
|
|
|
@ -51,8 +51,8 @@ public @interface SendToUser {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* One or more destinations to send a message to.
|
* One or more destinations to send a message to.
|
||||||
* <p>If left unspecified, a default destination is selected based on
|
* <p>If left unspecified, a default destination is selected based on the
|
||||||
* the destination of the input message being handled.
|
* destination of the input message being handled.
|
||||||
* @since 4.2
|
* @since 4.2
|
||||||
* @see #value
|
* @see #value
|
||||||
* @see org.springframework.messaging.simp.annotation.support.SendToMethodReturnValueHandler
|
* @see org.springframework.messaging.simp.annotation.support.SendToMethodReturnValueHandler
|
||||||
|
@ -63,8 +63,7 @@ public @interface SendToUser {
|
||||||
/**
|
/**
|
||||||
* Whether messages should be sent to all sessions associated with the user
|
* Whether messages should be sent to all sessions associated with the user
|
||||||
* or only to the session of the input message being handled.
|
* or only to the session of the input message being handled.
|
||||||
*
|
* <p>By default, this is set to {@code true} in which case messages are
|
||||||
* <p>By default this is set to {@code true} in which case messages are
|
|
||||||
* broadcast to all sessions.
|
* broadcast to all sessions.
|
||||||
*/
|
*/
|
||||||
boolean broadcast() default true;
|
boolean broadcast() default true;
|
||||||
|
|
Loading…
Reference in New Issue