You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kr...@apache.org on 2012/08/23 20:55:46 UTC
svn commit: r1376648 -
/maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
Author: krosenvold
Date: Thu Aug 23 18:55:46 2012
New Revision: 1376648
URL: http://svn.apache.org/viewvc?rev=1376648&view=rev
Log:
o Removed unused methods/params
Modified:
maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
Modified: maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java?rev=1376648&r1=1376647&r2=1376648&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java (original)
+++ maven/maven-3/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java Thu Aug 23 18:55:46 2012
@@ -51,7 +51,7 @@ public class StringSearchModelInterpolat
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 StringSearchModelInterpolat
}
else if ( cacheEntry.isQualifiedForInterpolation )
{
- cacheEntry.interpolate( target, problems, this );
+ cacheEntry.interpolate( target, this );
traverseObjectWithParents( cls.getSuperclass(), target );
}
@@ -170,26 +170,6 @@ public class StringSearchModelInterpolat
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 StringSearchModelInterpolat
return false;
}
+ //noinspection SimplifiableIfStatement
if ( fieldType.isPrimitive() )
{
return false;
@@ -279,12 +260,11 @@ public class StringSearchModelInterpolat
}
- 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 StringSearchModelInterpolat
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 StringSearchModelInterpolat
{
entry.setValue( interpolated );
}
- catch ( UnsupportedOperationException e )
+ catch ( UnsupportedOperationException ignore )
{
- continue;
}
}
}