hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1412485 - in /httpcomponents/httpcore/trunk: httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/ httpcore/src/main/java/org/apache/http/impl/pool/ httpcore/src/main/java/org/apache/http/util/
Date Thu, 22 Nov 2012 10:23:30 GMT
Author: olegk
Date: Thu Nov 22 10:23:28 2012
New Revision: 1412485

URL: http://svn.apache.org/viewvc?rev=1412485&view=rev
Log:
Fixed javadoc warnings; tweak #getUserAgent method to avoid the use of deprecated API

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/VersionInfo.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java?rev=1412485&r1=1412484&r2=1412485&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/pool/BasicNIOConnPool.java
Thu Nov 22 10:23:28 2012
@@ -64,8 +64,7 @@ public class BasicNIOConnPool extends Ab
     private final int connectTimeout;
 
     /**
-     * @deprecated (4.3) use {@link BasicNIOConnPool#BasicNIOConnPool(ConnectingIOReactor,
-     *   NIOConnFactory, ConnectionConfig)}
+     * @deprecated (4.3) use {@link BasicNIOConnPool#BasicNIOConnPool(ConnectingIOReactor,
NIOConnFactory, int)}
      */
     @Deprecated
     public BasicNIOConnPool(

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java?rev=1412485&r1=1412484&r2=1412485&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/pool/BasicConnFactory.java
Thu Nov 22 10:23:28 2012
@@ -67,7 +67,7 @@ public class BasicConnFactory implements
 
     /**
      * @deprecated (4.3) use
-     *   {@link BasicConnFactory#BasicConnFactory(SSLSocketFactory, SocketConfig, ConnectionConfig)}.
+     *   {@link BasicConnFactory#BasicConnFactory(SSLSocketFactory, int, SocketConfig, ConnectionConfig)}.
      */
     @Deprecated
     public BasicConnFactory(final SSLSocketFactory sslfactory, final HttpParams params) {
@@ -81,7 +81,7 @@ public class BasicConnFactory implements
 
     /**
      * @deprecated (4.3) use
-     *   {@link BasicConnFactory#BasicConnFactory(SocketConfig, ConnectionConfig)}.
+     *   {@link BasicConnFactory#BasicConnFactory(int, SocketConfig, ConnectionConfig)}.
      */
     @Deprecated
     public BasicConnFactory(final HttpParams params) {

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/VersionInfo.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/VersionInfo.java?rev=1412485&r1=1412484&r2=1412485&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/VersionInfo.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/util/VersionInfo.java
Thu Nov 22 10:23:28 2012
@@ -34,10 +34,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
-import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpProtocolParams;
-
-
 /**
  * Provides access to version information for HTTP components.
  * Static methods are used to extract version information from property
@@ -301,23 +297,19 @@ public class VersionInfo {
 	 * For example: 
 	 * <pre>"Apache-HttpClient/4.3 (Java 1.5 minimum; Java/1.6.0_35)"</pre>
 	 * 
-	 * TODO This needs adjusting to account for the deprecated types {@link HttpParams} and
{@link HttpProtocolParams}.
-	 * 
-	 * @param params
-	 *            the HTTP parameters where the user agent will be set
-	 * @name the component name, like "Apache-HttpClient".
+	 * @param name the component name, like "Apache-HttpClient".
 	 * @param pkg
 	 *            the package for which to load version information, for example "org.apache.http".
The package name
 	 *            should NOT end with a dot.
 	 * @param cls
 	 *            the class' class loader to load from, or <code>null</code> for
the thread context class loader
 	 */
-	public static void setUserAgent(HttpParams params, String name, String pkg, Class<?>
cls) {
+	public static String getUserAgent(String name, String pkg, Class<?> cls) {
 		// determine the release version from packaged version info
 		final VersionInfo vi = VersionInfo.loadVersionInfo(pkg, cls.getClassLoader());
 		final String release = (vi != null) ? vi.getRelease() : VersionInfo.UNAVAILABLE;
 		final String javaVersion = System.getProperty("java.version");
-		HttpProtocolParams.setUserAgent(params, name + "/" + release + " (Java 1.5 minimum; Java/"
+ javaVersion + ")");
+		return name + "/" + release + " (Java 1.5 minimum; Java/" + javaVersion + ")";
 	}
 
 } // class VersionInfo



Mime
View raw message