[EMAIL PROTECTED] wrote:

jsalvata 2004/01/22 16:38:14

Modified: src/protocol/http/org/apache/jmeter/protocol/http/control
AuthManager.java
Log:
Fixing really bad method name.
Revision Changes Path
1.7 +3 -3 jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
Index: AuthManager.java
===================================================================
RCS file: /home/cvs/jakarta-jmeter/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AuthManager.java 16 Aug 2003 17:22:51 -0000 1.6
+++ AuthManager.java 23 Jan 2004 00:38:14 -0000 1.7
@@ -188,7 +188,7 @@
public String getAuthHeaderForURL(URL url)
{
- if (isSupportedProtocol(url))
+ if (isUnsupportedProtocol(url))
{
return null;
}
@@ -333,7 +333,7 @@
return getAuthObjects().size();
}
- private boolean isSupportedProtocol(URL url)
+ private boolean isUnsupportedProtocol(URL url)
{
return !url.getProtocol().toUpperCase().equals("HTTP")
&& !url.getProtocol().toUpperCase().equals("HTTPS");


Wouldn't the code be easier to read if the method result was flipped so that the if condition becomes:

if (!isSupportedProtocol(url))

The method itself would probably be easier to read too.

Cheers,

Scott

--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to