6677c3
From c81eb91d7b9aa9728dfc83d68a881b4e2a0fa8d2 Mon Sep 17 00:00:00 2001
6677c3
From: Marian Koncek <mkoncek@redhat.com>
6677c3
Date: Thu, 29 Aug 2019 13:58:24 +0200
6677c3
Subject: [PATCH 2/4] Port to hamcrest 2.1
6677c3
6677c3
---
6677c3
 .../src/main/java/org/xmlunit/matchers/CompareMatcher.java   | 3 ---
6677c3
 .../main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java | 2 --
6677c3
 .../src/main/java/org/xmlunit/matchers/HasXPathMatcher.java  | 2 --
6677c3
 .../src/main/java/org/xmlunit/matchers/TypeMatcher.java      | 5 -----
6677c3
 .../main/java/org/xmlunit/matchers/ValidationMatcher.java    | 3 ---
6677c3
 5 files changed, 15 deletions(-)
6677c3
6677c3
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
6677c3
index 6452081..226399c 100644
6677c3
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
6677c3
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java
6677c3
@@ -33,7 +33,6 @@ import org.xmlunit.util.Predicate;
6677c3
 
6677c3
 import org.hamcrest.BaseMatcher;
6677c3
 import org.hamcrest.Description;
6677c3
-import org.hamcrest.Factory;
6677c3
 import org.hamcrest.Matcher;
6677c3
 
6677c3
 import java.lang.reflect.Constructor;
6677c3
@@ -112,7 +111,6 @@ public final class CompareMatcher extends BaseMatcher<Object>
6677c3
      * 

