From 8c89d0ef987df14c705f405e4ef6cdc13ed24493 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 13 Nov 2017 16:39:07 -0500 Subject: [PATCH] Fix QueueChannelSpec.priority hook * Since we already have `PriorityChannelSpec` that isn't `QueueChannelSpec` responsibility to worry about `priority` option. More over it has been done wrongly and `MessageGroupQueue.setPriority()` has been called unconditionally by the provided `ChannelMessageStore` type * Fix `PriorityChannelSpec` logic as well: - set `this.messageGroupQueue.setPriority(true);` to check the state of the provided `PriorityCapableChannelMessageStore` - fix assert condition in the `doGet()` * And simple compiled SpEL test-case for the JDK Proxy --- .../dsl/channel/PriorityChannelSpec.java | 7 +++- .../dsl/channel/QueueChannelSpec.java | 6 +-- .../MethodInvokingMessageProcessorTests.java | 40 +++++++++++++++++++ 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/dsl/channel/PriorityChannelSpec.java b/spring-integration-core/src/main/java/org/springframework/integration/dsl/channel/PriorityChannelSpec.java index 33fdb647b5..8977069145 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/dsl/channel/PriorityChannelSpec.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/dsl/channel/PriorityChannelSpec.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 the original author or authors. + * Copyright 2016-2017 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. @@ -53,19 +53,22 @@ public class PriorityChannelSpec extends MessageChannelSpec