o Optimized code

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@900019 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-01-16 20:20:00 +00:00
parent fa2b09bc0a
commit 5a51823501
1 changed files with 6 additions and 10 deletions

View File

@ -308,26 +308,22 @@ public class StringSearchModelInterpolator
private boolean isQualifiedForInterpolation( Class<?> cls )
{
return !cls.getPackage().getName().startsWith( "java" );
return !cls.getName().startsWith( "java" );
}
private boolean isQualifiedForInterpolation( Field field, Class<?> fieldType )
{
if ( !fieldIsPrimitiveByClass.containsKey( fieldType ) )
Boolean primitive = fieldIsPrimitiveByClass.get( fieldType );
if ( primitive == null )
{
fieldIsPrimitiveByClass.put( fieldType, Boolean.valueOf( fieldType.isPrimitive() ) );
primitive = Boolean.valueOf( fieldType.isPrimitive() );
fieldIsPrimitiveByClass.put( fieldType, primitive );
}
if ( fieldIsPrimitiveByClass.get( fieldType ).booleanValue() )
if ( primitive.booleanValue() )
{
return false;
}
// if ( fieldType.isPrimitive() )
// {
// return false;
// }
if ( "parent".equals( field.getName() ) )
{
return false;