| |
@@ -1,17 +1,17 @@
|
| |
- From d0bc26194a0e432206d7f92cf0b6fbef67946cc4 Mon Sep 17 00:00:00 2001
|
| |
+ From ad1e669b96a5d251c36384e89d535b9c712a6246 Mon Sep 17 00:00:00 2001
|
| |
From: Marian Koncek <mkoncek@redhat.com>
|
| |
Date: Thu, 5 Sep 2019 15:21:04 +0200
|
| |
- Subject: [PATCH 4/6] Remove dependency on powermock
|
| |
+ Subject: [PATCH 3/3] Remove dependency on powermock
|
| |
|
| |
---
|
| |
- .../StringSearchModelInterpolatorTest.java | 66 -------------------
|
| |
- 1 file changed, 66 deletions(-)
|
| |
+ .../StringSearchModelInterpolatorTest.java | 59 -------------------
|
| |
+ 1 file changed, 59 deletions(-)
|
| |
|
| |
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
|
| |
- index c95e37271..aafafa52f 100644
|
| |
+ index b2612e540..20b7162e2 100644
|
| |
--- a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
|
| |
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/StringSearchModelInterpolatorTest.java
|
| |
- @@ -36,8 +36,6 @@
|
| |
+ @@ -35,8 +35,6 @@
|
| |
import static org.hamcrest.CoreMatchers.anyOf;
|
| |
import static org.hamcrest.CoreMatchers.is;
|
| |
import static org.junit.Assert.assertThat;
|
| |
@@ -20,77 +20,70 @@
|
| |
|
| |
/**
|
| |
* @author jdcasey
|
| |
- @@ -375,70 +373,6 @@ public void testInterpolateObjectWithPomFile()
|
| |
- ) ) );
|
| |
+ @@ -344,63 +342,6 @@ public void testInterpolateObjectWithPomFile() throws Exception {
|
| |
+ is(System.getProperty("user.dir") + File.separator + '.' + File.separator + "target"))));
|
| |
}
|
| |
|
| |
- - public void testNotInterpolateObjectWithFile()
|
| |
- - throws Exception
|
| |
- - {
|
| |
+ - public void testNotInterpolateObjectWithFile() throws Exception {
|
| |
- Model model = new Model();
|
| |
-
|
| |
- - File baseDir = new File( System.getProperty( "user.dir" ) );
|
| |
+ - File baseDir = new File(System.getProperty("user.dir"));
|
| |
-
|
| |
- Properties p = new Properties();
|
| |
-
|
| |
- - ObjectWithNotInterpolatedFile obj = new ObjectWithNotInterpolatedFile( baseDir );
|
| |
+ - ObjectWithNotInterpolatedFile obj = new ObjectWithNotInterpolatedFile(baseDir);
|
| |
-
|
| |
- StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
|
| |
-
|
| |
- - ModelBuildingRequest config = createModelBuildingRequest( p );
|
| |
+ - ModelBuildingRequest config = createModelBuildingRequest(p);
|
| |
-
|
| |
- SimpleProblemCollector collector = new SimpleProblemCollector();
|
| |
- - interpolator.interpolateObject( obj, model, new File( "." ), config, collector );
|
| |
- - assertProblemFree( collector );
|
| |
+ - interpolator.interpolateObject(obj, model, new File("."), config, collector);
|
| |
+ - assertProblemFree(collector);
|
| |
-
|
| |
- //noinspection unchecked
|
| |
- - Map<Class<?>, ?> cache =
|
| |
- - (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
|
| |
- - .get( null );
|
| |
+ - Map<Class<?>, ?> cache = (Map<Class<?>, ?>)
|
| |
+ - getField(StringSearchModelInterpolator.class, "CACHED_ENTRIES").get(null);
|
| |
-
|
| |
- - Object objCacheItem = cache.get( Object.class );
|
| |
- - Object fileCacheItem = cache.get( File.class );
|
| |
+ - Object objCacheItem = cache.get(Object.class);
|
| |
+ - Object fileCacheItem = cache.get(File.class);
|
| |
-
|
| |
- - assertNotNull( objCacheItem );
|
| |
- - assertNotNull( fileCacheItem );
|
| |
+ - assertNotNull(objCacheItem);
|
| |
+ - assertNotNull(fileCacheItem);
|
| |
-
|
| |
- - assertThat( ( (Object[]) getInternalState( objCacheItem, "fields" ) ).length, is( 0 ) );
|
| |
- - assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
|
| |
+ - assertThat(((Object[]) getInternalState(objCacheItem, "fields")).length, is(0));
|
| |
+ - assertThat(((Object[]) getInternalState(fileCacheItem, "fields")).length, is(0));
|
| |
- }
|
| |
-
|
| |
- - public void testNotInterpolateFile()
|
| |
- - throws Exception
|
| |
- - {
|
| |
+ - public void testNotInterpolateFile() throws Exception {
|
| |
- Model model = new Model();
|
| |
-
|
| |
- - File baseDir = new File( System.getProperty( "user.dir" ) );
|
| |
+ - File baseDir = new File(System.getProperty("user.dir"));
|
| |
-
|
| |
- Properties p = new Properties();
|
| |
-
|
| |
- StringSearchModelInterpolator interpolator = (StringSearchModelInterpolator) createInterpolator();
|
| |
-
|
| |
- - ModelBuildingRequest config = createModelBuildingRequest( p );
|
| |
+ - ModelBuildingRequest config = createModelBuildingRequest(p);
|
| |
-
|
| |
- SimpleProblemCollector collector = new SimpleProblemCollector();
|
| |
- - interpolator.interpolateObject( baseDir, model, new File( "." ), config, collector );
|
| |
- - assertProblemFree( collector );
|
| |
+ - interpolator.interpolateObject(baseDir, model, new File("."), config, collector);
|
| |
+ - assertProblemFree(collector);
|
| |
-
|
| |
- //noinspection unchecked
|
| |
- - Map<Class<?>, ?> cache =
|
| |
- - (Map<Class<?>, ?>) getField( StringSearchModelInterpolator.class, "CACHED_ENTRIES" )
|
| |
- - .get( null );
|
| |
+ - Map<Class<?>, ?> cache = (Map<Class<?>, ?>)
|
| |
+ - getField(StringSearchModelInterpolator.class, "CACHED_ENTRIES").get(null);
|
| |
-
|
| |
- - Object fileCacheItem = cache.get( File.class );
|
| |
+ - Object fileCacheItem = cache.get(File.class);
|
| |
-
|
| |
- - assertNotNull( fileCacheItem );
|
| |
+ - assertNotNull(fileCacheItem);
|
| |
-
|
| |
- - assertThat( ( (Object[]) getInternalState( fileCacheItem, "fields" ) ).length, is( 0 ) );
|
| |
+ - assertThat(((Object[]) getInternalState(fileCacheItem, "fields")).length, is(0));
|
| |
- }
|
| |
-
|
| |
- -
|
| |
- public void testConcurrentInterpolation()
|
| |
- throws Exception
|
| |
- {
|
| |
+ public void testConcurrentInterpolation() throws Exception {
|
| |
+ final Model model = new Model();
|
| |
+
|
| |
--
|
| |
- 2.35.1
|
| |
+ 2.39.2
|
| |
|
| |