Port to hamcrest 2.1
This commit is contained in:
parent
b4e277cfb0
commit
193f8f38c3
79
0002-Port-to-hamcrest-2.1.patch
Normal file
79
0002-Port-to-hamcrest-2.1.patch
Normal file
@ -0,0 +1,79 @@
|
||||
From 613f27fe7ff4a89c21689a16f6f6b9b3e0b7c347 Mon Sep 17 00:00:00 2001
|
||||
From: Marian Koncek <mkoncek@redhat.com>
|
||||
Date: Thu, 29 Aug 2019 15:04:46 +0200
|
||||
Subject: [PATCH] Port to hamcrest 2.1
|
||||
|
||||
---
|
||||
.../shared/utils/reflection/ReflectorTest.java | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java b/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java
|
||||
index 0088361..09f6048 100644
|
||||
--- a/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java
|
||||
+++ b/src/test/java/org/apache/maven/shared/utils/reflection/ReflectorTest.java
|
||||
@@ -50,7 +50,7 @@ public class ReflectorTest
|
||||
public void newInstanceClassNull()
|
||||
throws Exception
|
||||
{
|
||||
- assertThat( reflector.newInstance( Object.class, null ), is( Object.class ) );
|
||||
+ assertThat( reflector.newInstance( Object.class, null ), isA( Object.class ) );
|
||||
}
|
||||
|
||||
@Test( expected = NullPointerException.class )
|
||||
@@ -64,7 +64,7 @@ public class ReflectorTest
|
||||
public void newInstanceClassEmptyArray()
|
||||
throws Exception
|
||||
{
|
||||
- assertThat( reflector.newInstance( Object.class, new Object[0] ), is( Object.class ) );
|
||||
+ assertThat( reflector.newInstance( Object.class, new Object[0] ), isA( Object.class ) );
|
||||
}
|
||||
|
||||
@Test( expected = ReflectorException.class )
|
||||
@@ -156,7 +156,7 @@ public class ReflectorTest
|
||||
public void getSingletonClassNull()
|
||||
throws Exception
|
||||
{
|
||||
- assertThat( reflector.getSingleton( (Class<?>)Object.class, (Object)null ), is( Object.class ) );
|
||||
+ assertThat( reflector.getSingleton( (Class<?>)Object.class, (Object)null ), isA( Object.class ) );
|
||||
}
|
||||
|
||||
@Test( expected = NullPointerException.class )
|
||||
@@ -170,7 +170,7 @@ public class ReflectorTest
|
||||
public void getSingletonClassEmptyArray()
|
||||
throws Exception
|
||||
{
|
||||
- assertThat( reflector.getSingleton( Object.class, new Object[0] ), is( Object.class ) );
|
||||
+ assertThat( reflector.getSingleton( Object.class, new Object[0] ), isA( Object.class ) );
|
||||
}
|
||||
|
||||
@Test( expected = ReflectorException.class )
|
||||
@@ -787,7 +787,7 @@ public class ReflectorTest
|
||||
public void invokeStaticClassNullNull()
|
||||
throws Exception
|
||||
{
|
||||
- assertThat( reflector.invokeStatic( Object.class, (String)null, (Object)null ), is( Object.class ) );
|
||||
+ assertThat( reflector.invokeStatic( Object.class, (String)null, (Object)null ), isA( Object.class ) );
|
||||
}
|
||||
|
||||
@Test( expected = NullPointerException.class )
|
||||
@@ -801,7 +801,7 @@ public class ReflectorTest
|
||||
public void invokeStaticClassNullEmptyArray()
|
||||
throws Exception
|
||||
{
|
||||
- assertThat( reflector.invokeStatic( Object.class, null, new Object[0] ), is( Object.class ) );
|
||||
+ assertThat( reflector.invokeStatic( Object.class, null, new Object[0] ), isA( Object.class ) );
|
||||
}
|
||||
|
||||
@Test( expected = NullPointerException.class )
|
||||
@@ -829,7 +829,7 @@ public class ReflectorTest
|
||||
public void invokeStaticClassEmptyEmptyArray()
|
||||
throws Exception
|
||||
{
|
||||
- assertThat( reflector.invokeStatic( Object.class, "", new Object[0] ), is( Object.class ) );
|
||||
+ assertThat( reflector.invokeStatic( Object.class, "", new Object[0] ), isA( Object.class ) );
|
||||
}
|
||||
|
||||
@Test( expected = IllegalArgumentException.class )
|
||||
--
|
||||
2.21.0
|
||||
|
||||
@ -8,7 +8,9 @@ BuildArch: noarch
|
||||
|
||||
Source0: http://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
||||
# XXX temporary for maven upgrade
|
||||
Patch0: 0001-Restore-compatibility-with-current-maven.patch
|
||||
Patch1: 0001-Restore-compatibility-with-current-maven.patch
|
||||
|
||||
Patch2: 0002-Port-to-hamcrest-2.1.patch
|
||||
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: mvn(com.google.code.findbugs:jsr305)
|
||||
@ -35,7 +37,8 @@ a lot of unused code.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%pom_remove_plugin org.codehaus.mojo:findbugs-maven-plugin
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user