Author: azeez
Date: Tue Sep 4 11:36:29 2012
New Revision: 1380569
URL: http://svn.apache.org/viewvc?rev=1380569&view=rev
Log:
Performance improvement. Avoid recalculating module archive name again & again
Modified:
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisModule.java
Modified:
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisModule.java
URL:
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisModule.java?rev=1380569&r1=1380568&r2=1380569&view=diff
==============================================================================
---
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisModule.java
(original)
+++
axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisModule.java
Tue Sep 4 11:36:29 2012
@@ -122,15 +122,24 @@ public class AxisModule implements Param
this.name = name;
}
+ private String archiveName;
+
/**
* Get the archive name of this module. The archive name is the combination
* of the module name and version (if available). In general it is equal
to the
* name of the module archive file without the suffix.
- *
+ *
* @return the archive name of the module
*/
public String getArchiveName() {
- return version == null ? name : (name + "-" + version);
+ if (archiveName == null){
+ if(version == null){
+ archiveName = name;
+ } else {
+ archiveName = name + "-" + version;
+ }
+ }
+ return archiveName;
}
/**