hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1787544 - /httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/CredSspScheme.java
Date Sat, 18 Mar 2017 11:04:31 GMT
Author: kwright
Date: Sat Mar 18 11:04:31 2017
New Revision: 1787544

URL: http://svn.apache.org/viewvc?rev=1787544&view=rev
Log:
CONNECTORS-1834: Use static byte array for failure case.

Modified:
    httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/CredSspScheme.java

Modified: httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/CredSspScheme.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/CredSspScheme.java?rev=1787544&r1=1787543&r2=1787544&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/CredSspScheme.java
(original)
+++ httpcomponents/httpclient/branches/4.5.x/httpclient/src/main/java/org/apache/http/impl/auth/CredSspScheme.java
Sat Mar 18 11:04:31 2017
@@ -563,11 +563,12 @@ public class CredSspScheme extends AuthS
         }
     }
 
+    private final static byte[] EMPTYBUFFER = new byte[0];
 
     private byte[] encodeUnicode( final String string )
     {
         if (string == null) {
-            return new byte[0];
+            return EMPTYBUFFER;
         }
         return string.getBytes( UNICODE_LITTLE_UNMARKED );
     }



Mime
View raw message