Fix failing tests
This commit is contained in:
		
							parent
							
								
									b3c7c18c1b
								
							
						
					
					
						commit
						02949fc4a7
					
				| 
						 | 
				
			
			@ -61,6 +61,7 @@ import org.springframework.messaging.support.converter.MessageConverter;
 | 
			
		|||
import org.springframework.stereotype.Controller;
 | 
			
		||||
import org.springframework.util.Assert;
 | 
			
		||||
import org.springframework.util.ClassUtils;
 | 
			
		||||
import org.springframework.util.CollectionUtils;
 | 
			
		||||
import org.springframework.util.ReflectionUtils.MethodFilter;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -270,13 +271,14 @@ public class AnnotationMethodMessageHandler implements MessageHandler, Applicati
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	private boolean checkDestinationPrefix(String destination) {
 | 
			
		||||
		if ((destination != null) && (this.destinationPrefixes != null)) {
 | 
			
		||||
		if ((destination == null) || CollectionUtils.isEmpty(this.destinationPrefixes)) {
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
		for (String prefix : this.destinationPrefixes) {
 | 
			
		||||
			if (destination.startsWith(prefix)) {
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		}
 | 
			
		||||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,6 +28,7 @@ import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
 | 
			
		|||
import org.springframework.messaging.simp.SimpMessageType;
 | 
			
		||||
import org.springframework.messaging.support.MessageBuilder;
 | 
			
		||||
import org.springframework.util.Assert;
 | 
			
		||||
import org.springframework.util.CollectionUtils;
 | 
			
		||||
import org.springframework.util.MultiValueMap;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -103,13 +104,14 @@ public class SimpleBrokerMessageHandler implements MessageHandler {
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	private boolean checkDestinationPrefix(String destination) {
 | 
			
		||||
		if ((destination != null) && (this.destinationPrefixes != null)) {
 | 
			
		||||
		if ((destination == null) || CollectionUtils.isEmpty(this.destinationPrefixes)) {
 | 
			
		||||
			return true;
 | 
			
		||||
		}
 | 
			
		||||
		for (String prefix : this.destinationPrefixes) {
 | 
			
		||||
			if (destination.startsWith(prefix)) {
 | 
			
		||||
				return true;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		}
 | 
			
		||||
		return false;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ import static org.mockito.Mockito.*;
 | 
			
		|||
 * @author Rossen Stoyanchev
 | 
			
		||||
 * @since 4.0
 | 
			
		||||
 */
 | 
			
		||||
public class SimpleBrokerWebMessageHandlerTests {
 | 
			
		||||
public class SimpleBrokerMessageHandlerTests {
 | 
			
		||||
 | 
			
		||||
	private SimpleBrokerMessageHandler messageHandler;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue