2023-09-24 03:49:42 +02:00
|
|
|
From b087582c8bbe88ac8fd3a59c129d4bd7953a720f Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
|
|
|
Date: Wed, 9 Feb 2022 14:37:18 -0700
|
|
|
|
Subject: [PATCH] Remove dependency on junit-addons
|
|
|
|
|
|
|
|
---
|
|
|
|
pom.xml | 6 ------
|
|
|
|
.../maven/reporting/AbstractMavenReportRenderer.java | 2 +-
|
|
|
|
.../reporting/AbstractMavenReportRendererTest.java | 10 ++--------
|
|
|
|
3 files changed, 3 insertions(+), 15 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/pom.xml b/pom.xml
|
|
|
|
index d46a817..6b6295c 100644
|
|
|
|
--- a/pom.xml
|
|
|
|
+++ b/pom.xml
|
|
|
|
@@ -151,12 +151,6 @@
|
|
|
|
<version>4.13.2</version>
|
2022-03-10 17:11:56 +01:00
|
|
|
<scope>test</scope>
|
|
|
|
</dependency>
|
|
|
|
- <dependency>
|
|
|
|
- <groupId>junit-addons</groupId>
|
|
|
|
- <artifactId>junit-addons</artifactId>
|
|
|
|
- <version>1.4</version>
|
|
|
|
- <scope>test</scope>
|
|
|
|
- </dependency>
|
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
<build>
|
2023-09-24 03:49:42 +02:00
|
|
|
diff --git a/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java b/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java
|
|
|
|
index 4c9a07c..4693e1d 100644
|
|
|
|
--- a/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java
|
|
|
|
+++ b/src/main/java/org/apache/maven/reporting/AbstractMavenReportRenderer.java
|
|
|
|
@@ -599,7 +599,7 @@ public abstract class AbstractMavenRepor
|
2022-03-10 17:11:56 +01:00
|
|
|
* @param text a text with or without the pattern <code>{text, url}</code>
|
|
|
|
* @return a map of text/href
|
|
|
|
*/
|
|
|
|
- private static List<String> applyPattern( String text )
|
|
|
|
+ static List<String> applyPattern( String text )
|
|
|
|
{
|
|
|
|
if ( StringUtils.isEmpty( text ) )
|
|
|
|
{
|
2023-09-24 03:49:42 +02:00
|
|
|
diff --git a/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java b/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java
|
|
|
|
index cdb9299..e8dce8f 100644
|
|
|
|
--- a/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java
|
|
|
|
+++ b/src/test/java/org/apache/maven/reporting/AbstractMavenReportRendererTest.java
|
|
|
|
@@ -24,7 +24,8 @@ import java.util.List;
|
2022-03-10 17:11:56 +01:00
|
|
|
|
|
|
|
import junit.framework.Assert;
|
|
|
|
import junit.framework.TestCase;
|
|
|
|
-import junitx.util.PrivateAccessor;
|
|
|
|
+
|
|
|
|
+import static org.apache.maven.reporting.AbstractMavenReportRenderer.applyPattern;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test case for some public method in AbstractMavenReportRenderer.
|
2023-09-24 03:49:42 +02:00
|
|
|
@@ -32,13 +33,6 @@ import junitx.util.PrivateAccessor;
|
2022-03-10 17:11:56 +01:00
|
|
|
public class AbstractMavenReportRendererTest
|
|
|
|
extends TestCase
|
|
|
|
{
|
|
|
|
- private static List<String> applyPattern( String pattern )
|
|
|
|
- throws Throwable
|
|
|
|
- {
|
|
|
|
- return (List<String>) PrivateAccessor.invoke( AbstractMavenReportRenderer.class, "applyPattern",
|
|
|
|
- new Class[] { String.class }, new Object[] { pattern } );
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private static void checkPattern( String pattern, String[] expectedResult ) throws Throwable
|
|
|
|
{
|
|
|
|
List<String> result = applyPattern( pattern );
|
2023-09-24 03:49:42 +02:00
|
|
|
--
|
|
|
|
2.34.1
|