You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2020/01/03 17:38:35 UTC

[cxf] 05/06: CXF-8185 - Tidy up

This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit e78553f7e32c36f9ec3c489b71ac1291139bb07e
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Jan 3 15:52:26 2020 +0000

    CXF-8185 - Tidy up
    
    (cherry picked from commit cac05c69de21d6c46668442d52c0d7096eab129f)
---
 .../java/org/apache/cxf/attachment/AttachmentDeserializer.java |  3 ++-
 .../org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java   | 10 +++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java b/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java
index 97a6e86..d3f9895 100644
--- a/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java
+++ b/core/src/main/java/org/apache/cxf/attachment/AttachmentDeserializer.java
@@ -269,7 +269,8 @@ public class AttachmentDeserializer {
      * @param boundary
      * @throws IOException
      */
-    private static boolean readTillFirstBoundary(PushbackInputStream pushbackInStream, byte[] boundary) throws IOException {
+    private static boolean readTillFirstBoundary(PushbackInputStream pushbackInStream,
+        byte[] boundary) throws IOException {
 
         // work around a bug in PushBackInputStream where the buffer isn't
         // initialized
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java
index f3dde4e..0bae587 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java
@@ -128,19 +128,19 @@ public class JweJsonProducer {
                 input.setContentEncryptionRequired(false);
             }
             JweEncryptionOutput state = encryptor.getEncryptionOutput(input);
-            
+
             if (state.getHeaders() != null && state.getHeaders().asMap().size() != jsonHeaders.asMap().size()) {
                 // New headers were generated during encryption for recipient
-                Map<String, Object> newHeaders = new LinkedHashMap<String, Object>();
+                Map<String, Object> newHeaders = new LinkedHashMap<>();
                 state.getHeaders().asMap().forEach((name, value) -> {
                     if (!unionHeaders.containsHeader(name)) {
                         // store recipient header
                         newHeaders.put(name, value);
                     }
                 });
-                Map<String, Object> perRecipientUnprotectedHeaders = (perRecipientUnprotected != null) 
-                    ? new LinkedHashMap<String, Object>(perRecipientUnprotected.asMap()) 
-                        : new LinkedHashMap<String, Object>();
+                Map<String, Object> perRecipientUnprotectedHeaders = (perRecipientUnprotected != null)
+                    ? new LinkedHashMap<>(perRecipientUnprotected.asMap())
+                        : new LinkedHashMap<>();
                 perRecipientUnprotectedHeaders.putAll(newHeaders);
                 perRecipientUnprotected = new JweHeaders(perRecipientUnprotectedHeaders);
             }