cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1563186 - in /cxf/trunk: core/src/main/java/org/apache/cxf/common/util/ rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/ rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/
Date Fri, 31 Jan 2014 17:29:54 GMT
Author: sergeyb
Date: Fri Jan 31 17:29:54 2014
New Revision: 1563186

URL: http://svn.apache.org/r1563186
Log:
Renaming CompressionUtils method names

Modified:
    cxf/trunk/core/src/main/java/org/apache/cxf/common/util/CompressionUtils.java
    cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EncryptionUtils.java
    cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/DeflateEncoderDecoder.java

Modified: cxf/trunk/core/src/main/java/org/apache/cxf/common/util/CompressionUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/core/src/main/java/org/apache/cxf/common/util/CompressionUtils.java?rev=1563186&r1=1563185&r2=1563186&view=diff
==============================================================================
--- cxf/trunk/core/src/main/java/org/apache/cxf/common/util/CompressionUtils.java (original)
+++ cxf/trunk/core/src/main/java/org/apache/cxf/common/util/CompressionUtils.java Fri Jan
31 17:29:54 2014
@@ -29,11 +29,11 @@ public final class CompressionUtils {
     private CompressionUtils() {
         
     }
-    public static InputStream decompress(byte[] deflatedToken) 
+    public static InputStream inflate(byte[] deflatedToken) 
         throws DataFormatException {
-        return decompress(deflatedToken, true);
+        return inflate(deflatedToken, true);
     }
-    public static InputStream decompress(byte[] deflatedToken, boolean nowrap) 
+    public static InputStream inflate(byte[] deflatedToken, boolean nowrap) 
         throws DataFormatException {
         Inflater inflater = new Inflater(nowrap);
         inflater.setInput(deflatedToken);
@@ -67,11 +67,11 @@ public final class CompressionUtils {
         return is;
     }
     
-    public static byte[] compress(byte[] tokenBytes) {
-        return compress(tokenBytes, true);
+    public static byte[] deflate(byte[] tokenBytes) {
+        return deflate(tokenBytes, true);
     }
     
-    public static byte[] compress(byte[] tokenBytes, boolean nowrap) {
+    public static byte[] deflate(byte[] tokenBytes, boolean nowrap) {
         Deflater compresser = new Deflater(Deflater.DEFLATED, nowrap);
         
         compresser.setInput(tokenBytes);

Modified: cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EncryptionUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EncryptionUtils.java?rev=1563186&r1=1563185&r2=1563186&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EncryptionUtils.java
(original)
+++ cxf/trunk/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/EncryptionUtils.java
Fri Jan 31 17:29:54 2014
@@ -165,7 +165,7 @@ public final class EncryptionUtils {
                                       int mode)  throws EncryptionException {
         boolean compressionSupported = keyProps != null && keyProps.isCompressionSupported();
         if (compressionSupported && mode == Cipher.ENCRYPT_MODE) {
-            bytes = CompressionUtils.compress(bytes, false);
+            bytes = CompressionUtils.deflate(bytes, false);
         }
         try {
             Cipher c = Cipher.getInstance(secretKey.getAlgorithm());
@@ -199,7 +199,7 @@ public final class EncryptionUtils {
                 }
             }
             if (compressionSupported && mode == Cipher.DECRYPT_MODE) {
-                result = IOUtils.readBytesFromStream(CompressionUtils.decompress(result,
false));
+                result = IOUtils.readBytesFromStream(CompressionUtils.inflate(result, false));
             }
             return result;
         } catch (Exception ex) {

Modified: cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/DeflateEncoderDecoder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/DeflateEncoderDecoder.java?rev=1563186&r1=1563185&r2=1563186&view=diff
==============================================================================
--- cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/DeflateEncoderDecoder.java
(original)
+++ cxf/trunk/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/DeflateEncoderDecoder.java
Fri Jan 31 17:29:54 2014
@@ -26,10 +26,10 @@ import org.apache.cxf.common.util.Compre
 public class DeflateEncoderDecoder {
     public InputStream inflateToken(byte[] deflatedToken) 
         throws DataFormatException {
-        return CompressionUtils.decompress(deflatedToken);
+        return CompressionUtils.inflate(deflatedToken);
     }
     
     public byte[] deflateToken(byte[] tokenBytes) {
-        return CompressionUtils.compress(tokenBytes);
+        return CompressionUtils.deflate(tokenBytes);
     }
 }



Mime
View raw message