mirror of https://github.com/apache/maven.git
o Removed unused methods/params
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1376648 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
100bbd031b
commit
b6c679a127
|
@ -51,7 +51,7 @@ public class StringSearchModelInterpolator
|
|||
|
||||
private static final Map<Class<?>, InterpolateObjectAction.CacheItem> cachedEntries =
|
||||
new ConcurrentHashMap<Class<?>, InterpolateObjectAction.CacheItem>( 80, 0.75f, 2 );
|
||||
// Empirical data from 3.x, actual =40
|
||||
// Empirical data from 3.x, actual =40
|
||||
|
||||
|
||||
public Model interpolateModel( Model model, File projectDir, ModelBuildingRequest config,
|
||||
|
@ -152,7 +152,7 @@ public class StringSearchModelInterpolator
|
|||
}
|
||||
else if ( cacheEntry.isQualifiedForInterpolation )
|
||||
{
|
||||
cacheEntry.interpolate( target, problems, this );
|
||||
cacheEntry.interpolate( target, this );
|
||||
|
||||
traverseObjectWithParents( cls.getSuperclass(), target );
|
||||
}
|
||||
|
@ -170,26 +170,6 @@ public class StringSearchModelInterpolator
|
|||
return cacheItem;
|
||||
}
|
||||
|
||||
private boolean isQualifiedForInterpolation( Class<?> cls )
|
||||
{
|
||||
return !cls.getName().startsWith( "java" );
|
||||
}
|
||||
|
||||
private boolean isQualifiedForInterpolation( Field field, Class<?> fieldType )
|
||||
{
|
||||
if ( Map.class.equals( fieldType ) && "locations".equals( field.getName() ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( fieldType.isPrimitive() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return !"parent".equals( field.getName() );
|
||||
}
|
||||
|
||||
private static void evaluateArray( Object target, InterpolateObjectAction ctx )
|
||||
{
|
||||
int len = Array.getLength( target );
|
||||
|
@ -235,6 +215,7 @@ public class StringSearchModelInterpolator
|
|||
return false;
|
||||
}
|
||||
|
||||
//noinspection SimplifiableIfStatement
|
||||
if ( fieldType.isPrimitive() )
|
||||
{
|
||||
return false;
|
||||
|
@ -279,12 +260,11 @@ public class StringSearchModelInterpolator
|
|||
|
||||
}
|
||||
|
||||
public void interpolate( Object target, ModelProblemCollector problems,
|
||||
InterpolateObjectAction interpolateObjectAction )
|
||||
public void interpolate( Object target, InterpolateObjectAction interpolateObjectAction )
|
||||
{
|
||||
for ( CacheField field : fields )
|
||||
{
|
||||
field.interpolate( target, problems, interpolateObjectAction );
|
||||
field.interpolate( target, interpolateObjectAction );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,8 +283,7 @@ public class StringSearchModelInterpolator
|
|||
this.field = field;
|
||||
}
|
||||
|
||||
void interpolate( Object target, ModelProblemCollector problems,
|
||||
InterpolateObjectAction interpolateObjectAction )
|
||||
void interpolate( Object target, InterpolateObjectAction interpolateObjectAction )
|
||||
{
|
||||
synchronized ( field )
|
||||
{
|
||||
|
@ -470,9 +449,8 @@ public class StringSearchModelInterpolator
|
|||
{
|
||||
entry.setValue( interpolated );
|
||||
}
|
||||
catch ( UnsupportedOperationException e )
|
||||
catch ( UnsupportedOperationException ignore )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue