cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <glen.ma...@verizon.net>
Subject Re: svn commit: r597547 - in /incubator/cxf/trunk: parent/ rt/core/src/main/java/org/apache/cxf/test/ rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/ systests/src/test/java/org/apache/cxf/systest/bus/ systests/src/test/java/org/...
Date Fri, 23 Nov 2007 12:15:45 GMT
Am Freitag, den 23.11.2007, 05:07 +0000 schrieb ningjiang@apache.org:
> Author: ningjiang
> Date: Thu Nov 22 21:07:40 2007
> New Revision: 597547
> 

> Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/test/TestUtilities.java
> URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/test/TestUtilities.java?rev=597547&r1=597546&r2=597547&view=diff
> ==============================================================================
> --- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/test/TestUtilities.java
(original)
> +++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/test/TestUtilities.java
Thu Nov 22 21:07:40 2007
> @@ -65,10 +65,12 @@
>  public class TestUtilities {
>      
>      private static final Charset UTF8 = Charset.forName("utf-8");
> -
> +    private static String keepAlive;
> +    
>      private static String basedirPath;
>      protected Bus bus;
>      protected Class<?> classpathAnchor;
> +    
>  
>      /**
>       * Namespaces for the XPath expressions.
> @@ -85,6 +87,19 @@
>       */
>      public TestUtilities(Class<?> classpathReference) {
>          classpathAnchor = classpathReference;
> +    }
> +    
> +    public static void setKeepAliveSystemProperty(boolean setAlive) {
> +        keepAlive = System.getProperty("http.keepAlive");
> +        System.setProperty("http.keepAlive", Boolean.toString(setAlive));
> +    }

Hmmm.  To reduce confusion, shouldn't the "keepAlive" instance variable
be named something like "previousKeepAlive" or "prevKeepAlive"?  It does
not appear to be storing the current value of the keepAlive property,
but its previous value.

Glen

> +    
> +    public static void recoverKeepAliveSystemProperty() {
> +        if (keepAlive != null) {
> +            System.setProperty("http.keepAlive", keepAlive);
> +        } else {
> +            System.clearProperty("http.keepAlive");
> +        }
>      }
>  
>      public void addDefaultNamespaces() {
> 



Mime
View raw message