diff --git a/0001-Fix-build-with-OpenJDK-11.patch b/0001-Fix-build-with-OpenJDK-11.patch new file mode 100644 index 0000000..c1fb36c --- /dev/null +++ b/0001-Fix-build-with-OpenJDK-11.patch @@ -0,0 +1,131 @@ +From d33031924faa557bb43ba0471f74d942ddfeae50 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Tue, 5 Nov 2019 14:50:23 +0100 +Subject: [PATCH] Fix build with OpenJDK 11 + +--- + .../src/main/java/org/hamcrest/collection/ArrayMatching.java | 3 ++- + .../org/hamcrest/collection/IsArrayContainingInAnyOrder.java | 2 +- + .../org/hamcrest/collection/IsArrayContainingInOrder.java | 2 +- + .../hamcrest/collection/IsIterableContainingInAnyOrder.java | 2 +- + .../collection/IsIterableContainingInRelativeOrder.java | 2 +- + hamcrest/src/main/java/org/hamcrest/core/AllOf.java | 2 +- + hamcrest/src/main/java/org/hamcrest/core/AnyOf.java | 2 +- + .../src/main/java/org/hamcrest/core/CombinableMatcher.java | 4 ++-- + 8 files changed, 10 insertions(+), 9 deletions(-) + +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java b/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java +index fc968e0..baab775 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java +@@ -67,7 +67,8 @@ public class ArrayMatching { + */ + @SafeVarargs + public static Matcher arrayContainingInAnyOrder(Matcher... itemMatchers) { +- return arrayContainingInAnyOrder(asList(itemMatchers)); ++ Collection> itemMatchersList = asList(itemMatchers); ++ return new ArrayAsIterableMatcher<>(new IsIterableContainingInAnyOrder<>(itemMatchersList), itemMatchersList, "in any order"); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java +index 7e72a62..c0c7efc 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java +@@ -59,7 +59,7 @@ public class IsArrayContainingInAnyOrder extends TypeSafeMatcher { + * a list of matchers, each of which must be satisfied by an entry in an examined array + */ + public static Matcher arrayContainingInAnyOrder(Matcher... itemMatchers) { +- return arrayContainingInAnyOrder(Arrays.asList(itemMatchers)); ++ return new IsArrayContainingInAnyOrder(Arrays.asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java +index c046914..2022f1a 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java +@@ -73,7 +73,7 @@ public class IsArrayContainingInOrder extends TypeSafeMatcher { + * the matchers that must be satisfied by the items in the examined array + */ + public static Matcher arrayContaining(Matcher... itemMatchers) { +- return arrayContaining(asList(itemMatchers)); ++ return new IsArrayContainingInOrder(asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java +index d6a9a33..9a7e6c0 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java +@@ -98,7 +98,7 @@ public class IsIterableContainingInAnyOrder extends TypeSafeDiagnosingMatcher + */ + @SafeVarargs + public static Matcher> containsInAnyOrder(Matcher... itemMatchers) { +- return containsInAnyOrder(Arrays.asList(itemMatchers)); ++ return new IsIterableContainingInAnyOrder(Arrays.asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java +index 0657768..06d6a57 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java +@@ -99,7 +99,7 @@ public class IsIterableContainingInRelativeOrder extends TypeSafeDiagnosingMa + */ + @SafeVarargs + public static Matcher> containsInRelativeOrder(Matcher... itemMatchers) { +- return containsInRelativeOrder(asList(itemMatchers)); ++ return new IsIterableContainingInRelativeOrder(asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/core/AllOf.java b/hamcrest/src/main/java/org/hamcrest/core/AllOf.java +index b8c3faa..f8951bd 100644 +--- a/hamcrest/src/main/java/org/hamcrest/core/AllOf.java ++++ b/hamcrest/src/main/java/org/hamcrest/core/AllOf.java +@@ -56,6 +56,6 @@ public class AllOf extends DiagnosingMatcher { + */ + @SafeVarargs + public static Matcher allOf(Matcher... matchers) { +- return allOf(Arrays.asList(matchers)); ++ return new AllOf(Arrays.asList(matchers)); + } + } +diff --git a/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java b/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java +index 7a22c22..5a63574 100644 +--- a/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java ++++ b/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java +@@ -46,6 +46,6 @@ public class AnyOf extends ShortcutCombination { + */ + @SafeVarargs + public static AnyOf anyOf(Matcher... matchers) { +- return anyOf(Arrays.asList(matchers)); ++ return new AnyOf(Arrays.asList(matchers)); + } + } +diff --git a/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java b/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java +index e37efce..6b44884 100644 +--- a/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java ++++ b/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java +@@ -57,7 +57,7 @@ public class CombinableMatcher extends TypeSafeDiagnosingMatcher { + this.first = matcher; + } + public CombinableMatcher and(Matcher other) { +- return new CombinableMatcher<>(first).and(other); ++ return new CombinableMatcher<>(first).and((Matcher)other); + } + } + +@@ -76,7 +76,7 @@ public class CombinableMatcher extends TypeSafeDiagnosingMatcher { + this.first = matcher; + } + public CombinableMatcher or(Matcher other) { +- return new CombinableMatcher<>(first).or(other); ++ return new CombinableMatcher<>(first).or((Matcher)other); + } + } + } +-- +2.21.0 + diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..d2ceb25 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,27 @@ +BSD License + +Copyright (c) 2000-2015 www.hamcrest.org +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of +conditions and the following disclaimer. Redistributions in binary form must reproduce +the above copyright notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the distribution. + +Neither the name of Hamcrest nor the names of its contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY +WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..314c76a --- /dev/null +++ b/README.md @@ -0,0 +1,63 @@ +![JavaHamcrest](http://hamcrest.org/images/logo.jpg) + +[![Build Status](https://travis-ci.org/hamcrest/JavaHamcrest.png?branch=master)](https://travis-ci.org/hamcrest/JavaHamcrest) + +Java Hamcrest +============= +Licensed under [BSD License][]. + +What is Hamcrest? +----------------- +Hamcrest is a library of matchers, which can be combined in to create flexible expressions of intent in tests. +They've also been used for other purposes. + +Downloads +--------- +You can obtain Hamcrest binaries from [maven central][]. + +Extensions +---------- + +For Hamcrest extension projects see the [hamcrest extensions page][]. + +Documentation +------------- +Documentation can be found on the [Hamcrest site](http://hamcrest.org). + +Reporting Bugs/Issues +--------------------- +If you find an issue with Java Hamcrest, please report it via the +[GitHub issue tracker](https://github.com/hamcrest/JavaHamcrest/issues), +after first checking that it hasn't been raised already. + +Source +------ +To build, please read BUILDING.txt + +Acknowledgements +---------------- +Developers: + + * Joe Walnes + * Nat Pryce + * Steve Freeman + +Contributors: + + * Robert Chatley + * Tom White + * Neil Dunn + * Dan North + * Magne Rasmussen + * David Saff + * Tom Denley + +Also, thanks to everyone who has worked on DynaMock, nMock, jMock, EasyMock and MiniMock! These libraries inspired Hamcrest. + + +[logo]: http://hamcrest.org/images/logo.jpg +[website]: https://github.com/hamcrest/JavaHamcrest +[BSD License]: http://opensource.org/licenses/BSD-3-Clause +[Maven central]: http://search.maven.org/#search%7Cga%7C1%7Cg%3Aorg.hamcrest +[hamcrest extensions page]: https://github.com/hamcrest/JavaHamcrest/wiki/Related-Projects +[GitHub issue tracker]: https://github.com/hamcrest/JavaHamcrest/issues diff --git a/_service b/_service new file mode 100644 index 0000000..469615b --- /dev/null +++ b/_service @@ -0,0 +1,19 @@ + + + git + https://github.com/hamcrest/JavaHamcrest.git + hamcrest + v2.2 + v* + @PARENT_TAG@ + v(.*) + hamcrest + *.gradle + + + *.tar + xz + + + + diff --git a/hamcrest-1.3-build.patch b/hamcrest-1.3-build.patch deleted file mode 100644 index c8db337..0000000 --- a/hamcrest-1.3-build.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/build.xml b/build.xml -index 1cfd4fb..5a7c740 100644 ---- a/build.xml -+++ b/build.xml -@@ -14,13 +14,13 @@ - - -+ classpath="lib/generator/qdox.jar"/> - - -- -+ - - -- -+ - - - -@@ -152,7 +152,8 @@ - - -+ windowtitle="Hamcrest" source="1.8" failonerror="yes"> -+ - - - -@@ -313,7 +314,8 @@ - - -+ windowtitle="Hamcrest" source="1.8" failonerror="yes"> -+ - - - diff --git a/hamcrest-1.3-fork-javac.patch b/hamcrest-1.3-fork-javac.patch deleted file mode 100644 index 1f37ffb..0000000 --- a/hamcrest-1.3-fork-javac.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 54b7ccdd1e16f1d6dd07359eae0fcac8f1883373 Mon Sep 17 00:00:00 2001 -From: Michael Simacek -Date: Mon, 2 Jan 2017 10:31:56 +0100 -Subject: [PATCH] Fork javac - ---- - build.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build.xml b/build.xml -index 1cfd4fb..69acfe8 100644 ---- a/build.xml -+++ b/build.xml -@@ -284,7 +284,7 @@ - - - -- -+ - - - --- -2.9.3 - diff --git a/hamcrest-1.3-javadoc.patch b/hamcrest-1.3-javadoc.patch deleted file mode 100644 index 7e4f4be..0000000 --- a/hamcrest-1.3-javadoc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/build.xml b/build.xml -index ed57763..a4550cb 100644 ---- a/build.xml -+++ b/build.xml -@@ -135,11 +135,10 @@ - - - -- -+ - - - -- - - - - -- -- -- - - - diff --git a/hamcrest-1.3-javadoc9.patch b/hamcrest-1.3-javadoc9.patch deleted file mode 100644 index 41b77d3..0000000 --- a/hamcrest-1.3-javadoc9.patch +++ /dev/null @@ -1,1144 +0,0 @@ ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java 2012-05-20 11:27:42.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java 2017-09-08 09:15:48.806422798 +0200 -@@ -40,7 +40,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ALL of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
- */ -@@ -51,7 +51,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ALL of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
- */ -@@ -62,7 +62,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ALL of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
- */ -@@ -76,7 +76,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ALL of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
- */ -@@ -91,7 +91,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ALL of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
- */ -@@ -107,7 +107,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ALL of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
- */ -@@ -124,7 +124,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ALL of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", allOf(startsWith("my"), containsString("Val")))
- */ ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java 2012-05-20 11:26:37.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java 2017-09-08 09:15:48.806422798 +0200 -@@ -30,7 +30,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ANY of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
- */ -@@ -41,7 +41,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ANY of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
- */ -@@ -52,7 +52,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ANY of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
- */ -@@ -66,7 +66,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ANY of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
- */ -@@ -81,7 +81,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ANY of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
- */ -@@ -97,7 +97,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ANY of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
- */ -@@ -114,7 +114,7 @@ - - /** - * Creates a matcher that matches if the examined object matches ANY of the specified matchers. -- *

-+ *

- * For example: - *
assertThat("myValue", anyOf(startsWith("foo"), containsString("Val")))
- */ ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/CombinableMatcher.java 2012-05-20 11:29:50.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/CombinableMatcher.java 2017-09-08 09:15:48.806422798 +0200 -@@ -42,7 +42,7 @@ - - /** - * Creates a matcher that matches when both of the specified matchers match the examined object. -- *

-+ *

- * For example: - *
assertThat("fab", both(containsString("a")).and(containsString("b")))
- */ -@@ -63,7 +63,7 @@ - - /** - * Creates a matcher that matches when either of the specified matchers match the examined object. -- *

-+ *

- * For example: - *
assertThat("fan", either(containsString("a")).and(containsString("b")))
- */ ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/DescribedAs.java 2012-06-10 16:53:10.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/DescribedAs.java 2017-09-08 09:15:48.810422798 +0200 -@@ -56,7 +56,7 @@ - /** - * Wraps an existing matcher, overriding its description with that specified. All other functions are - * delegated to the decorated matcher, including its mismatch description. -- *

-+ *

- * For example: - *
describedAs("a big decimal equal to %0", equalTo(myBigDecimal), myBigDecimal.toPlainString())
- * ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/Every.java 2012-05-20 11:19:43.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/Every.java 2017-09-08 09:15:48.806422798 +0200 -@@ -33,7 +33,7 @@ - * Creates a matcher for {@link Iterable}s that only matches when a single pass over the - * examined {@link Iterable} yields items that are all matched by the specified - * itemMatcher. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("bar", "baz"), everyItem(startsWith("ba")))
- * ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsCollectionContaining.java 2012-05-20 11:54:27.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsCollectionContaining.java 2017-09-08 09:15:48.806422798 +0200 -@@ -47,7 +47,7 @@ - * examined {@link Iterable} yields at least one item that is matched by the specified - * itemMatcher. Whilst matching, the traversal of the examined {@link Iterable} - * will stop as soon as a matching item is found. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), hasItem(startsWith("ba")))
- * -@@ -64,7 +64,7 @@ - * examined {@link Iterable} yields at least one item that is equal to the specified - * item. Whilst matching, the traversal of the examined {@link Iterable} - * will stop as soon as a matching item is found. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), hasItem("bar"))
- * -@@ -82,7 +82,7 @@ - * examined {@link Iterable} yield at least one item that is matched by the corresponding - * matcher from the specified itemMatchers. Whilst matching, each traversal of - * the examined {@link Iterable} will stop as soon as a matching item is found. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar", "baz"), hasItems(endsWith("z"), endsWith("o")))
- * -@@ -106,7 +106,7 @@ - * examined {@link Iterable} yield at least one item that is equal to the corresponding - * item from the specified items. Whilst matching, each traversal of the - * examined {@link Iterable} will stop as soon as a matching item is found. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar", "baz"), hasItems("baz", "foo"))
- * ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsEqual.java 2012-05-20 12:27:35.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsEqual.java 2017-09-08 09:15:48.806422798 +0200 -@@ -79,7 +79,7 @@ - * it will match if both the operand and the examined object are arrays of the same length and - * contain items that are equal to each other (according to the above rules) in the same - * indexes.

-- *

-+ *

- * For example: - *
-      * assertThat("foo", equalTo("foo"));
---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsInstanceOf.java	2012-05-20 12:41:25.000000000 +0200
-+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsInstanceOf.java	2017-09-08 09:15:48.806422798 +0200
-@@ -65,7 +65,7 @@
-      * the examined object.
-      * 
-      * 

The created matcher assumes no relationship between specified type and the examined object.

-- *

-+ *

- * For example: - *
assertThat(new Canoe(), instanceOf(Paddlable.class));
- * -@@ -84,7 +84,7 @@ - *

The created matcher forces a relationship between specified type and the examined object, and should be - * used when it is necessary to make generics conform, for example in the JMock clause - * with(any(Thing.class))

-- *

-+ *

- * For example: - *
assertThat(new Canoe(), instanceOf(Canoe.class));
- * ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/Is.java 2012-05-20 11:35:36.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/Is.java 2017-09-08 09:20:42.623568709 +0200 -@@ -40,7 +40,7 @@ - /** - * Decorates another Matcher, retaining its behaviour, but allowing tests - * to be slightly more expressive. -- *

-+ *

- * For example: - *
assertThat(cheese, is(equalTo(smelly)))
- * instead of: -@@ -54,7 +54,7 @@ - - /** - * A shortcut to the frequently used is(equalTo(x)). -- *

-+ *

- * For example: - *
assertThat(cheese, is(smelly))
- * instead of: -@@ -68,13 +68,13 @@ - - /** - * A shortcut to the frequently used is(instanceOf(SomeClass.class)). -- *

-+ *

- * For example: - *
assertThat(cheese, is(Cheddar.class))
- * instead of: - *
assertThat(cheese, is(instanceOf(Cheddar.class)))
- * -- * @deprecated use isA(Class type) instead. -+ * @deprecated use isA(Class<T> type) instead. - */ - @Factory - @Deprecated -@@ -85,7 +85,7 @@ - - /** - * A shortcut to the frequently used is(instanceOf(SomeClass.class)). -- *

-+ *

- * For example: - *
assertThat(cheese, isA(Cheddar.class))
- * instead of: ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsNot.java 2012-05-20 12:49:02.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsNot.java 2017-09-08 09:15:48.806422798 +0200 -@@ -34,7 +34,7 @@ - /** - * Creates a matcher that wraps an existing matcher, but inverts the logic by which - * it will match. -- *

-+ *

- * For example: - *
assertThat(cheese, is(not(equalTo(smelly))))
- * -@@ -48,7 +48,7 @@ - - /** - * A shortcut to the frequently used not(equalTo(x)). -- *

-+ *

- * For example: - *
assertThat(cheese, is(not(smelly)))
- * instead of: ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsNull.java 2012-05-20 12:56:27.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/IsNull.java 2017-09-08 09:15:48.806422798 +0200 -@@ -24,7 +24,7 @@ - - /** - * Creates a matcher that matches if examined object is null. -- *

-+ *

- * For example: - *
assertThat(cheese, is(nullValue())
- * -@@ -36,7 +36,7 @@ - - /** - * A shortcut to the frequently used not(nullValue()). -- *

-+ *

- * For example: - *
assertThat(cheese, is(notNullValue()))
- * instead of: -@@ -51,7 +51,7 @@ - /** - * Creates a matcher that matches if examined object is null. Accepts a - * single dummy argument to facilitate type inference. -- *

-+ *

- * For example: - *
assertThat(cheese, is(nullValue(Cheese.class))
- * -@@ -66,7 +66,7 @@ - /** - * A shortcut to the frequently used not(nullValue(X.class)). Accepts a - * single dummy argument to facilitate type inference.. -- *

-+ *

- * For example: - *
assertThat(cheese, is(notNullValue(X.class)))
- * instead of: ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/StringContains.java 2012-05-20 13:02:47.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/StringContains.java 2017-09-08 09:15:48.806422798 +0200 -@@ -26,7 +26,7 @@ - /** - * Creates a matcher that matches if the examined {@link String} contains the specified - * {@link String} anywhere. -- *

-+ *

- * For example: - *
assertThat("myStringOfNote", containsString("ring"))
- * ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/StringEndsWith.java 2012-05-20 13:02:23.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/StringEndsWith.java 2017-09-08 09:15:48.806422798 +0200 -@@ -26,7 +26,7 @@ - /** - * Creates a matcher that matches if the examined {@link String} ends with the specified - * {@link String}. -- *

-+ *

- * For example: - *
assertThat("myStringOfNote", endsWith("Note"))
- * ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/StringStartsWith.java 2012-05-20 13:02:14.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/core/StringStartsWith.java 2017-09-08 09:15:48.806422798 +0200 -@@ -26,7 +26,7 @@ - /** - * Creates a matcher that matches if the examined {@link String} starts with the specified - * {@link String}. -- *

-+ *

- * For example: - *
assertThat("myStringOfNote", startsWith("my"))
- * ---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/CustomMatcher.java 2012-05-10 21:16:11.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/CustomMatcher.java 2017-09-08 09:18:12.562425252 +0200 -@@ -6,7 +6,7 @@ - *
-  * Matcher<String> aNonEmptyString = new CustomMatcher<String>("a non empty string") {
-  *   public boolean matches(Object object) {
-- *     return ((object instanceof String) && !((String) object).isEmpty();
-+ *     return ((object instanceof String) && !((String) object).isEmpty();
-  *   }
-  * };
-  * 
---- hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/Matcher.java 2012-05-19 17:09:09.000000000 +0200 -+++ hamcrest-1.3/hamcrest-core/src/main/java/org/hamcrest/Matcher.java 2017-09-08 09:15:48.810422798 +0200 -@@ -5,15 +5,15 @@ - /** - * A matcher over acceptable values. - * A matcher is able to describe itself to give feedback when it fails. -- *

-+ *

- * Matcher implementations should NOT directly implement this interface. - * Instead, extend the {@link BaseMatcher} abstract class, - * which will ensure that the Matcher API can grow to support - * new features and remain compatible with all Matcher implementations. -- *

-+ *

- * For easy access to common Matcher implementations, use the static factory - * methods in {@link CoreMatchers}. -- *

-+ *

- * N.B. Well designed matchers should be immutable. - * - * @see CoreMatchers -@@ -23,7 +23,7 @@ - - /** - * Evaluates the matcher for argument item. -- *

-+ *

- * This method matches against Object, instead of the generic type T. This is - * because the caller of the Matcher does not know at runtime what the type is - * (because of type erasure with Java generics). It is down to the implementations ---- hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/FactoryMethod.java 2012-06-10 16:42:53.000000000 +0200 -+++ hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/FactoryMethod.java 2017-09-08 09:10:08.403506109 +0200 -@@ -6,7 +6,7 @@ - - /** - * Represents a Matcher Factory method. -- *

-+ *

- *

This class uses Strings to represent things instead of java.lang.reflect equivalents, - * allowing methods to be defined from sources other than reflection of classes in the - * classpath. -@@ -72,7 +72,7 @@ - - /** - * List of Parameters passed to factory method. -- * ie. 'public Matcher<...&ht;> blah(THIS, AND, THAT)' -+ * ie. 'public Matcher<...> blah(THIS, AND, THAT)' - */ - public List getParameters() { - return unmodifiableList(parameters); ---- hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/FactoryWriter.java 2012-05-10 21:16:11.000000000 +0200 -+++ hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/FactoryWriter.java 2017-09-08 09:11:58.739507993 +0200 -@@ -8,11 +8,11 @@ - * Writes syntactic sugar code for factories. - *

Implementations of this could include vanilla factory methods for - * Hamcrest matchers, wrapped factories for other libraries or factories -- * in other languages (jython, jruby, groovy, etc). -+ * in other languages (jython, jruby, groovy, etc).

- *

Usage:

- *
-  * writer.writeHeader(...);
-- * 

-+ * - * writer.writeMethod(...); - * writer.writeMethod(...); - * writer.writeMethod(...); ---- hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java 2012-06-17 11:52:43.000000000 +0200 -+++ hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java 2017-09-08 09:15:48.806422798 +0200 -@@ -17,7 +17,7 @@ - * ... - * } - *

-- *

All methods matching signature '@Factory public static Matcher blah(blah)' will be -+ *

All methods matching signature '@Factory public static Matcher<blah> blah(blah)' will be - * treated as factory methods. To change this behavior, override {@link #isFactoryMethod(Method)}. - *

Caveat: Reflection is hassle-free, but unfortunately cannot expose method parameter names or JavaDoc - * comments, making the sugar slightly more obscure. -@@ -77,12 +77,12 @@ - - /** - * Determine whether a particular method is classified as a matcher factory method. -- *

-+ *

- *

The rules for determining this are: - * 1. The method must be public static. - * 2. It must have a return type of org.hamcrest.Matcher (or something that extends this). - * 3. It must be marked with the org.hamcrest.Factory annotation. -- *

-+ *

- *

To use another set of rules, override this method. - */ - protected boolean isFactoryMethod(Method javaMethod) { -@@ -158,7 +158,7 @@ - - /* - * Get String representation of Type (e.g. java.lang.String or Map<Stuff,? extends Cheese>). -- *

-+ *

- * Annoyingly this method wouldn't be needed if java.lang.reflect.Type.toString() behaved consistently - * across implementations. Rock on Liskov. - */ ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/beans/HasProperty.java 2012-05-20 14:46:40.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/beans/HasProperty.java 2017-09-08 09:15:48.802422798 +0200 -@@ -46,7 +46,7 @@ - /** - * Creates a matcher that matches when the examined object has a JavaBean property - * with the specified name. -- *

-+ *

- * For example: - *
assertThat(myBean, hasProperty("foo"))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/beans/HasPropertyWithValue.java 2012-05-20 14:44:00.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/beans/HasPropertyWithValue.java 2017-09-08 09:15:48.802422798 +0200 -@@ -20,7 +20,7 @@ - * mock object meets the provided matcher. This is useful for when objects - * are created within code under test and passed to a mock object, and you wish - * to assert that the created object has certain properties. -- *

-+ *

- *

Example Usage

- * Consider the situation where we have a class representing a person, which - * follows the basic JavaBean convention of having get() and possibly set() -@@ -55,11 +55,11 @@ - * does not exist, is not readable, or a reflection related exception is thrown - * when trying to invoke it then this is treated as an evaluation failure and - * the matches method will return false. -- *

-+ *

- * This matcher class will also work with JavaBean objects that have explicit - * bean descriptions via an associated BeanInfo description class. See the - * JavaBeans specification for more information: -- *

-+ *

- * http://java.sun.com/products/javabeans/docs/index.html - * - * @author Iain McGinniss -@@ -136,7 +136,7 @@ - /** - * Creates a matcher that matches when the examined object has a JavaBean property - * with the specified name whose value satisfies the specified matcher. -- *

-+ *

- * For example: - *
assertThat(myBean, hasProperty("foo", equalTo("bar"))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/beans/PropertyUtil.java 2012-05-10 21:16:11.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/beans/PropertyUtil.java 2017-09-08 09:15:48.802422798 +0200 -@@ -8,7 +8,7 @@ - - /** - * Utility class for accessing properties on JavaBean objects. -- *

-+ *

- * See http://java.sun.com/products/javabeans/docs/index.html for - * more information on JavaBeans. - * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/beans/SamePropertyValuesAs.java 2012-05-20 14:46:38.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/beans/SamePropertyValuesAs.java 2017-09-08 09:15:48.802422798 +0200 -@@ -124,7 +124,7 @@ - * Creates a matcher that matches when the examined object has values for all of - * its JavaBean properties that are equal to the corresponding values of the - * specified bean. -- *

-+ *

- * For example: - *
assertThat(myBean, samePropertyValuesAs(myExpectedBean))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java 2012-05-20 16:39:49.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java 2017-09-08 09:15:48.806422798 +0200 -@@ -42,7 +42,7 @@ - * examined array satisfies one matcher anywhere in the specified matchers. - * For a positive match, the examined array must be of the same length as the number of - * specified matchers. -- *

-+ *

- * N.B. each of the specified matchers will only be used once during a given examination, so be - * careful when specifying matchers that may be satisfied by more than one entry in an examined - * array. -@@ -63,7 +63,7 @@ - * examined array satisfies one matcher anywhere in the specified collection of matchers. - * For a positive match, the examined array must be of the same length as the specified collection - * of matchers. -- *

-+ *

- * N.B. each matcher in the specified collection will only be used once during a given - * examination, so be careful when specifying matchers that may be satisfied by more than - * one entry in an examined array. -@@ -84,7 +84,7 @@ - * examined array is logically equal to one item anywhere in the specified items. - * For a positive match, the examined array must be of the same length as the number of - * specified items. -- *

-+ *

- * N.B. each of the specified items will only be used once during a given examination, so be - * careful when specifying items that may be equal to more than one entry in an examined - * array. ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java 2012-05-20 16:46:29.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java 2017-09-08 09:15:48.802422798 +0200 -@@ -40,7 +40,7 @@ - * Creates a matcher for arrays that matcheswhen each item in the examined array is - * logically equal to the corresponding item in the specified items. For a positive match, - * the examined array must be of the same length as the number of specified items. -- *

-+ *

- * For example: - *
assertThat(new String[]{"foo", "bar"}, contains("foo", "bar"))
- * -@@ -60,7 +60,7 @@ - * Creates a matcher for arrays that matches when each item in the examined array satisfies the - * corresponding matcher in the specified matchers. For a positive match, the examined array - * must be of the same length as the number of specified matchers. -- *

-+ *

- * For example: - *
assertThat(new String[]{"foo", "bar"}, contains(equalTo("foo"), equalTo("bar")))
- * -@@ -76,7 +76,7 @@ - * Creates a matcher for arrays that matches when each item in the examined array satisfies the - * corresponding matcher in the specified list of matchers. For a positive match, the examined array - * must be of the same length as the specified list of matchers. -- *

-+ *

- * For example: - *
assertThat(new String[]{"foo", "bar"}, contains(Arrays.asList(equalTo("foo"), equalTo("bar"))))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContaining.java 2012-05-20 15:04:17.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContaining.java 2017-09-08 09:15:48.806422798 +0200 -@@ -44,7 +44,7 @@ - * Creates a matcher for arrays that matches when the examined array contains at least one item - * that is matched by the specified elementMatcher. Whilst matching, the traversal - * of the examined array will stop as soon as a matching element is found. -- *

-+ *

- * For example: - *
assertThat(new String[] {"foo", "bar"}, hasItemInArray(startsWith("ba")))
- * -@@ -58,7 +58,7 @@ - - /** - * A shortcut to the frequently used hasItemInArray(equalTo(x)). -- *

-+ *

- * For example: - *
assertThat(hasItemInArray(x))
- * instead of: ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArray.java 2012-05-20 14:54:52.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArray.java 2017-09-08 09:15:48.802422798 +0200 -@@ -83,7 +83,7 @@ - * Creates a matcher that matches arrays whose elements are satisfied by the specified matchers. Matches - * positively only if the number of matchers specified is equal to the length of the examined array and - * each matcher[i] is satisfied by array[i]. -- *

-+ *

- * For example: - *
assertThat(new Integer[]{1,2,3}, is(array(equalTo(1), equalTo(2), equalTo(3))))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayWithSize.java 2012-05-20 16:19:19.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayWithSize.java 2017-09-08 09:15:48.802422798 +0200 -@@ -23,7 +23,7 @@ - /** - * Creates a matcher for arrays that matches when the length of the array - * satisfies the specified matcher. -- *

-+ *

- * For example: - *
assertThat(new String[]{"foo", "bar"}, arrayWithSize(equalTo(2)))
- * -@@ -38,7 +38,7 @@ - /** - * Creates a matcher for arrays that matches when the length of the array - * equals the specified size. -- *

-+ *

- * For example: - *
assertThat(new String[]{"foo", "bar"}, arrayWithSize(2))
- * -@@ -53,7 +53,7 @@ - /** - * Creates a matcher for arrays that matches when the length of the array - * is zero. -- *

-+ *

- * For example: - *
assertThat(new String[0], emptyArray())
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsCollectionWithSize.java 2012-06-10 17:02:21.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsCollectionWithSize.java 2017-09-08 09:15:48.802422798 +0200 -@@ -24,7 +24,7 @@ - /** - * Creates a matcher for {@link java.util.Collection}s that matches when the size() method returns - * a value that satisfies the specified matcher. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), hasSize(equalTo(2)))
- * -@@ -39,7 +39,7 @@ - /** - * Creates a matcher for {@link java.util.Collection}s that matches when the size() method returns - * a value equal to the specified size. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), hasSize(2))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsEmptyCollection.java 2012-06-18 23:49:04.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsEmptyCollection.java 2017-09-08 09:15:48.802422798 +0200 -@@ -30,7 +30,7 @@ - /** - * Creates a matcher for {@link java.util.Collection}s matching examined collections whose isEmpty - * method returns true. -- *

-+ *

- * For example: - *
assertThat(new ArrayList<String>(), is(empty()))
- * -@@ -43,7 +43,7 @@ - /** - * Creates a matcher for {@link java.util.Collection}s matching examined collections whose isEmpty - * method returns true. -- *

-+ *

- * For example: - *
assertThat(new ArrayList<String>(), is(emptyCollectionOf(String.class)))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsEmptyIterable.java 2012-06-18 23:49:30.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsEmptyIterable.java 2017-09-08 09:15:48.806422798 +0200 -@@ -26,7 +26,7 @@ - - /** - * Creates a matcher for {@link Iterable}s matching examined iterables that yield no items. -- *

-+ *

- * For example: - *
assertThat(new ArrayList<String>(), is(emptyIterable()))
- * -@@ -38,7 +38,7 @@ - - /** - * Creates a matcher for {@link Iterable}s matching examined iterables that yield no items. -- *

-+ *

- * For example: - *
assertThat(new ArrayList<String>(), is(emptyIterableOf(String.class)))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIn.java 2012-05-20 17:43:01.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIn.java 2017-09-08 09:15:48.802422798 +0200 -@@ -33,7 +33,7 @@ - /** - * Creates a matcher that matches when the examined object is found within the - * specified collection. -- *

-+ *

- * For example: - *
assertThat("foo", isIn(Arrays.asList("bar", "foo")))
- * -@@ -49,7 +49,7 @@ - /** - * Creates a matcher that matches when the examined object is found within the - * specified array. -- *

-+ *

- * For example: - *
assertThat("foo", isIn(new String[]{"bar", "foo"}))
- * -@@ -65,7 +65,7 @@ - /** - * Creates a matcher that matches when the examined object is equal to one of the - * specified elements. -- *

-+ *

- * For example: - *
assertThat("foo", isIn("bar", "foo"))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java 2012-05-20 17:43:31.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java 2017-09-08 09:27:24.901132454 +0200 -@@ -87,11 +87,11 @@ - * Creates a matcher for {@link Iterable}s that matches when a single pass over the - * examined {@link Iterable} yields a single item that satisfies the specified matcher. - * For a positive match, the examined iterable must only yield one item. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo"), containsInAnyOrder(equalTo("foo")))
- * -- * @deprecated use contains(Matcher itemMatcher) instead -+ * @deprecated use contains(Matcher<? super E> itemMatcher) instead - * - * @param itemMatcher - * the matcher that must be satisfied by the single item provided by an -@@ -109,11 +109,11 @@ - * the examined {@link Iterable} yields a series of items, each satisfying one matcher anywhere - * in the specified matchers. For a positive match, the examined iterable must be of the same - * length as the number of specified matchers. -- *

-+ *

- * N.B. each of the specified matchers will only be used once during a given examination, so be - * careful when specifying matchers that may be satisfied by more than one entry in an examined - * iterable. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder(equalTo("bar"), equalTo("foo")))
- * -@@ -130,11 +130,11 @@ - * the examined {@link Iterable} yields a series of items, each logically equal to one item - * anywhere in the specified items. For a positive match, the examined iterable - * must be of the same length as the number of specified items. -- *

-+ *

- * N.B. each of the specified items will only be used once during a given examination, so be - * careful when specifying items that may be equal to more than one entry in an examined - * iterable. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder("bar", "foo"))
- * -@@ -156,11 +156,11 @@ - * the examined {@link Iterable} yields a series of items, each satisfying one matcher anywhere - * in the specified collection of matchers. For a positive match, the examined iterable - * must be of the same length as the specified collection of matchers. -- *

-+ *

- * N.B. each matcher in the specified collection will only be used once during a given - * examination, so be careful when specifying matchers that may be satisfied by more than - * one entry in an examined iterable. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), containsInAnyOrder(Arrays.asList(equalTo("bar"), equalTo("foo"))))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInOrder.java 2012-05-20 15:25:17.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInOrder.java 2017-09-08 09:15:48.802422798 +0200 -@@ -89,7 +89,7 @@ - * examined {@link Iterable} yields a series of items, each logically equal to the - * corresponding item in the specified items. For a positive match, the examined iterable - * must be of the same length as the number of specified items. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), contains("foo", "bar"))
- * -@@ -110,7 +110,7 @@ - * Creates a matcher for {@link Iterable}s that matches when a single pass over the - * examined {@link Iterable} yields a single item that satisfies the specified matcher. - * For a positive match, the examined iterable must only yield one item. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo"), contains(equalTo("foo")))
- * -@@ -129,7 +129,7 @@ - * examined {@link Iterable} yields a series of items, each satisfying the corresponding - * matcher in the specified matchers. For a positive match, the examined iterable - * must be of the same length as the number of specified matchers. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), contains(equalTo("foo"), equalTo("bar")))
- * -@@ -146,7 +146,7 @@ - * examined {@link Iterable} yields a series of items, each satisfying the corresponding - * matcher in the specified list of matchers. For a positive match, the examined iterable - * must be of the same length as the specified list of matchers. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), contains(Arrays.asList(equalTo("foo"), equalTo("bar"))))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableWithSize.java 2012-05-20 16:14:03.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableWithSize.java 2017-09-08 09:15:48.802422798 +0200 -@@ -28,7 +28,7 @@ - * Creates a matcher for {@link Iterable}s that matches when a single pass over the - * examined {@link Iterable} yields an item count that satisfies the specified - * matcher. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), iterableWithSize(equalTo(2)))
- * -@@ -44,7 +44,7 @@ - * Creates a matcher for {@link Iterable}s that matches when a single pass over the - * examined {@link Iterable} yields an item count that is equal to the specified - * size argument. -- *

-+ *

- * For example: - *
assertThat(Arrays.asList("foo", "bar"), iterableWithSize(2))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsMapContaining.java 2012-06-10 17:04:41.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsMapContaining.java 2017-09-08 09:15:48.802422798 +0200 -@@ -48,7 +48,7 @@ - * Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map} contains - * at least one entry whose key satisfies the specified keyMatcher and whose - * value satisfies the specified valueMatcher. -- *

-+ *

- * For example: - *
assertThat(myMap, hasEntry(equalTo("bar"), equalTo("foo")))
- * -@@ -66,7 +66,7 @@ - * Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map} contains - * at least one entry whose key equals the specified key and whose value equals the - * specified value. -- *

-+ *

- * For example: - *
assertThat(myMap, hasEntry("bar", "foo"))
- * -@@ -83,7 +83,7 @@ - /** - * Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map} contains - * at least one key that satisfies the specified matcher. -- *

-+ *

- * For example: - *
assertThat(myMap, hasKey(equalTo("bar")))
- * -@@ -98,7 +98,7 @@ - /** - * Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map} contains - * at least one key that is equal to the specified key. -- *

-+ *

- * For example: - *
assertThat(myMap, hasKey("bar"))
- * -@@ -113,7 +113,7 @@ - /** - * Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map} contains - * at least one value that satisfies the specified valueMatcher. -- *

-+ *

- * For example: - *
assertThat(myMap, hasValue(equalTo("foo")))
- * -@@ -128,7 +128,7 @@ - /** - * Creates a matcher for {@link java.util.Map}s matching when the examined {@link java.util.Map} contains - * at least one value that is equal to the specified value. -- *

-+ *

- * For example: - *
assertThat(myMap, hasValue("foo"))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/number/BigDecimalCloseTo.java 2012-06-10 17:06:51.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/number/BigDecimalCloseTo.java 2017-09-08 09:15:48.806422798 +0200 -@@ -46,7 +46,7 @@ - * Creates a matcher of {@link java.math.BigDecimal}s that matches when an examined BigDecimal is equal - * to the specified operand, within a range of +/- error. The comparison for equality - * is done by BigDecimals {@link java.math.BigDecimal#compareTo(java.math.BigDecimal)} method. -- *

-+ *

- * For example: - *
assertThat(new BigDecimal("1.03"), is(closeTo(new BigDecimal("1.0"), new BigDecimal("0.03"))))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/number/IsCloseTo.java 2012-05-20 17:44:07.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/number/IsCloseTo.java 2017-09-08 09:15:48.806422798 +0200 -@@ -48,7 +48,7 @@ - /** - * Creates a matcher of {@link Double}s that matches when an examined double is equal - * to the specified operand, within a range of +/- error. -- *

-+ *

- * For example: - *
assertThat(1.03, is(closeTo(1.0, 0.03)))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/number/OrderingComparison.java 2012-05-20 16:59:41.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/number/OrderingComparison.java 2017-09-08 09:15:48.806422798 +0200 -@@ -58,7 +58,7 @@ - * Creates a matcher of {@link Comparable} object that matches when the examined object is - * equal to the specified value, as reported by the compareTo method of the - * examined object. -- *

-+ *

- * For example: - *
assertThat(1, comparesEqualTo(1))
- * -@@ -75,7 +75,7 @@ - * Creates a matcher of {@link Comparable} object that matches when the examined object is - * greater than the specified value, as reported by the compareTo method of the - * examined object. -- *

-+ *

- * For example: - *
assertThat(2, greaterThan(1))
- * -@@ -93,7 +93,7 @@ - * Creates a matcher of {@link Comparable} object that matches when the examined object is - * greater than or equal to the specified value, as reported by the compareTo method - * of the examined object. -- *

-+ *

- * For example: - *
assertThat(1, greaterThanOrEqualTo(1))
- * -@@ -111,7 +111,7 @@ - * Creates a matcher of {@link Comparable} object that matches when the examined object is - * less than the specified value, as reported by the compareTo method of the - * examined object. -- *

-+ *

- * For example: - *
assertThat(1, lessThan(2))
- * -@@ -129,7 +129,7 @@ - * Creates a matcher of {@link Comparable} object that matches when the examined object is - * less than or equal to the specified value, as reported by the compareTo method - * of the examined object. -- *

-+ *

- * For example: - *
assertThat(1, lessThanOrEqualTo(1))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/object/HasToString.java 2012-05-20 17:04:01.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/object/HasToString.java 2017-09-08 09:15:48.806422798 +0200 -@@ -19,7 +19,7 @@ - /** - * Creates a matcher that matches any examined object whose toString method - * returns a value that satisfies the specified matcher. -- *

-+ *

- * For example: - *
assertThat(true, hasToString(equalTo("TRUE")))
- * -@@ -34,7 +34,7 @@ - /** - * Creates a matcher that matches any examined object whose toString method - * returns a value equalTo the specified string. -- *

-+ *

- * For example: - *
assertThat(true, hasToString("TRUE"))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/object/IsCompatibleType.java 2012-05-20 17:44:35.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/object/IsCompatibleType.java 2017-09-08 09:15:48.806422798 +0200 -@@ -30,7 +30,7 @@ - /** - * Creates a matcher of {@link Class} that matches when the specified baseType is - * assignable from the examined class. -- *

-+ *

- * For example: - *
assertThat(Integer.class, typeCompatibleWith(Number.class))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/object/IsEventFrom.java 2012-06-10 17:03:11.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/object/IsEventFrom.java 2017-09-08 09:24:20.531572428 +0200 -@@ -50,6 +50,7 @@ - } - - /** -+ *

- * Creates a matcher of {@link java.util.EventObject} that matches any object - * derived from eventClass announced by source. - *

-@@ -67,6 +68,7 @@ - } - - /** -+ *

- * Creates a matcher of {@link java.util.EventObject} that matches any EventObject - * announced by source. - *

---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/text/IsEmptyString.java 2012-05-20 17:15:48.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/text/IsEmptyString.java 2017-09-08 09:15:48.806422798 +0200 -@@ -29,7 +29,7 @@ - - /** - * Creates a matcher of {@link String} that matches when the examined string has zero length. -- *

-+ *

- * For example: - *
assertThat("", isEmptyString())
- * -@@ -42,7 +42,7 @@ - /** - * Creates a matcher of {@link String} that matches when the examined string is null, or - * has zero length. -- *

-+ *

- * For example: - *
assertThat(((String)null), isEmptyString())
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/text/IsEqualIgnoringCase.java 2012-05-20 17:18:01.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/text/IsEqualIgnoringCase.java 2017-09-08 09:15:48.806422798 +0200 -@@ -44,7 +44,7 @@ - /** - * Creates a matcher of {@link String} that matches when the examined string is equal to - * the specified expectedString, ignoring case. -- *

-+ *

- * For example: - *
assertThat("Foo", equalToIgnoringCase("FOO"))
- * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/text/IsEqualIgnoringWhiteSpace.java 2012-05-20 17:25:03.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/text/IsEqualIgnoringWhiteSpace.java 2017-09-08 09:15:48.806422798 +0200 -@@ -69,7 +69,7 @@ - *
  • all leading and trailing whitespace of both the expectedString and the examined string are ignored
  • - *
  • any remaining whitespace, appearing within either string, is collapsed to a single space before comparison
  • - * -- *

    -+ *

    - * For example: - *
    assertThat("   my\tfoo  bar ", equalToIgnoringWhiteSpace(" my  foo bar"))
    - * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/text/StringContainsInOrder.java 2012-05-20 17:29:11.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/text/StringContainsInOrder.java 2017-09-08 09:15:48.806422798 +0200 -@@ -41,7 +41,7 @@ - /** - * Creates a matcher of {@link String} that matches when the examined string contains all of - * the specified substrings, regardless of the order of their appearance. -- *

    -+ *

    - * For example: - *
    assertThat("myfoobarbaz", stringContainsInOrder(Arrays.asList("bar", "foo")))
    - * ---- hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/xml/HasXPath.java 2012-06-10 17:06:08.000000000 +0200 -+++ hamcrest-1.3/hamcrest-library/src/main/java/org/hamcrest/xml/HasXPath.java 2017-09-08 09:15:48.806422798 +0200 -@@ -106,7 +106,7 @@ - /** - * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node has a value at the - * specified xPath that satisfies the specified valueMatcher. -- *

    -+ *

    - * For example: - *
    assertThat(xml, hasXPath("/root/something[2]/cheese", equalTo("Cheddar")))
    - * -@@ -124,7 +124,7 @@ - * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node has a value at the - * specified xPath, within the specified namespaceContext, that satisfies - * the specified valueMatcher. -- *

    -+ *

    - * For example: - *
    assertThat(xml, hasXPath("/root/something[2]/cheese", myNs, equalTo("Cheddar")))
    - * -@@ -143,7 +143,7 @@ - /** - * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node contains a node - * at the specified xPath, with any content. -- *

    -+ *

    - * For example: - *
    assertThat(xml, hasXPath("/root/something[2]/cheese"))
    - * -@@ -158,7 +158,7 @@ - /** - * Creates a matcher of {@link org.w3c.dom.Node}s that matches when the examined node contains a node - * at the specified xPath within the specified namespace context, with any content. -- *

    -+ *

    - * For example: - *
    assertThat(xml, hasXPath("/root/something[2]/cheese", myNs))
    - * diff --git a/hamcrest-1.3-no-jarjar.patch b/hamcrest-1.3-no-jarjar.patch deleted file mode 100644 index aea9578..0000000 --- a/hamcrest-1.3-no-jarjar.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/build.xml b/build.xml -index 54d43fe..ed57763 100644 ---- a/build.xml -+++ b/build.xml -@@ -13,17 +13,8 @@ - - - -- -- -- -- -- -- -- -- -- - - - diff --git a/hamcrest-1.3-qdox-2.0.patch b/hamcrest-1.3-qdox-2.0.patch deleted file mode 100644 index c28c762..0000000 --- a/hamcrest-1.3-qdox-2.0.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 6d7da5456a7458a249bed9c4c1e768cc7cc2fe40 Mon Sep 17 00:00:00 2001 -From: Michael Simacek -Date: Wed, 1 Feb 2017 12:57:14 +0100 -Subject: [PATCH] Port to qdox 2.0 - ---- - .../src/main/java/org/hamcrest/generator/QDox.java | 4 ++-- - .../org/hamcrest/generator/QDoxFactoryReader.java | 26 ++++++++++++---------- - 2 files changed, 16 insertions(+), 14 deletions(-) - -diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java -index efaf615..338178d 100644 ---- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java -+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java -@@ -1,6 +1,6 @@ - package org.hamcrest.generator; - --import com.thoughtworks.qdox.JavaDocBuilder; -+import com.thoughtworks.qdox.JavaProjectBuilder; - import com.thoughtworks.qdox.model.JavaClass; - - import java.io.File; -@@ -16,7 +16,7 @@ import java.io.Reader; - */ - public class QDox { - -- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder(); -+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder(); - - public void addSourceTree(File sourceDir) { - javaDocBuilder.addSourceTree(sourceDir); -diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java -index 5108140..97fce01 100644 ---- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java -+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java -@@ -4,8 +4,10 @@ import com.thoughtworks.qdox.model.DocletTag; - import com.thoughtworks.qdox.model.JavaClass; - import com.thoughtworks.qdox.model.JavaMethod; - import com.thoughtworks.qdox.model.JavaParameter; --import com.thoughtworks.qdox.model.Type; -+import com.thoughtworks.qdox.model.JavaType; -+import com.thoughtworks.qdox.model.impl.DefaultJavaClass; - -+import java.util.ArrayList; - import java.util.Iterator; - import java.util.List; - import java.util.regex.Pattern; -@@ -56,15 +58,15 @@ public class QDoxFactoryReader implements Iterable { - JavaMethod methodSource = findMethodInSource(factoryMethod); - if (methodSource != null) { - factoryMethod.setJavaDoc(createJavaDocComment(methodSource)); -- JavaParameter[] parametersFromSource -+ List parametersFromSource - = methodSource.getParameters(); - List parametersFromReflection - = factoryMethod.getParameters(); - -- if (parametersFromReflection.size() == parametersFromSource.length) { -- for (int i = 0; i < parametersFromSource.length; i++) { -+ if (parametersFromReflection.size() == parametersFromSource.size()) { -+ for (int i = 0; i < parametersFromSource.size(); i++) { - parametersFromReflection.get(i).setName( -- parametersFromSource[i].getName()); -+ parametersFromSource.get(i).getName()); - } - } - } -@@ -79,18 +81,18 @@ public class QDoxFactoryReader implements Iterable { - // Note, this doesn't always work - it struggles with some kinds of generics. - // This seems to cover most cases though. - List params = factoryMethod.getParameters(); -- Type[] types = new Type[params.size()]; -+ List types = new ArrayList(params.size()); - boolean varArgs = false; -- for (int i = 0; i < types.length; i++) { -+ for (int i = 0; i < params.size(); i++) { - String type = params.get(i).getType(); - varArgs = VARARGS_REGEX.matcher(type).find(); - // QDox ignores varargs and generics, so we strip them out to help QDox. - type = GENERIC_REGEX.matcher(type).replaceAll(""); - type = VARARGS_REGEX.matcher(type).replaceAll(""); -- types[i] = new Type(type); -+ types.add(new DefaultJavaClass(type)); - } -- JavaMethod[] methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs); -- return methods.length == 1 ? methods[0] : null; -+ List methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs); -+ return methods.size() == 1 ? methods.get(0) : null; - } - - /** -@@ -98,8 +100,8 @@ public class QDoxFactoryReader implements Iterable { - */ - private static String createJavaDocComment(JavaMethod methodSource) { - String comment = methodSource.getComment(); -- DocletTag[] tags = methodSource.getTags(); -- if ((comment == null || comment.trim().length() == 0) && tags.length == 0) { -+ List tags = methodSource.getTags(); -+ if ((comment == null || comment.trim().length() == 0) && tags.size() == 0) { - return null; - } - StringBuilder result = new StringBuilder(); --- -2.9.3 - diff --git a/hamcrest-1.3-random-build-crash.patch b/hamcrest-1.3-random-build-crash.patch deleted file mode 100644 index 8c1704c..0000000 --- a/hamcrest-1.3-random-build-crash.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -urN hamcrest-1.3.old/build.xml hamcrest-1.3/build.xml ---- hamcrest-1.3.old/build.xml 2014-06-16 13:00:29.321699344 +0200 -+++ hamcrest-1.3/build.xml 2014-06-16 14:24:30.160165471 +0200 -@@ -27,6 +27,7 @@ - - - -+ - - - -@@ -36,7 +37,7 @@ - fork="yes" - failonerror="yes" - classpath=" -- build/hamcrest-core-${version}.jar; -+ build/temp/hamcrest-core-${version}.jar.contents; - build/hamcrest-generator-${version}.jar; - "> - -@@ -48,11 +49,13 @@ - -+ - - - -+ - - -+ - - - diff --git a/hamcrest-2.2.pom b/hamcrest-2.2.pom new file mode 100644 index 0000000..91d3896 --- /dev/null +++ b/hamcrest-2.2.pom @@ -0,0 +1,35 @@ + + + 4.0.0 + org.hamcrest + hamcrest + 2.2 + Hamcrest + Core API and libraries of hamcrest matcher framework. + http://hamcrest.org/JavaHamcrest/ + + + BSD License 3 + http://opensource.org/licenses/BSD-3-Clause + + + + + joewalnes + Joe Walnes + + + npryce + Nat Pryce + + + sf105 + Steve Freeman + + + + git@github.com:hamcrest/JavaHamcrest.git + https://github.com/hamcrest/JavaHamcrest + + diff --git a/hamcrest-2.2.tar.xz b/hamcrest-2.2.tar.xz new file mode 100644 index 0000000..7bdb4e4 --- /dev/null +++ b/hamcrest-2.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dc070ac5ca508d33ff80e44b61dfd755764014b119462d5a6e80c22494ce9ce +size 51684 diff --git a/hamcrest-build.xml b/hamcrest-build.xml new file mode 100644 index 0000000..50deace --- /dev/null +++ b/hamcrest-build.xml @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =================================== WARNING =================================== + JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed. + =============================================================================== + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hamcrest-core-MANIFEST.MF b/hamcrest-core-MANIFEST.MF deleted file mode 100644 index c07e309..0000000 --- a/hamcrest-core-MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Vendor: Fedoraproject.org -Bundle-ActivationPolicy: lazy -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Name: Hamcrest Core -Bundle-SymbolicName: org.hamcrest.core -Eclipse-SourceReferences: scm:cvs:pserver:dev.eclipse.org:/cvsroot/too - ls:org.eclipse.orbit/org.hamcrest.core;tag=v201303031735 -Export-Package: org.hamcrest;version="1.3.0";core=split;mandatory:=cor - e,org.hamcrest.core;version="1.3.0",org.hamcrest.internal;version="1. - 3.0";x-internal:=true -Bundle-Version: 1.3.0.v201303031735 -Bundle-ManifestVersion: 2 diff --git a/hamcrest-generator-MANIFEST.MF b/hamcrest-generator-MANIFEST.MF deleted file mode 100644 index c9a5e85..0000000 --- a/hamcrest-generator-MANIFEST.MF +++ /dev/null @@ -1,18 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.hamcrest.generator -Bundle-Version: 1.3.0.v20090501071000 -Export-Package: org.hamcrest.generator;version="1.3.0",org.hamcrest.ge - nerator.config;version="1.3.0" -Bundle-ManifestVersion: 2 -Import-Package: com.thoughtworks.qdox;version="1.6.3",com.thoughtworks - .qdox.ant;version="1.6.3",com.thoughtworks.qdox.directorywalker;versi - on="1.6.3",com.thoughtworks.qdox.junit;version="1.6.3",com.thoughtwor - ks.qdox.model;version="1.6.3",com.thoughtworks.qdox.model.util;versio - n="1.6.3",com.thoughtworks.qdox.parser;version="1.6.3",com.thoughtwor - ks.qdox.parser.impl;version="1.6.3",com.thoughtworks.qdox.parser.stru - cts;version="1.6.3",com.thoughtworks.qdox.tools;version="1.6.3" diff --git a/hamcrest-integration-MANIFEST.MF b/hamcrest-integration-MANIFEST.MF deleted file mode 100644 index 13f9f57..0000000 --- a/hamcrest-integration-MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.hamcrest.integration -Require-Bundle: org.hamcrest.core;bundle-version="1.3.0" -Bundle-Version: 1.3.0.v20090501071000 -Export-Package: org.hamcrest;integration=split;mandatory:=integration; - version="1.3.0",org.hamcrest.integration;version="1.3.0" -Bundle-ManifestVersion: 2 -Import-Package: org.easymock;version="2.4.0";resolution:=optional,org. - jmock.core;version="1.10";resolution:=optional diff --git a/hamcrest-java-1.3.tar.gz b/hamcrest-java-1.3.tar.gz deleted file mode 100644 index d1b1ca7..0000000 --- a/hamcrest-java-1.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ac31de50c6f3b047a7bd7f62ab7ca3e88b2a8449d22b0978c9f575740d0e085 -size 2007925 diff --git a/hamcrest-library-MANIFEST.MF b/hamcrest-library-MANIFEST.MF deleted file mode 100644 index c535a91..0000000 --- a/hamcrest-library-MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.hamcrest.library -Require-Bundle: org.hamcrest.core;bundle-version="1.3.0" -Bundle-Version: 1.3.0.v20090501071000 -Export-Package: org.hamcrest;version="1.3.0";library=split;mandatory:= - library,org.hamcrest.beans;version="1.3.0",org.hamcrest.collection;ve - rsion="1.3.0",org.hamcrest.number;version="1.3.0",org.hamcrest.object - ;version="1.3.0",org.hamcrest.text;version="1.3.0",org.hamcrest.xml;v - ersion="1.3.0" -Bundle-ManifestVersion: 2 diff --git a/hamcrest-matchers.patch b/hamcrest-matchers.patch deleted file mode 100644 index b90db8d..0000000 --- a/hamcrest-matchers.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- JavaHamcrest-hamcrest-java-1.3/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java 2022-03-18 20:35:38.293788586 +0100 -+++ JavaHamcrest-hamcrest-java-1.3/hamcrest-core/src/main/java/org/hamcrest/core/AllOf.java 2022-03-18 20:46:34.534452749 +0100 -@@ -57,7 +57,7 @@ - */ - @Factory - public static Matcher allOf(Matcher... matchers) { -- return allOf(Arrays.asList(matchers)); -+ return new AllOf(Arrays.asList(matchers)); - } - - /** ---- JavaHamcrest-hamcrest-java-1.3/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java 2022-03-18 20:35:38.293788586 +0100 -+++ JavaHamcrest-hamcrest-java-1.3/hamcrest-core/src/main/java/org/hamcrest/core/AnyOf.java 2022-03-18 20:39:13.031315993 +0100 -@@ -47,7 +47,7 @@ - */ - @Factory - public static AnyOf anyOf(Matcher... matchers) { -- return anyOf(Arrays.asList(matchers)); -+ return new AnyOf(Arrays.asList(matchers)); - } - - /** ---- JavaHamcrest-hamcrest-java-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java 2022-03-18 20:35:38.297788614 +0100 -+++ JavaHamcrest-hamcrest-java-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java 2022-03-18 20:49:03.047502492 +0100 -@@ -55,7 +55,7 @@ - */ - @Factory - public static Matcher arrayContainingInAnyOrder(Matcher... itemMatchers) { -- return arrayContainingInAnyOrder(Arrays.asList(itemMatchers)); -+ return new IsArrayContainingInAnyOrder(Arrays.asList(itemMatchers)); - } - - /** ---- JavaHamcrest-hamcrest-java-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java 2022-03-18 20:35:38.297788614 +0100 -+++ JavaHamcrest-hamcrest-java-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java 2022-03-18 20:49:57.623888266 +0100 -@@ -69,7 +69,7 @@ - */ - @Factory - public static Matcher arrayContaining(Matcher... itemMatchers) { -- return arrayContaining(asList(itemMatchers)); -+ return new IsArrayContainingInOrder(asList(itemMatchers)); - } - - /** ---- JavaHamcrest-hamcrest-java-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java 2022-03-18 20:35:38.297788614 +0100 -+++ JavaHamcrest-hamcrest-java-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java 2022-03-18 20:56:50.738808383 +0100 -@@ -122,7 +122,7 @@ - */ - @Factory - public static Matcher> containsInAnyOrder(Matcher... itemMatchers) { -- return containsInAnyOrder(Arrays.asList(itemMatchers)); -+ return new IsIterableContainingInAnyOrder(Arrays.asList(itemMatchers)); - } - - /** ---- JavaHamcrest-hamcrest-java-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInOrder.java 2022-03-18 20:35:38.297788614 +0100 -+++ JavaHamcrest-hamcrest-java-1.3/hamcrest-library/src/main/java/org/hamcrest/collection/IsIterableContainingInOrder.java 2022-03-18 21:21:22.189211465 +0100 -@@ -138,7 +138,7 @@ - */ - @Factory - public static Matcher> contains(Matcher... itemMatchers) { -- return contains(asList(itemMatchers)); -+ return new IsIterableContainingInOrder(asList(itemMatchers)); - } - - /** diff --git a/hamcrest-reproducible-builds.patch b/hamcrest-reproducible-builds.patch deleted file mode 100644 index ca611c6..0000000 --- a/hamcrest-reproducible-builds.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java -+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java -@@ -43,6 +43,13 @@ - - private int currentMethod = -1; - private Method[] allMethods = cls.getMethods(); -+ { -+ java.util.Arrays.sort(allMethods, new java.util.Comparator() { -+ public int compare(Method m1, Method m2) { -+ return m1.toGenericString().compareTo(m2.toGenericString()); -+ } -+ }); -+ } - - @Override - public boolean hasNext() { -@@ -171,4 +178,4 @@ - return name.replace('$', '.'); - } - --} -\ No newline at end of file -+} diff --git a/hamcrest.changes b/hamcrest.changes index d51e6a0..2eccd3e 100644 --- a/hamcrest.changes +++ b/hamcrest.changes @@ -1,3 +1,77 @@ +------------------------------------------------------------------- +Thu Jun 9 16:00:32 UTC 2022 - Fridrich Strba + +- Upgrade to upstream version 2.2 + * After a long hiatus without releases, this version simplifies + the packaging of Hamcrest into a single jar. Other big changes + include Java 9 module compatibility, along with numerous other + improvements and bug fixes. + * Breaking Changes + + Although the class API has not changed since Hamcrest 1.3, the + way that the project is packaged has changed. Refer to the + Hamcrest Distributables documentation for more information, + and in particular the section on Upgrading from Hamcrest 1.x + + The org.hamcrest.Factory annotation has been removed + (it should not be used in client code) + * Improvements + + AllOf/AnyOf: Pass the matchers to constructor using varargs + + Matchers.anyOf: Fix generic bounds compatibility for JDK 11 + + AssertionError message is unhelpful when match fails for byte + type + + Use platform specific line breaks + + Build now checks for consistent use of spaces + * Changes + + Fix compatibility issue for development with Android D8 + + Fix typo in license name + + 1.3 compatible constructors for string matchers + + Fix for split packages with Java 9 modules + + Documentation updates + + Add implementation for CharSequence length matcher + + Fix for TypeSafeDiagnosingMatcher can't detect generic types + for subclass + + Renamed IsCollectionContaining to IsIterableContaining + + Make Hamcrest an OSGI bundle + + Add StringRegularExpression matcher + + Fix StringContainsInOrder to detect if a repeated pattern is + missing + + Add ArrayAsIterableMatcher + + Fix description for IsEqualIgnoringCase + + Fix JavaDoc examples + + Upgraded to Java 7 + + Build with Gradle + + Deprecate IsCollectionContaining and IsArrayContainingXXX + + Removed deprecated methods from previous release + + Improve mismatch description of hasItem/hasItems + + General improvements to mismatch descriptions + + Several JavaDoc improvements and corrections + + Deprecated several matcher factory methods of the for "isXyz" + + Fix address doclint errors reported in JDK 1.8 + + Fix Iterable contains in order is null-safe + + Added equalToObject() (i.e. unchecked) method + + Fix arrayContaining(null, null) cause NullPointerException + * Fix string matching on regular expressions + * Fix isCloseTo() shows wrong delta in mismatch description + * Fix add untyped version of equalTo, named equalToObject + * Implement IsEmptyMap, IsMapWithSize + * Fix IsArray.describeMismatchSafely() should use + Matcher.describeMismatch + * Add Matcher implementation for files + * Fix NPE in IsIterableContainingInOrder +- Removed patches: + * hamcrest-1.3-build.patch + * hamcrest-1.3-fork-javac.patch + * hamcrest-1.3-javadoc.patch + * hamcrest-1.3-javadoc10.patch + * hamcrest-1.3-javadoc9.patch + * hamcrest-1.3-no-jarjar.patch + * hamcrest-1.3-qdox-2.0.patch + * hamcrest-1.3-random-build-crash.patch + * hamcrest-reproducible-builds.patch + + not needed with the new version +- Modified patch: + * hamcrest-matchers.patch -> 0001-Fix-build-with-OpenJDK-11.patch + + adapt to the changed context + ------------------------------------------------------------------- Fri Mar 18 20:25:15 UTC 2022 - Fridrich Strba diff --git a/hamcrest.spec b/hamcrest.spec index 5460a3d..ff21fcc 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -16,46 +16,31 @@ # -%bcond_with jmock -%bcond_with easymock +%bcond_with tests Name: hamcrest -Version: 1.3 +Version: 2.2 Release: 0 Summary: Library of matchers for building test expressions License: BSD-3-Clause Group: Development/Libraries/Java URL: https://github.com/hamcrest/JavaHamcrest -Source0: https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-%{version}.tar.gz -Source8: hamcrest-core-MANIFEST.MF -Source9: hamcrest-library-MANIFEST.MF -Source11: hamcrest-integration-MANIFEST.MF -Source12: hamcrest-generator-MANIFEST.MF -Patch0: %{name}-%{version}-build.patch -Patch1: %{name}-%{version}-no-jarjar.patch -Patch3: %{name}-%{version}-javadoc.patch -Patch4: %{name}-%{version}-qdox-2.0.patch -Patch5: %{name}-%{version}-fork-javac.patch -Patch6: %{name}-%{version}-javadoc9.patch -Patch7: %{name}-%{version}-javadoc10.patch -Patch8: %{name}-%{version}-random-build-crash.patch -Patch9: hamcrest-reproducible-builds.patch -Patch10: hamcrest-matchers.patch +Source0: %{name}-%{version}.tar.xz +Source1: %{name}-build.xml +Source2: https://repo1.maven.org/maven2/org/hamcrest/%{name}/%{version}/%{name}-%{version}.pom +Source3: https://raw.githubusercontent.com/hamcrest/JavaHamcrest/v2.2/LICENSE.txt +Source4: https://raw.githubusercontent.com/hamcrest/JavaHamcrest/v2.2/README.md +Patch0: 0001-Fix-build-with-OpenJDK-11.patch BuildRequires: ant BuildRequires: fdupes BuildRequires: java-devel >= 1.8 BuildRequires: javapackages-local -BuildRequires: qdox >= 2.0 -Requires: %{name}-core = %{version}-%{release} -Requires: qdox >= 2.0 +%if %{with tests} +BuildRequires: ant-junit +%endif +Provides: %{name}-core = %{version} +Obsoletes: %{name}-core < %{version} +Obsoletes: %{name}-demo < %{version} BuildArch: noarch -%if %{with jmock} -BuildRequires: jmock -Requires: jmock -%endif -%if %{with easymock} -BuildRequires: easymock -Requires: easymock -%endif %description Provides a library of matcher objects (also known as constraints or @@ -63,15 +48,6 @@ predicates) allowing 'match' rules to be defined declaratively, to be used in other frameworks. Typical scenarios include testing frameworks, mocking libraries and UI validation rules. -%package core -Summary: Core API of hamcrest matcher framework -Group: Development/Libraries/Java -Obsoletes: %{name} < %{version}-%{release} - -%description core -The core API of hamcrest matcher framework to be used by third-party framework providers. -This includes a foundation set of matcher implementations for common operations. - %package javadoc Summary: Javadoc for %{name} Group: Documentation/HTML @@ -79,115 +55,45 @@ Group: Documentation/HTML %description javadoc Javadoc for %{name}. -%package demo -Summary: Demo files for %{name} -Group: Development/Libraries/Java -Requires: %{name} = %{version}-%{release} -Requires: junit - -%description demo -Demo files for %{name}. - %prep -%setup -q -n JavaHamcrest-%{name}-java-%{version} +%setup -q -n %{name}-%{version} +cp %{SOURCE1} build.xml +cp %{SOURCE3} %{SOURCE4} . -find . -type f -name "*.jar" | xargs -t rm -ln -sf $(build-classpath qdox) lib/generator/ -%if %{with jmock} -ln -sf $(build-classpath jmock) lib/integration/ -%else -rm -fr hamcrest-integration/src/main/java/org/hamcrest/integration/JMock1Adapter.java -rm -fr hamcrest-integration/src/main/java/org/hamcrest/JMock1Matchers.java -rm -fr hamcrest-unit-test/src/main/java/org/hamcrest/integration/JMock1AdapterTest.java -%endif -%if %{with easymock} -ln -sf $(build-classpath easymock3) lib/integration/ -%else -rm -fr hamcrest-integration/src/main/java/org/hamcrest/integration/EasyMock2Adapter.java -rm -fr hamcrest-integration/src/main/java/org/hamcrest/EasyMock2Matchers.java -%endif - -%patch0 -p1 -%patch1 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 - -sed -i 's/\r//' LICENSE.txt +%patch0 -p2 %build -export CLASSPATH=$(build-classpath qdox) -ant -Dant.build.javac.source=1.8 -Dant.build.javac.target=1.8 -Dversion=%{version} -Dbuild.sysclasspath=last clean core generator library bigjar javadoc - -# inject OSGi manifests -jar ufm build/%{name}-core-%{version}.jar %{SOURCE8} -jar ufm build/%{name}-library-%{version}.jar %{SOURCE9} -jar ufm build/%{name}-integration-%{version}.jar %{SOURCE11} -jar ufm build/%{name}-generator-%{version}.jar %{SOURCE12} +%ant \ +%if %{without tests} + -Dtest.skip=true \ +%endif + jar javadoc %install -sed -i 's/@VERSION@/%{version}/g' pom/*.pom - # jars -install -d -m 755 %{buildroot}%{_javadir}/%{name} -install -d -m 755 %{buildroot}%{_mavenpomdir}/%{name} +install -dm 0755 %{buildroot}%{_javadir}/%{name} +install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar +ln -sf %{name}.jar %{buildroot}%{_javadir}/%{name}/all.jar +ln -sf %{name}.jar %{buildroot}%{_javadir}/%{name}/core.jar +ln -sf %{name}.jar %{buildroot}%{_javadir}/%{name}/library.jar -rm -f pom/%{name}-parent.pom -for i in pom/%{name}*.pom; do - %pom_remove_parent ${i} - %pom_xpath_inject "pom:project" " - org.hamcrest - %{version}" ${i} -done - -install -m 644 build/%{name}-core-%{version}.jar %{buildroot}%{_javadir}/%{name}/core.jar -install -m 644 pom/%{name}-core.pom %{buildroot}%{_mavenpomdir}/%{name}/core.pom -%add_maven_depmap %{name}/core.pom %{name}/core.jar -f core - -install -m 644 build/%{name}-all-%{version}.jar %{buildroot}%{_javadir}/%{name}/all.jar -install -m 644 pom/%{name}-all.pom %{buildroot}%{_mavenpomdir}/%{name}/all.pom -%add_maven_depmap %{name}/all.pom %{name}/all.jar - -install -m 644 build/%{name}-generator-%{version}.jar %{buildroot}%{_javadir}/%{name}/generator.jar -install -m 644 pom/%{name}-generator.pom %{buildroot}%{_mavenpomdir}/%{name}/generator.pom -%add_maven_depmap %{name}/generator.pom %{name}/generator.jar - -install -m 644 build/%{name}-integration-%{version}.jar %{buildroot}%{_javadir}/%{name}/integration.jar -install -m 644 pom/%{name}-integration.pom %{buildroot}%{_mavenpomdir}/%{name}/integration.pom -%add_maven_depmap %{name}/integration.pom %{name}/integration.jar - -install -m 644 build/%{name}-library-%{version}.jar %{buildroot}%{_javadir}/%{name}/library.jar -install -m 644 pom/%{name}-library.pom %{buildroot}%{_mavenpomdir}/%{name}/library.pom -%add_maven_depmap %{name}/library.pom %{name}/library.jar +# poms +install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name} +install -pm 0644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom +%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.jar -a "org.hamcrest:hamcrest-all,org.hamcrest:hamcrest-core,org.hamcrest:hamcrest-library" # javadoc -install -d -m 755 %{buildroot}%{_javadocdir}/%{name} -cp -pr build/temp/hamcrest-all-%{version}-javadoc.jar.contents/* %{buildroot}%{_javadocdir}/%{name} +install -dm 0755 %{buildroot}%{_javadocdir}/%{name} +cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %fdupes -s %{buildroot}%{_javadocdir} -# demo -install -d -m 755 %{buildroot}%{_datadir}/%{name} -cp -pr %{name}-examples %{buildroot}%{_datadir}/%{name}/ - %files -f .mfiles -%defattr(0644,root,root,0755) -%license LICENSE.txt - -%files core -f .mfiles-core -%defattr(0644,root,root,0755) +%{_javadir}/%{name} %license LICENSE.txt +%doc README.md %files javadoc -%defattr(0644,root,root,0755) +%license LICENSE.txt %{_javadocdir}/%{name} -%files demo -%defattr(0644,root,root,0755) -%{_datadir}/%{name} - %changelog