!8 Fix build failure

From: @lei_ju
Reviewed-by: @rita_dong
Signed-off-by: @rita_dong
This commit is contained in:
openeuler-ci-bot 2020-09-12 18:55:50 +08:00 committed by Gitee
commit 0dd083f81e
2 changed files with 39 additions and 3 deletions

View File

@ -0,0 +1,32 @@
From 4dd332d8f82d3a5f0ac6654d2c1733e44da6ddbd Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Thu, 7 Feb 2019 14:57:25 +0000
Subject: [PATCH 3/3] Avoid use of internal Mockito API
---
.../compress/utils/FixedLengthBlockOutputStreamTest.java | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/test/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStreamTest.java b/src/test/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStreamTest.java
index cfda61b..e94ccee 100644
--- a/src/test/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStreamTest.java
+++ b/src/test/java/org/apache/commons/compress/utils/FixedLengthBlockOutputStreamTest.java
@@ -39,7 +39,6 @@ import java.nio.file.Path;
import java.util.concurrent.atomic.AtomicBoolean;
import org.hamcrest.core.IsInstanceOf;
import org.junit.Test;
-import org.mockito.internal.matchers.GreaterOrEqual;
public class FixedLengthBlockOutputStreamTest {
@@ -294,7 +293,6 @@ public class FixedLengthBlockOutputStreamTest {
private static void assertContainsAtOffset(String msg, byte[] expected, int offset,
byte[] actual) {
- assertThat(actual.length, new GreaterOrEqual<>(offset + expected.length));
for (int i = 0; i < expected.length; i++) {
assertEquals(String.format("%s ([%d])", msg, i), expected[i], actual[i + offset]);
}
--
2.20.1

View File

@ -1,6 +1,6 @@
Name: apache-commons-compress Name: apache-commons-compress
Version: 1.17 Version: 1.17
Release: 5 Release: 6
Summary: Java API for working with archivers and compressed files Summary: Java API for working with archivers and compressed files
License: ASL 2.0 License: ASL 2.0
URL: http://commons.apache.org/proper/commons-compress/ URL: http://commons.apache.org/proper/commons-compress/
@ -9,7 +9,8 @@ Source0: http://archive.apache.org/dist/commons/compress/source/commons-c
Patch0001: 0001-Remove-Brotli-compressor.patch Patch0001: 0001-Remove-Brotli-compressor.patch
Patch0002: 0002-Remove-ZSTD-compressor.patch Patch0002: 0002-Remove-ZSTD-compressor.patch
Patch0003: 0003-COMPRESS-463-throw-exception-when-detecting-a-trunca.patch Patch0003: 0003-COMPRESS-463-throw-exception-when-detecting-a-trunca.patch
Patch6000: CVE-2019-12402.patch Patch0004: 0004-Avoid-use-of-internal-Mockito-API.patch
Patch6000: CVE-2019-12402.patch
BuildRequires: maven-local mvn(junit:junit) mvn(org.apache.commons:commons-parent:pom:) BuildRequires: maven-local mvn(junit:junit) mvn(org.apache.commons:commons-parent:pom:)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) mvn(org.powermock:powermock-api-mockito) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) mvn(org.powermock:powermock-api-mockito)
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) mvn(org.osgi:org.osgi.core) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) mvn(org.osgi:org.osgi.core)
@ -44,7 +45,7 @@ rm src/test/java/org/apache/commons/compress/OsgiITest.java
%build %build
%mvn_file : commons-compress apache-commons-compress %mvn_file : commons-compress apache-commons-compress
%mvn_alias : commons: %mvn_alias : commons:
%mvn_build %mvn_build -- -Dcommons.osgi.symbolicName=org.apache.commons.compress
%install %install
%mvn_install %mvn_install
@ -55,6 +56,9 @@ rm src/test/java/org/apache/commons/compress/OsgiITest.java
%files help -f .mfiles-javadoc %files help -f .mfiles-javadoc
%changelog %changelog
* Sat Sep 12 2020 leiju <leiju4@huawei.com> - 1.17-4.h2
- Avoid use of internal Mockito API
* Thu Dec 26 2019 Senlin Xia <xiasenlin1@huawei.com> - 1.17-4.h1 * Thu Dec 26 2019 Senlin Xia <xiasenlin1@huawei.com> - 1.17-4.h1
- Type:cves - Type:cves
- ID:CVE-2019-12402 - ID:CVE-2019-12402