You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2006/10/03 12:02:41 UTC
svn commit: r452387 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
Author: chinthaka
Date: Tue Oct 3 03:02:41 2006
New Revision: 452387
URL: http://svn.apache.org/viewvc?view=rev&rev=452387
Log:
Excellent bit of code which we were using for some time. See we call the get method, check for null then again call the get method inside the if.
Improved this a bit not to use the getter method and directly access the variable itself as the call is within the class. I know this is not correct as far as encapsulation is concerned, but this improves the performance.
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java?view=diff&rev=452387&r1=452386&r2=452387
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java Tue Oct 3 03:02:41 2006
@@ -417,19 +417,16 @@
* @return Parameter <code>Parameter</code>
*/
public Parameter getParameter(String key) {
- if (getAxisOperation() != null) {
- AxisOperation opDesc = getAxisOperation();
- return opDesc.getParameter(key);
+ if (axisOperation != null) {
+ return axisOperation.getParameter(key);
}
- if (getAxisService() != null) {
- AxisService axisService = getAxisService();
+ if (axisService != null) {
return axisService.getParameter(key);
}
- if (getAxisServiceGroup() != null) {
- AxisServiceGroup axisServiceDesc = getAxisServiceGroup();
- return axisServiceDesc.getParameter(key);
+ if (axisServiceGroup != null) {
+ return axisServiceGroup.getParameter(key);
}
if (configurationContext != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org