mirror of https://github.com/apache/maven.git
getKey() is used many-many-many times when loading projects. it's ineffective to construct the key each time.
Ideally the cached key would get reste when groupId or artifactId gets set, I didn't figure how to do it in modello though.. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@650427 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
007fe63a03
commit
02367233e1
|
@ -3008,12 +3008,18 @@
|
|||
return executionMap;
|
||||
}
|
||||
|
||||
//TODO we shall reset key variable when groupId/artifactId change
|
||||
private String key = null;
|
||||
/**
|
||||
* @return the key of the plugin, ie <code>groupId:artifactId</code>
|
||||
*/
|
||||
public String getKey()
|
||||
{
|
||||
return constructKey( groupId, artifactId );
|
||||
if ( key == null )
|
||||
{
|
||||
key = constructKey( groupId, artifactId );
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue