[bvalid-codewatch] SF.net SVN: bvalid: [48] trunk
Status: Beta
Brought to you by:
cwilper
|
From: <cw...@us...> - 2006-12-22 21:20:54
|
Revision: 48
http://svn.sourceforge.net/bvalid/?rev=48&view=rev
Author: cwilper
Date: 2006-12-22 13:20:55 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
upgraded to commons-httpclient-3.1-beta1,
and upgraded relevent calls to non-deprecated ones.
Modified Paths:
--------------
trunk/build.properties
trunk/build.xml
trunk/src/java/net/sf/bvalid/util/WebClient.java
Added Paths:
-----------
trunk/lib/commons-codec-1.3.jar
trunk/lib/commons-httpclient-3.1-beta1.jar
Removed Paths:
-------------
trunk/lib/commons-httpclient-2.0.1.jar
Modified: trunk/build.properties
===================================================================
--- trunk/build.properties 2006-12-22 21:00:52 UTC (rev 47)
+++ trunk/build.properties 2006-12-22 21:20:55 UTC (rev 48)
@@ -12,7 +12,8 @@
#
# Various Apache projects/sub-projects
-lib.httpclient = lib/commons-httpclient-2.0.1.jar
+lib.httpclient = lib/commons-httpclient-3.1-beta1.jar
+lib.codec = lib/commons-codec-1.3.jar
lib.logging = lib/commons-logging.jar
lib.log4j = lib/log4j-1.2.14.jar
lib.xerces = lib/xercesImpl.jar
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2006-12-22 21:00:52 UTC (rev 47)
+++ trunk/build.xml 2006-12-22 21:20:55 UTC (rev 48)
@@ -11,6 +11,7 @@
<pathelement location="${lib.xerces}"/>
<pathelement location="${lib.log4j}"/>
<pathelement location="${lib.httpclient}"/>
+ <pathelement location="${lib.codec}"/>
<pathelement location="${lib.logging}"/>
</path>
<path id="test.path">
@@ -34,7 +35,9 @@
classpathref="compile.path"
source="${source}"
target="${target}"
- optimize="${optimize}" debug="${debug}"/>
+ optimize="${optimize}" debug="${debug}">
+ <compilerarg line="-Xlint:deprecation"/>
+ </javac>
<copy file="src/java/net/sf/bvalid/BValid.properties" tofile="build/classes/net/sf/bvalid/BValid.properties"/>
<propertyfile file="build/version.properties">
<entry key="buildDate" type="date" value="now"/>
Added: trunk/lib/commons-codec-1.3.jar
===================================================================
(Binary files differ)
Property changes on: trunk/lib/commons-codec-1.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/lib/commons-httpclient-2.0.1.jar
===================================================================
(Binary files differ)
Added: trunk/lib/commons-httpclient-3.1-beta1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/lib/commons-httpclient-3.1-beta1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/java/net/sf/bvalid/util/WebClient.java
===================================================================
--- trunk/src/java/net/sf/bvalid/util/WebClient.java 2006-12-22 21:00:52 UTC (rev 47)
+++ trunk/src/java/net/sf/bvalid/util/WebClient.java 2006-12-22 21:20:55 UTC (rev 48)
@@ -6,6 +6,7 @@
import java.util.*;
import java.util.regex.*;
+import org.apache.commons.httpclient.auth.AuthScope;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
@@ -71,14 +72,14 @@
}
}
- _cManager.setMaxConnectionsPerHost(MAX_CONNECTIONS_PER_HOST);
- _cManager.setMaxTotalConnections(MAX_TOTAL_CONNECTIONS);
+ _cManager.getParams().setDefaultMaxConnectionsPerHost(MAX_CONNECTIONS_PER_HOST);
+ _cManager.getParams().setMaxTotalConnections(MAX_TOTAL_CONNECTIONS);
+ _cManager.getParams().setConnectionTimeout(TIMEOUT_SECONDS * 1000);
+ _cManager.getParams().setSoTimeout(SOCKET_TIMEOUT_SECONDS * 1000);
HttpClient client = new HttpClient(_cManager);
- client.setConnectionTimeout(TIMEOUT_SECONDS * 1000);
- client.setTimeout(SOCKET_TIMEOUT_SECONDS * 1000);
if (host != null && creds != null) {
- client.getState().setCredentials(null, host, creds);
- client.getState().setAuthenticationPreemptive(true);
+ client.getState().setCredentials(new AuthScope(host, AuthScope.ANY_PORT), creds);
+ client.getParams().setAuthenticationPreemptive(true);
}
return client;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|