6677c3
      * As input all types are supported which are supported by {@link Input#from(Object)}.
6677c3
      */
6677c3
-    @Factory
6677c3
     public static CompareMatcher isIdenticalTo(final Object control) {
6677c3
         return new CompareMatcher(control).checkForIdentical();
6677c3
     }
6677c3
@@ -128,7 +126,6 @@ public final class CompareMatcher extends BaseMatcher<Object>
6677c3
      * 

6677c3
      * As input all types are supported which are supported by {@link Input#from(Object)}.
6677c3
      */
6677c3
-    @Factory
6677c3
     public static CompareMatcher isSimilarTo(final Object control) {
6677c3
         return new CompareMatcher(control).checkForSimilar();
6677c3
     }
6677c3
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
6677c3
index 6eb23e5..1e9b8b5 100644
6677c3
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
6677c3
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java
6677c3
@@ -16,7 +16,6 @@ package org.xmlunit.matchers;
6677c3
 
6677c3
 import org.hamcrest.BaseMatcher;
6677c3
 import org.hamcrest.Description;
6677c3
-import org.hamcrest.Factory;
6677c3
 import org.hamcrest.Matcher;
6677c3
 import org.w3c.dom.Node;
6677c3
 import org.xmlunit.builder.Input;
6677c3
@@ -93,7 +92,6 @@ public class EvaluateXPathMatcher extends BaseMatcher<Object> {
6677c3
      * @param valueMatcher matcher for the value at the specified xpath
6677c3
      * @return the xpath matcher
6677c3
      */
6677c3
-    @Factory
6677c3
     public static EvaluateXPathMatcher hasXPath(String xPath, Matcher<String> valueMatcher) {
6677c3
         return new EvaluateXPathMatcher(xPath, valueMatcher);
6677c3
     }
6677c3
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
6677c3
index 08325cd..6fbf0ac 100644
6677c3
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
6677c3
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java
6677c3
@@ -16,7 +16,6 @@ package org.xmlunit.matchers;
6677c3
 
6677c3
 import org.hamcrest.BaseMatcher;
6677c3
 import org.hamcrest.Description;
6677c3
-import org.hamcrest.Factory;
6677c3
 import org.hamcrest.Matcher;
6677c3
 import org.w3c.dom.Node;
6677c3
 import org.xmlunit.builder.Input;
6677c3
@@ -135,7 +134,6 @@ public class HasXPathMatcher extends BaseMatcher<Object> {
6677c3
      * @param xPath the target xpath
6677c3
      * @return the xpath matcher
6677c3
      */
6677c3
-    @Factory
6677c3
     public static HasXPathMatcher hasXPath(String xPath) {
6677c3
         return new HasXPathMatcher(xPath);
6677c3
     }
6677c3
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java
6677c3
index b9002a1..7cd6843 100644
6677c3
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java
6677c3
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/TypeMatcher.java
6677c3
@@ -15,7 +15,6 @@
6677c3
 package org.xmlunit.matchers;
6677c3
 
6677c3
 import org.hamcrest.Description;
6677c3
-import org.hamcrest.Factory;
6677c3
 import org.hamcrest.Matcher;
6677c3
 import org.hamcrest.TypeSafeMatcher;
6677c3
 
6677c3
@@ -128,7 +127,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
6677c3
      * @param valueMatcher valueMatcher for the converted value
6677c3
      * @return the BigDecimal matcher
6677c3
      */
6677c3
-    @Factory
6677c3
     public static TypeMatcher<BigDecimal> asBigDecimal(Matcher valueMatcher) {
6677c3
         return new BigDecimalTypeMatcher(valueMatcher);
6677c3
     }
6677c3
@@ -146,7 +144,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
6677c3
      * @param valueMatcher valueMatcher for the converted value
6677c3
      * @return the Double matcher
6677c3
      */
6677c3
-    @Factory
6677c3
     public static TypeMatcher<Double> asDouble(Matcher valueMatcher) {
6677c3
         return new DoubleTypeMatcher(valueMatcher);
6677c3
     }
6677c3
@@ -164,7 +161,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
6677c3
      * @param valueMatcher valueMatcher for the converted value
6677c3
      * @return the Integer matcher
6677c3
      */
6677c3
-    @Factory
6677c3
     public static TypeMatcher<Integer> asInt(Matcher valueMatcher) {
6677c3
         return new IntegerTypeMatcher(valueMatcher);
6677c3
     }
6677c3
@@ -182,7 +178,6 @@ public abstract class TypeMatcher<T> extends TypeSafeMatcher<String> {
6677c3
      * @param valueMatcher valueMatcher for the converted value
6677c3
      * @return the Boolean matcher
6677c3
      */
6677c3
-    @Factory
6677c3
     public static TypeMatcher<Boolean> asBoolean(Matcher valueMatcher) {
6677c3
         return new BooleanTypeMatcher(valueMatcher);
6677c3
     }
6677c3
diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
6677c3
index 3126349..51f58ec 100644
6677c3
--- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
6677c3
+++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java
6677c3
@@ -27,7 +27,6 @@ import org.xmlunit.validation.ValidationProblem;
6677c3
 import org.xmlunit.validation.ValidationResult;
6677c3
 import org.hamcrest.BaseMatcher;
6677c3
 import org.hamcrest.Description;
6677c3
-import org.hamcrest.Factory;
6677c3
 
6677c3
 import javax.xml.transform.Source;
6677c3
 import javax.xml.validation.Schema;
6677c3
@@ -121,7 +120,6 @@ public class ValidationMatcher extends BaseMatcher {
6677c3
         }
6677c3
     }
6677c3
 
6677c3
-    @Factory
6677c3
     public static ValidationMatcher valid(final Object schemaSource) {
6677c3
         return new ValidationMatcher(schemaSource);
6677c3
     }
6677c3
@@ -129,7 +127,6 @@ public class ValidationMatcher extends BaseMatcher {
6677c3
     /**
6677c3
      * @since XMLUnit 2.3.0
6677c3
      */
6677c3
-    @Factory
6677c3
     public static ValidationMatcher valid(final Schema schema) {
6677c3
         return new ValidationMatcher(schema);
6677c3
     }
6677c3
-- 
6677c3
2.21.0
6677c3