Rob Winch 10 anni fa
parent
commit
753fdcaef0

+ 1 - 1
messaging/src/main/java/org/springframework/security/messaging/util/matcher/SimpDestinationMessageMatcher.java

@@ -81,7 +81,7 @@ public final class SimpDestinationMessageMatcher implements MessageMatcher<Objec
      *            the pattern to use
      */
     public SimpDestinationMessageMatcher(String pattern) {
-        this(pattern, null);
+        this(pattern, new AntPathMatcher());
     }
 
     /**

+ 4 - 0
messaging/src/test/java/org/springframework/security/messaging/util/matcher/SimpDestinationMessageMatcherTests.java

@@ -45,6 +45,10 @@ public class SimpDestinationMessageMatcherTests {
         new SimpDestinationMessageMatcher(null);
     }
 
+    public void constructorOnlyPathNoError() {
+        new SimpDestinationMessageMatcher("/path");
+    }
+
     @Test
     public void matchesDoesNotMatchNullDestination() throws Exception {
         assertThat(matcher.matches(messageBuilder.build())).isFalse();