You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2005/10/22 16:02:37 UTC

svn commit: r327663 - /jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java

Author: sebb
Date: Sat Oct 22 07:02:29 2005
New Revision: 327663

URL: http://svn.apache.org/viewcvs?rev=327663&view=rev
Log:
Fix Class Cast Exception when fetching elements

Modified:
    jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java

Modified: jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
URL: http://svn.apache.org/viewcvs/jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java?rev=327663&r1=327662&r2=327663&view=diff
==============================================================================
--- jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java (original)
+++ jakarta/jmeter/branches/rel-2-1/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java Sat Oct 22 07:02:29 2005
@@ -129,7 +129,7 @@
 	 * Return the record at index i
 	 */
 	public Authorization get(int i) {
-		return (Authorization) getAuthObjects().get(i);
+		return (Authorization) getAuthObjects().get(i).getObjectValue();
 	}
 
 	public String getAuthHeaderForURL(URL url) {
@@ -216,7 +216,7 @@
 		PrintWriter writer = new PrintWriter(new FileWriter(file));
 		writer.println("# JMeter generated Authorization file");
 		for (int i = 0; i < getAuthObjects().size(); i++) {
-			Authorization auth = (Authorization) getAuthObjects().get(i);
+			Authorization auth = (Authorization) getAuthObjects().get(i).getObjectValue();
 			writer.println(auth.toString());
 		}
 		writer.flush();
@@ -268,7 +268,7 @@
 	/**
 	 * Return the number of records.
 	 */
-	public int size() {
+	public int getAuthCount() {
 		return getAuthObjects().size();
 	}
 



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org