axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r371969 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java
Date Tue, 24 Jan 2006 18:15:30 GMT
Author: sanka
Date: Tue Jan 24 10:15:21 2006
New Revision: 371969

URL: http://svn.apache.org/viewcvs?rev=371969&view=rev
Log:
Fixed: minor error in PolicyIncluge.getEffectivePolicy(..)

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java?rev=371969&r1=371968&r2=371969&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/PolicyInclude.java
Tue Jan 24 10:15:21 2006
@@ -69,7 +69,9 @@
 	
 	private ArrayList wrapperElements = new ArrayList();
 
-	private boolean useCache = false;
+	private boolean useCacheP = false;
+	
+	private boolean useCacheE = false;
 
 	public PolicyInclude() {
 		reg = new PolicyRegistry();
@@ -143,6 +145,8 @@
 					: (Policy) result.merge(p, reg);
 		}
 		setPolicy(result);
+		useCacheP(true);
+		
 		calculateEffectivePolicy();
 	}
 
@@ -163,20 +167,21 @@
 			result = getPolicy();
 		}
 		setEffectivePolicy(result);
-		useCache(true);		
+		useCacheE(true);		
 	}
 	
 	public Policy getPolicy() {
 		
-		if (! useCache) {
+		if (! useCacheP) {
 			calculatePolicy();
+			useCacheP(true);
 		}
 		return policy;
 	}
 
 	public Policy getEffectivePolicy() {
 		
-		if (! useCache) {
+		if (! useCacheE) {
 			calculateEffectivePolicy();			
 		}
 		return effectivePolicy;
@@ -247,8 +252,17 @@
 		useCache(false);
 	}
 	
+	private void useCacheP(boolean useCache) {
+		this.useCacheP = useCache;
+	}
+	
+	private void useCacheE(boolean useCacheE) {
+		this.useCacheE = useCacheE;
+	}
+	
 	private void useCache(boolean useCache) {
-		this.useCache = useCache;
+		this.useCacheP = useCache;
+		this.useCacheE = useCache;
 	}
 	
 	class Wrapper {



Mime
View raw message