diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java index 9707c94e91..712508da49 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java @@ -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;