Accepting request 960733 from Java:packages

Fix NPE in test compilation

OBS-URL: https://build.opensuse.org/request/show/960733
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/maven-compiler-plugin?expand=0&rev=5
This commit is contained in:
Dominique Leuenberger 2022-03-10 21:45:29 +00:00 committed by Git OBS Bridge
commit db9dc035cf
4 changed files with 53 additions and 3 deletions

View File

@ -1,3 +1,12 @@
From fd5749e9b8d47cf350527c4831a4ee53cefc60aa Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Mon, 20 Jul 2020 22:51:52 +0100
Subject: [PATCH 1/2] plexus languages 1.0
---
.../java/org/apache/maven/plugin/compiler/CompilerMojo.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
index 8bc437b..326f9f9 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
@ -11,3 +20,6 @@ index 8bc437b..326f9f9 100644
/**
* Compiles application sources
--
2.26.2

View File

@ -0,0 +1,25 @@
From 8ef296b291e7ef1e1e4ab4fa4b520a80bde48a9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Hohwiller?= <hohwille@users.noreply.github.com>
Date: Tue, 17 Dec 2019 19:05:57 +0100
Subject: [PATCH 2/2] MCOMPILER-359: Fix for NPE
---
.../java/org/apache/maven/plugin/compiler/TestCompilerMojo.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
index f8b9ba1..203dd07 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
@@ -250,7 +250,7 @@ public class TestCompilerMojo
for ( Entry<String, Exception> pathException : result.getPathExceptions().entrySet() )
{
- Throwable cause = pathException.getValue().getCause();
+ Throwable cause = pathException.getValue();
while ( cause.getCause() != null )
{
cause = cause.getCause();
--
2.26.2

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Mar 10 11:31:51 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Modified patch:
* 00-plexus-languages-1.0.patch -> 0001-plexus-languages-1.0.patch
+ Sync with patch used by Fedora
- Added patch:
* 0002-MCOMPILER-359-Fix-for-NPE.patch
+ Fix null pointer exception in tests compilation
-------------------------------------------------------------------
Fri Nov 29 10:50:57 UTC 2019 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package maven-compiler-plugin
# spec file
#
# Copyright (c) 2019 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -32,7 +32,9 @@ URL: http://maven.apache.org/plugins/maven-compiler-plugin
Source0: http://archive.apache.org/dist/maven/plugins/%{base_name}-%{version}-source-release.zip
Source1: %{base_name}-build.xml
Patch0: %{base_name}-bootstrap-resources.patch
Patch1: 00-plexus-languages-1.0.patch
Patch1: 0001-plexus-languages-1.0.patch
Patch2: 0002-MCOMPILER-359-Fix-for-NPE.patch
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: maven-lib
@ -87,6 +89,7 @@ cp %{SOURCE1} build.xml
%patch0 -p1
%endif
%patch1 -p1
%patch2 -p1
%pom_remove_dep :::test