cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [08/14] cxf git commit: Removing unnecessary type information
Date Fri, 10 Feb 2017 15:41:56 GMT
http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseQueryVisitor.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseQueryVisitor.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseQueryVisitor.java
index 453d609..29d9176 100644
--- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseQueryVisitor.java
+++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/hbase/HBaseQueryVisitor.java
@@ -48,7 +48,7 @@ public class HBaseQueryVisitor<T> extends AbstractSearchConditionVisitor<T, Filt
     public HBaseQueryVisitor(String family, Map<String, String> fieldsMap) {
         super(fieldsMap);
         this.family = family;
-        queryStack.push(new ArrayList<Filter>());
+        queryStack.push(new ArrayList<>());
     }
     public HBaseQueryVisitor(Map<String, String> familyMap) {
         this(familyMap, Collections.<String, String>emptyMap());
@@ -57,7 +57,7 @@ public class HBaseQueryVisitor<T> extends AbstractSearchConditionVisitor<T, Filt
                              Map<String, String> fieldsMap) {
         super(fieldsMap);
         this.familyMap = familyMap;
-        queryStack.push(new ArrayList<Filter>());
+        queryStack.push(new ArrayList<>());
     }
     
     public void visit(SearchCondition<T> sc) {
@@ -69,7 +69,7 @@ public class HBaseQueryVisitor<T> extends AbstractSearchConditionVisitor<T, Filt
                                          statement.getValue()));
             }
         } else {
-            queryStack.push(new ArrayList<Filter>());
+            queryStack.push(new ArrayList<>());
             for (SearchCondition<T> condition : sc.getSearchConditions()) {
                 condition.accept(this);
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
index 2b91de2..2fcacb5 100644
--- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
+++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/AbstractJPATypedQueryVisitor.java
@@ -101,7 +101,7 @@ public abstract class AbstractJPATypedQueryVisitor<T, T1, E>
         this.em = em;
         this.tClass = tClass;
         this.queryClass = toQueryClass(queryClass, tClass);
-        this.joinProperties = joinProps == null ? null : new HashSet<String>(joinProps);
+        this.joinProperties = joinProps == null ? null : new HashSet<>(joinProps);
     }
     
     @SuppressWarnings("unchecked")
@@ -118,12 +118,12 @@ public abstract class AbstractJPATypedQueryVisitor<T, T1, E>
             builder = em.getCriteriaBuilder();
             cq = builder.createQuery(queryClass);
             root = cq.from(tClass);
-            predStack.push(new ArrayList<Predicate>());
+            predStack.push(new ArrayList<>());
         }
         if (sc.getStatement() != null) {
             predStack.peek().add(buildPredicate(sc.getStatement()));
         } else {
-            predStack.push(new ArrayList<Predicate>());
+            predStack.push(new ArrayList<>());
             for (SearchCondition<T> condition : sc.getSearchConditions()) {
                 condition.accept(this);
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
index 2d02ddf..1f40312 100644
--- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
+++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
@@ -84,7 +84,7 @@ public class JPACriteriaQueryVisitor<T, E> extends AbstractJPATypedQueryVisitor<
     public CriteriaQuery<E> orderBy(List<SingularAttribute<T, ?>> attributes, boolean asc) {
         CriteriaBuilder cb = getCriteriaBuilder();
         
-        List<Order> orders = new ArrayList<Order>();
+        List<Order> orders = new ArrayList<>();
         for (SingularAttribute<T, ?> attribute : attributes) {
             Path<?> selection = getRoot().get(attribute);
             Order order = asc ? cb.asc(selection) : cb.desc(selection);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
index 6c6b64a..694ae1a 100644
--- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
+++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/lucene/LuceneQueryVisitor.java
@@ -115,7 +115,7 @@ public class LuceneQueryVisitor<T> extends AbstractSearchConditionVisitor<T, Que
      */
     public void reset() {
         state.set(new Stack<List<Query>>());
-        state.get().push(new ArrayList<Query>());        
+        state.get().push(new ArrayList<>());        
     }
     
     public void visit(SearchCondition<T> sc) {
@@ -130,7 +130,7 @@ public class LuceneQueryVisitor<T> extends AbstractSearchConditionVisitor<T, Que
                                          statement.getValue()));
             }
         } else {
-            state.get().push(new ArrayList<Query>());
+            state.get().push(new ArrayList<>());
             for (SearchCondition<T> condition : sc.getSearchConditions()) {
                 condition.accept(this);
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/visitor/AbstractSearchConditionVisitor.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/visitor/AbstractSearchConditionVisitor.java b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/visitor/AbstractSearchConditionVisitor.java
index d30b133..355794c 100644
--- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/visitor/AbstractSearchConditionVisitor.java
+++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/visitor/AbstractSearchConditionVisitor.java
@@ -65,7 +65,7 @@ public abstract class AbstractSearchConditionVisitor <T, E> implements SearchCon
     
     protected ClassValue getPrimitiveFieldClass(PrimitiveStatement ps, String name, Class<?> valueCls, 
                                                 Type type, Object value) {
-        return doGetPrimitiveFieldClass(ps, name, valueCls, type, value, new HashSet<String>());
+        return doGetPrimitiveFieldClass(ps, name, valueCls, type, value, new HashSet<>());
     }
     
     @SuppressWarnings("rawtypes")

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java
index cf87267..8ba5078 100644
--- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java
+++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/SearchContextImplTest.java
@@ -144,7 +144,7 @@ public class SearchContextImplTest extends Assert {
         SearchCondition<Book> sc = context.getCondition(Book.class);
         assertNotNull(sc);
         
-        List<Book> books = new ArrayList<Book>();
+        List<Book> books = new ArrayList<>();
         books.add(new Book("CXF is cool", 125L));
         books.add(new Book("CXF Rocks", 125L));
         
@@ -160,7 +160,7 @@ public class SearchContextImplTest extends Assert {
         SearchCondition<SearchBean> sc = context.getCondition(SearchBean.class);
         assertNotNull(sc);
         
-        List<SearchBean> beans = new ArrayList<SearchBean>();
+        List<SearchBean> beans = new ArrayList<>();
         SearchBean sb1 = new SearchBean();
         sb1.set("name", "CXF is cool");
         beans.add(sb1);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java b/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
index bbe2b4f..ed8568c 100644
--- a/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
+++ b/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
@@ -498,7 +498,7 @@ public class CrossOriginResourceSharingFilter implements ContainerRequestFilter,
         } else {
             splitPattern = FIELD_COMMA_PATTERN;
         }
-        List<String> results = new ArrayList<String>();
+        List<String> results = new ArrayList<>();
         if (values != null) {
             for (String value : values) {
                 String[] items = splitPattern.split(value);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JweJsonWriterInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JweJsonWriterInterceptor.java b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JweJsonWriterInterceptor.java
index 89ce053..a84ee58 100644
--- a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JweJsonWriterInterceptor.java
+++ b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JweJsonWriterInterceptor.java
@@ -79,7 +79,7 @@ public class JweJsonWriterInterceptor extends AbstractJweJsonWriterProvider impl
             // or per-recipient headers
             protectedHeaders.setKeyEncryptionAlgorithm(keyAlgos.get(0));
         } else {
-            perRecipientUnprotectedHeaders = new ArrayList<JweHeaders>();
+            perRecipientUnprotectedHeaders = new ArrayList<>();
             for (KeyAlgorithm keyAlgo : keyAlgos) {
                 JweHeaders headers = new JweHeaders();
                 headers.setKeyEncryptionAlgorithm(keyAlgo);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java
index dc99b7c..6e963c8 100644
--- a/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java
+++ b/rt/rs/security/jose-parent/jose-jaxrs/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/JwsJsonWriterInterceptor.java
@@ -59,8 +59,8 @@ public class JwsJsonWriterInterceptor extends AbstractJwsJsonWriterProvider impl
         List<JwsSignatureProvider> sigProviders = getInitializedSigProviders();
         OutputStream actualOs = ctx.getOutputStream();
         if (useJwsOutputStream) {
-            List<String> protectedHeaders = new ArrayList<String>(sigProviders.size());
-            List<JwsSignature> signatures = new ArrayList<JwsSignature>(sigProviders.size());
+            List<String> protectedHeaders = new ArrayList<>(sigProviders.size());
+            List<JwsSignature> signatures = new ArrayList<>(sigProviders.size());
             for (JwsSignatureProvider signer : sigProviders) {
                 JwsHeaders protectedHeader = prepareProtectedHeader(ctx, signer);
                 String encoded = Base64UrlUtility.encode(writer.toJson(protectedHeader));

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java
index 12741c8..7d1d2f9 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/JoseUtils.java
@@ -132,7 +132,7 @@ public final class JoseUtils {
         return headers.asMap().keySet().containsAll(critical);
     }
     private static boolean detectDoubleEntry(List<?> list) {
-        Set<Object> inputSet = new HashSet<Object>(list);
+        Set<Object> inputSet = new HashSet<>(list);
         return list.size() > inputSet.size();
     }
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
index ddc2225..1f3bad1 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/common/KeyManagementUtils.java
@@ -325,7 +325,7 @@ public final class KeyManagementUtils {
         return encodeX509CertificateChain(Arrays.asList(chain));
     }
     public static List<String> encodeX509CertificateChain(List<X509Certificate> chain) {
-        List<String> encodedChain = new ArrayList<String>(chain.size());
+        List<String> encodedChain = new ArrayList<>(chain.size());
         for (X509Certificate cert : chain) {
             try {
                 encodedChain.add(CryptoUtils.encodeCertificate(cert));
@@ -338,7 +338,7 @@ public final class KeyManagementUtils {
     }
     public static List<X509Certificate> toX509CertificateChain(List<String> base64EncodedChain) {
         if (base64EncodedChain != null) {
-            List<X509Certificate> certs = new ArrayList<X509Certificate>(base64EncodedChain.size());
+            List<X509Certificate> certs = new ArrayList<>(base64EncodedChain.size());
             for (String encodedCert : base64EncodedChain) {
                 try {
                     certs.add((X509Certificate)CryptoUtils.decodeCertificate(encodedCert));

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/AlgorithmUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/AlgorithmUtils.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/AlgorithmUtils.java
index d52054b..40f8126 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/AlgorithmUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwa/AlgorithmUtils.java
@@ -94,37 +94,37 @@ public final class AlgorithmUtils {
     public static final String ES_SHA_384_JAVA = "SHA384withECDSA";
     public static final String ES_SHA_512_JAVA = "SHA512withECDSA";
     
-    public static final Set<String> HMAC_SIGN_SET = new HashSet<String>(Arrays.asList(HMAC_SHA_256_ALGO,
+    public static final Set<String> HMAC_SIGN_SET = new HashSet<>(Arrays.asList(HMAC_SHA_256_ALGO,
                                                                                       HMAC_SHA_384_ALGO,
                                                                                       HMAC_SHA_512_ALGO));
-    public static final Set<String> RSA_SHA_SIGN_SET = new HashSet<String>(Arrays.asList(RS_SHA_256_ALGO,
+    public static final Set<String> RSA_SHA_SIGN_SET = new HashSet<>(Arrays.asList(RS_SHA_256_ALGO,
                                                                       RS_SHA_384_ALGO,
                                                                       RS_SHA_512_ALGO));
-    public static final Set<String> RSA_SHA_PS_SIGN_SET = new HashSet<String>(Arrays.asList(PS_SHA_256_ALGO,
+    public static final Set<String> RSA_SHA_PS_SIGN_SET = new HashSet<>(Arrays.asList(PS_SHA_256_ALGO,
                                         PS_SHA_384_ALGO,
                                         PS_SHA_512_ALGO));
-    public static final Set<String> EC_SHA_SIGN_SET = new HashSet<String>(Arrays.asList(ES_SHA_256_ALGO,
+    public static final Set<String> EC_SHA_SIGN_SET = new HashSet<>(Arrays.asList(ES_SHA_256_ALGO,
                                                                        ES_SHA_384_ALGO,
                                                                        ES_SHA_512_ALGO));
-    public static final Set<String> RSA_CEK_SET = new HashSet<String>(Arrays.asList(RSA_OAEP_ALGO,
+    public static final Set<String> RSA_CEK_SET = new HashSet<>(Arrays.asList(RSA_OAEP_ALGO,
                                                                                   RSA_OAEP_256_ALGO,
                                                                                   RSA1_5_ALGO));
-    public static final Set<String> AES_GCM_CEK_SET = new HashSet<String>(Arrays.asList(A128GCM_ALGO,
+    public static final Set<String> AES_GCM_CEK_SET = new HashSet<>(Arrays.asList(A128GCM_ALGO,
                                                                                       A192GCM_ALGO,
                                                                                       A256GCM_ALGO));
-    public static final Set<String> AES_GCM_KW_SET = new HashSet<String>(Arrays.asList(A128GCMKW_ALGO,
+    public static final Set<String> AES_GCM_KW_SET = new HashSet<>(Arrays.asList(A128GCMKW_ALGO,
                                                                                       A192GCMKW_ALGO,
                                                                                       A256GCMKW_ALGO));
-    public static final Set<String> AES_KW_SET = new HashSet<String>(Arrays.asList(A128KW_ALGO,
+    public static final Set<String> AES_KW_SET = new HashSet<>(Arrays.asList(A128KW_ALGO,
                                                                                    A192KW_ALGO,
                                                                                    A256KW_ALGO));
-    public static final Set<String> ACBC_HS_SET = new HashSet<String>(Arrays.asList(A128CBC_HS256_ALGO,
+    public static final Set<String> ACBC_HS_SET = new HashSet<>(Arrays.asList(A128CBC_HS256_ALGO,
                                         A192CBC_HS384_ALGO,
                                         A256CBC_HS512_ALGO));
-    public static final Set<String> PBES_HS_SET = new HashSet<String>(Arrays.asList(PBES2_HS256_A128KW_ALGO,
+    public static final Set<String> PBES_HS_SET = new HashSet<>(Arrays.asList(PBES2_HS256_A128KW_ALGO,
                                           PBES2_HS384_A192KW_ALGO,
                                           PBES2_HS512_A256KW_ALGO));
-    public static final Set<String> ECDH_ES_WRAP_SET = new HashSet<String>(Arrays.asList(ECDH_ES_A128KW_ALGO,
+    public static final Set<String> ECDH_ES_WRAP_SET = new HashSet<>(Arrays.asList(ECDH_ES_A128KW_ALGO,
                       ECDH_ES_A192KW_ALGO,
                       ECDH_ES_A256KW_ALGO));
     

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmWrapKeyEncryptionAlgorithm.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmWrapKeyEncryptionAlgorithm.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmWrapKeyEncryptionAlgorithm.java
index 6349b7d..94ab270 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmWrapKeyEncryptionAlgorithm.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesGcmWrapKeyEncryptionAlgorithm.java
@@ -31,7 +31,7 @@ import org.apache.cxf.rs.security.jose.jwa.KeyAlgorithm;
 import org.apache.cxf.rt.security.crypto.CryptoUtils;
 
 public class AesGcmWrapKeyEncryptionAlgorithm extends AbstractWrapKeyEncryptionAlgorithm {
-    private static final Set<String> SUPPORTED_ALGORITHMS = new HashSet<String>(
+    private static final Set<String> SUPPORTED_ALGORITHMS = new HashSet<>(
         Arrays.asList(KeyAlgorithm.A128GCMKW.getJwaName(),
                       KeyAlgorithm.A192GCMKW.getJwaName(),
                       KeyAlgorithm.A256GCMKW.getJwaName()));

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesWrapKeyEncryptionAlgorithm.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesWrapKeyEncryptionAlgorithm.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesWrapKeyEncryptionAlgorithm.java
index 3fe85e3..c07244f 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesWrapKeyEncryptionAlgorithm.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/AesWrapKeyEncryptionAlgorithm.java
@@ -28,7 +28,7 @@ import org.apache.cxf.rs.security.jose.jwa.KeyAlgorithm;
 import org.apache.cxf.rt.security.crypto.CryptoUtils;
 
 public class AesWrapKeyEncryptionAlgorithm extends AbstractWrapKeyEncryptionAlgorithm {
-    private static final Set<String> SUPPORTED_ALGORITHMS = new HashSet<String>(
+    private static final Set<String> SUPPORTED_ALGORITHMS = new HashSet<>(
         Arrays.asList(KeyAlgorithm.A128KW.getJwaName(),
                       KeyAlgorithm.A192KW.getJwaName(),
                       KeyAlgorithm.A256KW.getJwaName()));

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweJsonProducer.java
----------------------------------------------------------------------
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 4e8cf71..df20c6b 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
@@ -96,7 +96,7 @@ public class JweJsonProducer {
             unionHeaders.asMap().putAll(unprotectedHeader.asMap());
         }
         
-        List<JweJsonEncryptionEntry> entries = new ArrayList<JweJsonEncryptionEntry>(encryptors.size());
+        List<JweJsonEncryptionEntry> entries = new ArrayList<>(encryptors.size());
         Map<String, Object> jweJsonMap = new LinkedHashMap<String, Object>();
         byte[] cipherText = null;
         byte[] authTag = null;
@@ -179,7 +179,7 @@ public class JweJsonProducer {
         return new JweEncryptionInput(jsonHeaders, content, aad);
     }
     private String checkAndGetContentAlgorithm(List<JweEncryptionProvider> encryptors) {
-        Set<String> set = new HashSet<String>();
+        Set<String> set = new HashSet<>();
         for (JweEncryptionProvider encryptor : encryptors) {
             set.add(encryptor.getContentAlgorithm().getJwaName());
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java
index aa53f27..b31aaf1 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwe/JweUtils.java
@@ -472,7 +472,7 @@ public final class JweUtils {
         if (JoseConstants.HEADER_JSON_WEB_KEY.equals(props.get(JoseConstants.RSSEC_KEY_STORE_TYPE))) {
             List<JsonWebKey> jwks = JwkUtils.loadJsonWebKeys(m, props, KeyOperation.ENCRYPT);
             if (jwks != null) {
-                theEncProviders = new ArrayList<JweEncryptionProvider>(jwks.size());
+                theEncProviders = new ArrayList<>(jwks.size());
                 for (JsonWebKey jwk : jwks) {
                     theEncProviders.add(getDirectKeyJweEncryption(jwk));
                 }
@@ -494,7 +494,7 @@ public final class JweUtils {
         if (JoseConstants.HEADER_JSON_WEB_KEY.equals(props.get(JoseConstants.RSSEC_KEY_STORE_TYPE))) {
             List<JsonWebKey> jwks = JwkUtils.loadJsonWebKeys(m, props, KeyOperation.DECRYPT);
             if (jwks != null) {
-                theDecProviders = new ArrayList<JweDecryptionProvider>(jwks.size());
+                theDecProviders = new ArrayList<>(jwks.size());
                 for (JsonWebKey jwk : jwks) {
                     theDecProviders.add(getDirectKeyJweDecryption(jwk));
                 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java
index ddba544..e56d6fc 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JsonWebKey.java
@@ -102,7 +102,7 @@ public class JsonWebKey extends JsonMapObject {
     }
 
     public void setKeyOperation(List<KeyOperation> keyOperation) {
-        List<String> ops = new ArrayList<String>(keyOperation.size());
+        List<String> ops = new ArrayList<>(keyOperation.size());
         for (KeyOperation op : keyOperation) {
             ops.add(op.toString());
         }
@@ -114,7 +114,7 @@ public class JsonWebKey extends JsonMapObject {
         if (ops == null) {
             return null;
         }
-        List<KeyOperation> keyOps = new ArrayList<KeyOperation>(ops.size());
+        List<KeyOperation> keyOps = new ArrayList<>(ops.size());
         for (Object op : ops) {
             keyOps.add(KeyOperation.getKeyOperation(op.toString()));
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
index ffe3223..19676ff 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jwk/JwkUtils.java
@@ -325,7 +325,7 @@ public final class JwkUtils {
         String kids = KeyManagementUtils.getKeyId(m, props, JoseConstants.RSSEC_KEY_STORE_ALIASES, keyOper);
         if (kids != null) {
             String[] values = kids.split(",");
-            List<JsonWebKey> keys = new ArrayList<JsonWebKey>(values.length);
+            List<JsonWebKey> keys = new ArrayList<>(values.length);
             for (String value : values) {
                 keys.add(jwkSet.getKey(value));
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
index 4def701..875cc7f 100644
--- a/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
+++ b/rt/rs/security/jose-parent/jose/src/main/java/org/apache/cxf/rs/security/jose/jws/JwsUtils.java
@@ -275,7 +275,7 @@ public final class JwsUtils {
         if (JoseConstants.HEADER_JSON_WEB_KEY.equals(props.get(JoseConstants.RSSEC_KEY_STORE_TYPE))) {
             List<JsonWebKey> jwks = JwkUtils.loadJsonWebKeys(m, props, KeyOperation.SIGN);
             if (jwks != null) {
-                theSigProviders = new ArrayList<JwsSignatureProvider>(jwks.size());
+                theSigProviders = new ArrayList<>(jwks.size());
                 for (JsonWebKey jwk : jwks) {
                     theSigProviders.add(JwsUtils.getSignatureProvider(jwk));
                 }
@@ -298,7 +298,7 @@ public final class JwsUtils {
         if (JoseConstants.HEADER_JSON_WEB_KEY.equals(props.get(JoseConstants.RSSEC_KEY_STORE_TYPE))) {
             List<JsonWebKey> jwks = JwkUtils.loadJsonWebKeys(m, props, KeyOperation.VERIFY);
             if (jwks != null) {
-                theVerifiers = new ArrayList<JwsSignatureVerifier>(jwks.size());
+                theVerifiers = new ArrayList<>(jwks.size());
                 for (JsonWebKey jwk : jwks) {
                     theVerifiers.add(JwsUtils.getSignatureVerifier(jwk));
                 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactHeaderTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactHeaderTest.java b/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactHeaderTest.java
index 39c6d3c..4c4008b 100644
--- a/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactHeaderTest.java
+++ b/rt/rs/security/jose-parent/jose/src/test/java/org/apache/cxf/rs/security/jose/jws/JwsCompactHeaderTest.java
@@ -166,7 +166,7 @@ public class JwsCompactHeaderTest extends Assert {
         String criticalValue3 = "criticalValue3";
         JwsCompactProducer producer = new JwsCompactProducer(payload);
         producer.getJwsHeaders().setSignatureAlgorithm(SignatureAlgorithm.HS512);
-        List<String> criticalHeader = new ArrayList<String>();
+        List<String> criticalHeader = new ArrayList<>();
         criticalHeader.add(criticalParameter1);
         producer.getJwsHeaders().setCritical(criticalHeader);
         producer.signWith(new HmacJwsSignatureProvider(ENCODED_MAC_KEY, SignatureAlgorithm.HS256));
@@ -187,7 +187,7 @@ public class JwsCompactHeaderTest extends Assert {
         consumer = new JwsCompactConsumer(signedJws);
         assertTrue(consumer.validateCriticalHeaders());
     
-        criticalHeader = new ArrayList<String>();
+        criticalHeader = new ArrayList<>();
         criticalHeader.add(criticalParameter);
         criticalHeader.add(criticalParameter);
         producer = new JwsCompactProducer(payload);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/AbstractAuthFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/AbstractAuthFilter.java b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/AbstractAuthFilter.java
index c2f79cc..fa185c8 100644
--- a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/AbstractAuthFilter.java
+++ b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/AbstractAuthFilter.java
@@ -71,7 +71,7 @@ public class AbstractAuthFilter {
     
     private static final Set<String> ALLOWED_OAUTH_PARAMETERS;
     static {
-        ALLOWED_OAUTH_PARAMETERS = new HashSet<String>();
+        ALLOWED_OAUTH_PARAMETERS = new HashSet<>();
         ALLOWED_OAUTH_PARAMETERS.addAll(Arrays.asList(REQUIRED_PARAMETERS));
         ALLOWED_OAUTH_PARAMETERS.add(OAuth.OAUTH_VERSION);
         ALLOWED_OAUTH_PARAMETERS.add(OAuthConstants.OAUTH_CONSUMER_SECRET);
@@ -177,7 +177,7 @@ public class AbstractAuthFilter {
         }
 
         List<OAuthPermission> permissions = accessToken.getScopes();
-        List<OAuthPermission> matchingPermissions = new ArrayList<OAuthPermission>();
+        List<OAuthPermission> matchingPermissions = new ArrayList<>();
         
         for (OAuthPermission perm : permissions) {
             boolean uriOK = checkRequestURI(req, perm.getUris());

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthInfo.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthInfo.java b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthInfo.java
index 144dcc7..e6bfa6c 100644
--- a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthInfo.java
+++ b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthInfo.java
@@ -40,7 +40,7 @@ public class OAuthInfo {
     }
     
     public List<String> getRoles() {
-        List<String> authorities = new ArrayList<String>();
+        List<String> authorities = new ArrayList<>();
         for (OAuthPermission permission : permissions) {
             authorities.addAll(permission.getRoles());
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AuthorizationRequestHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AuthorizationRequestHandler.java b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AuthorizationRequestHandler.java
index e63cf7b..d26aa12 100644
--- a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AuthorizationRequestHandler.java
+++ b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/services/AuthorizationRequestHandler.java
@@ -104,7 +104,7 @@ public class AuthorizationRequestHandler {
                 SecurityContext sc = (SecurityContext)mc.get(SecurityContext.class.getName());
                 List<String> roleNames = Collections.emptyList();
                 if (sc instanceof LoginSecurityContext) {
-                    roleNames = new ArrayList<String>();
+                    roleNames = new ArrayList<>();
                     Set<Principal> roles = ((LoginSecurityContext)sc).getUserRoles();
                     for (Principal p : roles) {
                         roleNames.add(p.getName());
@@ -116,7 +116,7 @@ public class AuthorizationRequestHandler {
                 AuthorizationInput input = new AuthorizationInput();
                 input.setToken(token);
                  
-                Set<OAuthPermission> approvedScopesSet = new HashSet<OAuthPermission>();
+                Set<OAuthPermission> approvedScopesSet = new HashSet<>();
                 
                 List<OAuthPermission> originalScopes = token.getScopes(); 
                 for (OAuthPermission perm : originalScopes) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java
index aa8f820..355d085 100644
--- a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java
+++ b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java
@@ -189,7 +189,7 @@ public final class OAuthUtils {
     public static List<String> parseParamValue(String paramValue, String defaultValue) 
         throws IOException {
         
-        List<String> scopeList = new ArrayList<String>();
+        List<String> scopeList = new ArrayList<>();
 
         if (!StringUtils.isEmpty(paramValue)) {
             StringTokenizer tokenizer = new StringTokenizer(paramValue, " ");

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java b/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java
index 6d97d72..88d365c 100644
--- a/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java
+++ b/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrantHandler.java
@@ -136,7 +136,7 @@ public class Saml2BearerGrantHandler extends AbstractGrantHandler {
         if (sc instanceof SAMLSecurityContext) {
             SAMLSecurityContext jaxrsSc = (SAMLSecurityContext)sc;
             Set<Principal> rolesP = jaxrsSc.getUserRoles();
-            List<String> roles = new ArrayList<String>();
+            List<String> roles = new ArrayList<>();
             if (roles != null) {
                 for (Principal p : rolesP) {
                     roles.add(p.getName());

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
index 5cc3e6c..0f1dab1 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
@@ -114,7 +114,7 @@ public class OAuthRequestFilter extends AbstractAccessTokenValidator
         // Find the scopes which match the current request
         
         List<OAuthPermission> permissions = accessTokenV.getTokenScopes();
-        List<OAuthPermission> matchingPermissions = new ArrayList<OAuthPermission>();
+        List<OAuthPermission> matchingPermissions = new ArrayList<>();
         
         HttpServletRequest req = getMessageContext().getHttpServletRequest();
         for (OAuthPermission perm : permissions) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java
index 0164c10..00342ef 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java
@@ -50,7 +50,7 @@ public class OAuthScopesFilter implements ContainerRequestFilter {
     private static final Logger LOG = LogUtils.getL7dLogger(OAuthScopesFilter.class);
     private static final Set<String> SKIP_METHODS;
     static {
-        SKIP_METHODS = new HashSet<String>();
+        SKIP_METHODS = new HashSet<>();
         SKIP_METHODS.addAll(Arrays.asList(
             new String[] {"wait", "notify", "notifyAll", 
                           "equals", "toString", "hashCode"}));
@@ -60,7 +60,7 @@ public class OAuthScopesFilter implements ContainerRequestFilter {
     private MessageContext mc;
     private Map<String, List<String>> scopesMap = new HashMap<String, List<String>>();
     private Map<String, Boolean> scopesMatchAllMap = new HashMap<String, Boolean>();
-    private Set<String> confidentialClientMethods = new HashSet<String>();
+    private Set<String> confidentialClientMethods = new HashSet<>();
    
     public void setSecuredObject(Object object) {
         Class<?> cls = ClassHelper.getRealClass(object);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java
index 4d0155d..4916b11 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java
@@ -85,7 +85,7 @@ public class DefaultEHCacheCodeDataProvider extends DefaultEHCacheOAuthDataProvi
     public List<ServerAuthorizationCodeGrant> getCodeGrants(Client c, UserSubject sub) {
         List<String> keys = CastUtils.cast(codeGrantCache.getKeys());
         List<ServerAuthorizationCodeGrant> grants = 
-            new ArrayList<ServerAuthorizationCodeGrant>(keys.size());
+            new ArrayList<>(keys.size());
         for (String key : keys) {
             ServerAuthorizationCodeGrant grant = getCodeGrant(key);
             if (AbstractCodeDataProvider.isCodeMatched(grant, c, sub)) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEncryptingCodeDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEncryptingCodeDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEncryptingCodeDataProvider.java
index aa943dc..c8e54e4 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEncryptingCodeDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEncryptingCodeDataProvider.java
@@ -37,7 +37,7 @@ import org.apache.cxf.rt.security.crypto.KeyProperties;
 public class DefaultEncryptingCodeDataProvider extends DefaultEncryptingOAuthDataProvider 
     implements AuthorizationCodeDataProvider {
     private long grantLifetime;
-    private Set<String> grants = Collections.synchronizedSet(new HashSet<String>());
+    private Set<String> grants = Collections.synchronizedSet(new HashSet<>());
     public DefaultEncryptingCodeDataProvider(String algo, int keySize) {
         super(algo, keySize);
     }
@@ -69,7 +69,7 @@ public class DefaultEncryptingCodeDataProvider extends DefaultEncryptingOAuthDat
 
     public List<ServerAuthorizationCodeGrant> getCodeGrants(Client c, UserSubject sub) {
         List<ServerAuthorizationCodeGrant> list = 
-            new ArrayList<ServerAuthorizationCodeGrant>(grants.size());
+            new ArrayList<>(grants.size());
         for (String key : grants) {
             ServerAuthorizationCodeGrant grant = getCodeGrant(key);
             if (c == null || grant.getClient().getClientId().equals(c.getClientId())) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
index 00131bd..886c95d 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
@@ -247,7 +247,7 @@ public abstract class AbstractOAuthDataProvider implements OAuthDataProvider, Cl
         if (requestedScopes.isEmpty()) {
             return Collections.emptyList();
         } else {
-            List<OAuthPermission> list = new ArrayList<OAuthPermission>();
+            List<OAuthPermission> list = new ArrayList<>();
             for (String scope : requestedScopes) {
                 convertSingleScopeToPermission(client, scope, list);
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
index 0db66e9..9a41c5d 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
@@ -90,7 +90,7 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider {
     @Override
     public List<Client> getClients(UserSubject resourceOwner) {
         List<String> keys = CastUtils.cast(clientCache.getKeys());
-        List<Client> clients = new ArrayList<Client>(keys.size());
+        List<Client> clients = new ArrayList<>(keys.size());
         for (String key : keys) {
             Client c = getClient(key);
             if (isClientMatched(c, resourceOwner)) {
@@ -103,7 +103,7 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider {
     @Override
     public List<ServerAccessToken> getAccessTokens(Client c, UserSubject sub) {
         List<String> keys = CastUtils.cast(accessTokenCache.getKeys());
-        List<ServerAccessToken> tokens = new ArrayList<ServerAccessToken>(keys.size());
+        List<ServerAccessToken> tokens = new ArrayList<>(keys.size());
         for (String key : keys) {
             ServerAccessToken token = getAccessToken(key);
             if (isTokenMatched(token, c, sub)) {
@@ -116,7 +116,7 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider {
     @Override
     public List<RefreshToken> getRefreshTokens(Client c, UserSubject sub) {
         List<String> keys = CastUtils.cast(refreshTokenCache.getKeys());
-        List<RefreshToken> tokens = new ArrayList<RefreshToken>(keys.size());
+        List<RefreshToken> tokens = new ArrayList<>(keys.size());
         for (String key : keys) {
             RefreshToken token = getRefreshToken(key);
             if (isTokenMatched(token, c, sub)) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java
index 02d66d8..b223942 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEncryptingOAuthDataProvider.java
@@ -38,8 +38,8 @@ import org.apache.cxf.rt.security.crypto.KeyProperties;
 
 public class DefaultEncryptingOAuthDataProvider extends AbstractOAuthDataProvider {
     protected SecretKey key;
-    private Set<String> tokens = Collections.synchronizedSet(new HashSet<String>());
-    private Set<String> refreshTokens = Collections.synchronizedSet(new HashSet<String>());
+    private Set<String> tokens = Collections.synchronizedSet(new HashSet<>());
+    private Set<String> refreshTokens = Collections.synchronizedSet(new HashSet<>());
     private ConcurrentHashMap<String, String> clientsMap = new ConcurrentHashMap<String, String>();
     public DefaultEncryptingOAuthDataProvider(String algo, int keySize) {
         this(new KeyProperties(algo, keySize));
@@ -67,7 +67,7 @@ public class DefaultEncryptingOAuthDataProvider extends AbstractOAuthDataProvide
     }
     @Override
     public List<Client> getClients(UserSubject resourceOwner) {
-        List<Client> clients = new ArrayList<Client>(clientsMap.size());
+        List<Client> clients = new ArrayList<>(clientsMap.size());
         for (String clientKey : clientsMap.keySet()) {
             Client c = getClient(clientKey);
             if (isClientMatched(c, resourceOwner)) {
@@ -78,7 +78,7 @@ public class DefaultEncryptingOAuthDataProvider extends AbstractOAuthDataProvide
     }
     @Override
     public List<ServerAccessToken> getAccessTokens(Client c, UserSubject sub) {
-        List<ServerAccessToken> list = new ArrayList<ServerAccessToken>(tokens.size());
+        List<ServerAccessToken> list = new ArrayList<>(tokens.size());
         for (String tokenKey : tokens) {
             ServerAccessToken token = getAccessToken(tokenKey);
             if (isTokenMatched(token, c, sub)) {
@@ -89,7 +89,7 @@ public class DefaultEncryptingOAuthDataProvider extends AbstractOAuthDataProvide
     }
     @Override
     public List<RefreshToken> getRefreshTokens(Client c, UserSubject sub) {
-        List<RefreshToken> list = new ArrayList<RefreshToken>(refreshTokens.size());
+        List<RefreshToken> list = new ArrayList<>(refreshTokens.size());
         for (String tokenKey : refreshTokens) {
             RefreshToken token = getRefreshToken(tokenKey);
             if (isTokenMatched(token, c, sub)) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProvider.java
index 209088c..befd05f 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JPAOAuthDataProvider.java
@@ -233,13 +233,13 @@ public class JPAOAuthDataProvider extends AbstractOAuthDataProvider {
         // this can be the case when using multiple cmt dataProvider operation in a single entityManager
         // lifespan
         if (at.getAudiences() != null) {
-            at.setAudiences(new ArrayList<String>(at.getAudiences()));
+            at.setAudiences(new ArrayList<>(at.getAudiences()));
         }
         if (at.getExtraProperties() != null) {
             at.setExtraProperties(new HashMap<String, String>(at.getExtraProperties()));
         }
         if (at.getScopes() != null) {
-            at.setScopes(new ArrayList<OAuthPermission>(at.getScopes()));
+            at.setScopes(new ArrayList<>(at.getScopes()));
         }
         if (at.getParameters() != null) {
             at.setParameters(new HashMap<String, String>(at.getParameters()));

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
index bf59895..0a06f54 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java
@@ -45,7 +45,7 @@ public abstract class AbstractAccessTokenValidator {
     private static final String DEFAULT_AUTH_SCHEME = OAuthConstants.BEARER_AUTHORIZATION_SCHEME;
     
 
-    protected Set<String> supportedSchemes = new HashSet<String>();
+    protected Set<String> supportedSchemes = new HashSet<>();
     protected String realm;
     
     private MessageContext mc;

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
index ab2e88c..056623a 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
@@ -114,7 +114,7 @@ public final class OAuthUtils {
     public static UserSubject createSubject(SecurityContext securityContext) {
         List<String> roleNames = Collections.emptyList();
         if (securityContext instanceof LoginSecurityContext) {
-            roleNames = new ArrayList<String>();
+            roleNames = new ArrayList<>();
             Set<Principal> roles = ((LoginSecurityContext)securityContext).getUserRoles();
             for (Principal p : roles) {
                 roleNames.add(p.getName());

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java
index 80b09ec..06db50e 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/CodeGrantEncryptingDataProvider.java
@@ -32,7 +32,7 @@ import org.apache.cxf.rs.security.oauth2.provider.OAuthServiceException;
 public class CodeGrantEncryptingDataProvider extends EncryptingDataProvider
     implements AuthorizationCodeDataProvider {
 
-    private Set<String> grants = new HashSet<String>();
+    private Set<String> grants = new HashSet<>();
     
     public CodeGrantEncryptingDataProvider() throws Exception {
         super();

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java
index 36c353d..ecbd232 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/test/java/org/apache/cxf/rs/security/oauth2/utils/crypto/EncryptingDataProvider.java
@@ -43,7 +43,7 @@ public class EncryptingDataProvider implements OAuthDataProvider {
 
     SecretKey key;
     private Map<String, String> clients;
-    private Set<String> tokens = new HashSet<String>();
+    private Set<String> tokens = new HashSet<>();
     private Map<String, String> refreshTokens = new HashMap<String, String>();
     
     public EncryptingDataProvider() throws Exception {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcHybridService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcHybridService.java b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcHybridService.java
index 3667389..6ec545c 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcHybridService.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcHybridService.java
@@ -48,7 +48,7 @@ public class OidcHybridService extends OidcImplicitService {
     }
     
     private static Set<String> getResponseTypes(boolean hybridOnly) {
-        List<String> types = new ArrayList<String>(); 
+        List<String> types = new ArrayList<>(); 
         types.addAll(
             Arrays.asList(OidcUtils.CODE_AT_RESPONSE_TYPE, 
                           OidcUtils.CODE_ID_TOKEN_RESPONSE_TYPE, 
@@ -57,7 +57,7 @@ public class OidcHybridService extends OidcImplicitService {
             types.add(OidcUtils.ID_TOKEN_RESPONSE_TYPE);
             types.add(OidcUtils.ID_TOKEN_AT_RESPONSE_TYPE);
         }
-        return new HashSet<String>(types);
+        return new HashSet<>(types);
     }
     
     @Override

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
index 936f787..163f862 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcImplicitService.java
@@ -54,7 +54,7 @@ public class OidcImplicitService extends ImplicitGrantService {
     private IdTokenProvider idTokenProvider;
     
     public OidcImplicitService() {
-        super(new HashSet<String>(Arrays.asList(OidcUtils.ID_TOKEN_RESPONSE_TYPE,
+        super(new HashSet<>(Arrays.asList(OidcUtils.ID_TOKEN_RESPONSE_TYPE,
                                                 OidcUtils.ID_TOKEN_AT_RESPONSE_TYPE)));
     }
     protected OidcImplicitService(Set<String> supportedResponseTypes,

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
index b081bed..b67161c 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/MetadataWriter.java
@@ -203,7 +203,7 @@ public class MetadataWriter {
             throw new RuntimeException("Unsupported signature method: " + signingCert.getSigAlgName());
         }
 
-        List<Transform> transformList = new ArrayList<Transform>();
+        List<Transform> transformList = new ArrayList<>();
         transformList.add(XML_SIGNATURE_FACTORY.newTransform(Transform.ENVELOPED, (TransformParameterSpec)null));
         transformList.add(XML_SIGNATURE_FACTORY.newCanonicalizationMethod(CanonicalizationMethod.EXCLUSIVE,
                                                                           (C14NMethodParameterSpec)null));
@@ -228,7 +228,7 @@ public class MetadataWriter {
 
         // Create the KeyInfo containing the X509Data.
         KeyInfoFactory kif = XML_SIGNATURE_FACTORY.getKeyInfoFactory();
-        List<Object> x509Content = new ArrayList<Object>();
+        List<Object> x509Content = new ArrayList<>();
         x509Content.add(signingCert.getSubjectX500Principal().getName());
         x509Content.add(signingCert);
         X509Data xd = kif.newX509Data(x509Content);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java
index ed4e5e2..290c9e2 100644
--- a/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java
+++ b/rt/rs/security/sso/saml/src/test/java/org/apache/cxf/rs/security/saml/sso/SAMLSSOResponseValidatorTest.java
@@ -435,7 +435,7 @@ public class SAMLSSOResponseValidatorTest extends org.junit.Assert {
         subjectConfirmationData.setNotAfter(new DateTime().plusMinutes(5));
         subjectConfirmationData.setRecipient("http://recipient.apache.org");
 
-        List<String> values = new ArrayList<String>();
+        List<String> values = new ArrayList<>();
         values.add("http://unknown-service.apache.org");
         values.add("http://service.apache.org");
         
@@ -467,7 +467,7 @@ public class SAMLSSOResponseValidatorTest extends org.junit.Assert {
         subjectConfirmationData.setRecipient("http://recipient.apache.org");
 
         List<AudienceRestrictionBean> audienceRestrictions = 
-            new ArrayList<AudienceRestrictionBean>();
+            new ArrayList<>();
         
         AudienceRestrictionBean audienceRestriction = new AudienceRestrictionBean();
         audienceRestriction.setAudienceURIs(

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/claims/SAMLSecurityContext.java
----------------------------------------------------------------------
diff --git a/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/claims/SAMLSecurityContext.java b/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/claims/SAMLSecurityContext.java
index 97fee53..ded22db 100644
--- a/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/claims/SAMLSecurityContext.java
+++ b/rt/security-saml/src/main/java/org/apache/cxf/rt/security/saml/claims/SAMLSecurityContext.java
@@ -88,7 +88,7 @@ public class SAMLSecurityContext implements ClaimsSecurityContext {
         if (roles == null) {
             return Collections.emptySet();
         }
-        Set<Principal> retRoles = new HashSet<Principal>(roles);
+        Set<Principal> retRoles = new HashSet<>(roles);
         if (principal != null && retRoles.contains(principal)) {
             retRoles.remove(principal);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/claims/SAMLClaimsTest.java
----------------------------------------------------------------------
diff --git a/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/claims/SAMLClaimsTest.java b/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/claims/SAMLClaimsTest.java
index 3b66e12..54079ca 100644
--- a/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/claims/SAMLClaimsTest.java
+++ b/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/claims/SAMLClaimsTest.java
@@ -141,7 +141,7 @@ public class SAMLClaimsTest extends Assert {
         attributeBean2.addAttributeValue("smith");
         
         SamlCallbackHandler samlCallbackHandler = new SamlCallbackHandler();
-        List<AttributeBean> attributes = new ArrayList<AttributeBean>();
+        List<AttributeBean> attributes = new ArrayList<>();
         attributes.add(attributeBean);
         attributes.add(attributeBean2);
         samlCallbackHandler.setAttributes(attributes);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/RequestComponentBuilderTest.java
----------------------------------------------------------------------
diff --git a/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/RequestComponentBuilderTest.java b/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/RequestComponentBuilderTest.java
index 3a2bc3c..fc246e3 100644
--- a/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/RequestComponentBuilderTest.java
+++ b/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/RequestComponentBuilderTest.java
@@ -85,7 +85,7 @@ public class RequestComponentBuilderTest extends org.junit.Assert {
                     "admin-user@apache.org",
                     Collections.singletonList(subjectGroupAttributeValue)
             );
-        List<AttributeType> attributes = new ArrayList<AttributeType>();
+        List<AttributeType> attributes = new ArrayList<>();
         attributes.add(subjectIdAttribute);
         attributes.add(subjectGroupAttribute);
         SubjectType subject = RequestComponentBuilder.createSubjectType(attributes, null);
@@ -153,7 +153,7 @@ public class RequestComponentBuilderTest extends org.junit.Assert {
                     Collections.singletonList(subjectIdAttributeValue)
             );
         
-        List<AttributeType> attributes = new ArrayList<AttributeType>();
+        List<AttributeType> attributes = new ArrayList<>();
         attributes.add(subjectIdAttribute);
         SubjectType subject = RequestComponentBuilder.createSubjectType(attributes, null);
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/SamlRequestComponentBuilderTest.java
----------------------------------------------------------------------
diff --git a/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/SamlRequestComponentBuilderTest.java b/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/SamlRequestComponentBuilderTest.java
index 7d594dc..8634db5 100644
--- a/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/SamlRequestComponentBuilderTest.java
+++ b/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/SamlRequestComponentBuilderTest.java
@@ -89,7 +89,7 @@ public class SamlRequestComponentBuilderTest extends org.junit.Assert {
                     "admin-user@apache.org",
                     Collections.singletonList(subjectGroupAttributeValue)
             );
-        List<AttributeType> attributes = new ArrayList<AttributeType>();
+        List<AttributeType> attributes = new ArrayList<>();
         attributes.add(subjectIdAttribute);
         attributes.add(subjectGroupAttribute);
         SubjectType subject = RequestComponentBuilder.createSubjectType(attributes, null);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/XACMLAuthorizingInterceptorTest.java
----------------------------------------------------------------------
diff --git a/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/XACMLAuthorizingInterceptorTest.java b/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/XACMLAuthorizingInterceptorTest.java
index 7c6589c..4d2cd70 100644
--- a/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/XACMLAuthorizingInterceptorTest.java
+++ b/rt/security-saml/src/test/java/org/apache/cxf/rt/security/saml/xacml2/XACMLAuthorizingInterceptorTest.java
@@ -109,7 +109,7 @@ public class XACMLAuthorizingInterceptorTest extends org.junit.Assert {
 
             @Override
             public Set<Principal> getUserRoles() {
-                Set<Principal> principals = new HashSet<Principal>();
+                Set<Principal> principals = new HashSet<>();
                 principals.add(new Principal() {
                     public String getName() {
                         return role;

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
index 4b4b934..06dbfb2 100755
--- a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
+++ b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
@@ -738,7 +738,7 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit {
             for (Header header : headers) {
                 List<String> s = h.headerMap().get(header.getName());
                 if (s == null) {
-                    s = new ArrayList<String>(1);
+                    s = new ArrayList<>(1);
                     h.headerMap().put(header.getName(), s);
                 }
                 s.add(header.getValue());
@@ -921,7 +921,7 @@ public class AsyncHTTPConduit extends URLConnectionHTTPConduit {
     }
     
     private String[] findProtocols(String p, String[] options) {
-        List<String> list = new ArrayList<String>();
+        List<String> list = new ArrayList<>();
         for (String s : options) {
             if (s.equals(p)) {
                 return new String[] {p};

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHttpTransportFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHttpTransportFactory.java b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHttpTransportFactory.java
index 3e9ef6e..c6d650c 100644
--- a/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHttpTransportFactory.java
+++ b/rt/transports/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHttpTransportFactory.java
@@ -44,7 +44,7 @@ public class AsyncHttpTransportFactory extends AbstractTransportFactory implemen
     /**
      * This constant holds the prefixes served by this factory.
      */
-    private static final Set<String> URI_PREFIXES = new HashSet<String>();
+    private static final Set<String> URI_PREFIXES = new HashSet<>();
     
     static {
         URI_PREFIXES.add("hc://");
@@ -61,7 +61,7 @@ public class AsyncHttpTransportFactory extends AbstractTransportFactory implemen
      * @param ans The transport ids.
      */
     public void setActivationNamespaces(Collection<String> ans) {
-        setTransportIds(new ArrayList<String>(ans));
+        setTransportIds(new ArrayList<>(ans));
     }
     
     public Set<String> getUriPrefixes() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
index db3ab99..8bf4541 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngine.java
@@ -624,7 +624,7 @@ public class JettyHTTPServerEngine implements ServerEngine {
             httpConfig.setSendServerVersion(getSendServerVersion());
             HttpConnectionFactory httpFactory = new HttpConnectionFactory(httpConfig);
             
-            Collection<ConnectionFactory> connectionFactories = new ArrayList<ConnectionFactory>();
+            Collection<ConnectionFactory> connectionFactories = new ArrayList<>();
             
             result = new org.eclipse.jetty.server.ServerConnector(server);
             
@@ -657,7 +657,7 @@ public class JettyHTTPServerEngine implements ServerEngine {
         // remove it from the default excluded protocols
         boolean allowSSLv3 = "SSLv3".equals(proto);
         if (allowSSLv3 || !tlsServerParameters.getIncludeProtocols().isEmpty()) {
-            List<String> excludedProtocols = new ArrayList<String>();
+            List<String> excludedProtocols = new ArrayList<>();
             for (String excludedProtocol : scf.getExcludeProtocols()) {
                 if (!(tlsServerParameters.getIncludeProtocols().contains(excludedProtocol)
                     || (allowSSLv3 && ("SSLv3".equals(excludedProtocol) 

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
index fdf40d3..4688e75 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyHTTPServerEngineFactoryHolder.java
@@ -112,7 +112,7 @@ public class JettyHTTPServerEngineFactoryHolder {
             }
             //Engines
 
-            List<JettyHTTPServerEngine> engineList = new ArrayList<JettyHTTPServerEngine>();
+            List<JettyHTTPServerEngine> engineList = new ArrayList<>();
             for (JettyHTTPServerEngineConfigType engine : config.getEngine()) {
                 JettyHTTPServerEngine eng = new JettyHTTPServerEngine();
                 if (engine.getConnector() != null && connectorMap != null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
index fe4eac6..5f19365 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/blueprint/JettyServerEngineFactoryParser.java
@@ -93,7 +93,7 @@ public class JettyServerEngineFactoryParser extends AbstractBPBeanDefinitionPars
     
     protected Metadata parseEngineConnector(List<Element> engines, ComponentMetadata enclosingComponent,
                                             ParserContext context) {
-        List<MapEntry> entries = new ArrayList<MapEntry>();
+        List<MapEntry> entries = new ArrayList<>();
         for (Element engine : engines) {
             String port = engine.getAttribute("port");
             ValueMetadata keyValue = createValue(context, port);
@@ -112,7 +112,7 @@ public class JettyServerEngineFactoryParser extends AbstractBPBeanDefinitionPars
     
     protected Metadata parseEngineHandlers(List<Element> engines, ComponentMetadata enclosingComponent, 
                                            ParserContext context) {
-        List<MapEntry> entries = new ArrayList<MapEntry>();
+        List<MapEntry> entries = new ArrayList<>();
         for (Element engine : engines) {
             String port = engine.getAttribute("port");
             ValueMetadata keyValue = createValue(context, port);

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
index 2a1fda6..98dbb79 100644
--- a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
+++ b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettySpringTypesFactory.java
@@ -118,7 +118,7 @@ public final class JettySpringTypesFactory {
                                            QName name, 
                                            Class<?> c,
                                            JAXBContext context) throws JAXBException {
-        List<V> list = new ArrayList<V>();
+        List<V> list = new ArrayList<>();
         Node data = null;
            
         Unmarshaller u = context.createUnmarshaller();

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
index e10fb2a..a4cdcd6 100644
--- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
+++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPDestinationTest.java
@@ -503,7 +503,7 @@ public class JettyHTTPDestinationTest extends Assert {
             }
 
             public Set<String> getUriPrefixes() {
-                return new HashSet<String>(Collections.singletonList("http"));
+                return new HashSet<>(Collections.singletonList("http"));
             }
             
         };
@@ -741,7 +741,7 @@ public class JettyHTTPDestinationTest extends Assert {
         Map<String, List<String>> responseHeaders =
             CastUtils.cast((Map<?, ?>)outMsg.get(Message.PROTOCOL_HEADERS));
         assertNotNull("expected response headers", responseHeaders);
-        List<String> challenges = new ArrayList<String>();
+        List<String> challenges = new ArrayList<>();
         challenges.add(BASIC_CHALLENGE);
         challenges.add(DIGEST_CHALLENGE);
         challenges.add(CUSTOM_CHALLENGE);
@@ -828,7 +828,7 @@ public class JettyHTTPDestinationTest extends Assert {
                      3,
                      response.getAddFieldCallCount());
         Enumeration e = response.getFieldValues(CHALLENGE_HEADER);
-        List<String> challenges = new ArrayList<String>();
+        List<String> challenges = new ArrayList<>();
         while (e.hasMoreElements()) {
             challenges.add((String)e.nextElement());
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
index 257bc24..fee1e94 100644
--- a/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
+++ b/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
@@ -180,7 +180,7 @@ public class JettyHTTPServerEngineTest extends Assert {
         engine.setTlsServerParameters(new TLSServerParameters());
         engine.finalizeConfig();
 
-        List<JettyHTTPServerEngine> list = new ArrayList<JettyHTTPServerEngine>();
+        List<JettyHTTPServerEngine> list = new ArrayList<>();
         list.add(engine);
         factory.setEnginesList(list);
         engine = factory.createJettyHTTPServerEngine(PORT2, "https");
@@ -330,7 +330,7 @@ public class JettyHTTPServerEngineTest extends Assert {
         JettyHTTPServerEngine engine = new JettyHTTPServerEngine();
         engine.setPort(PORT2);
 
-        List<Handler> handlers = new ArrayList<Handler>();
+        List<Handler> handlers = new ArrayList<>();
         handlers.add(handler1);
         engine.setHandlers(handlers);
         engine.finalizeConfig();
@@ -430,11 +430,11 @@ public class JettyHTTPServerEngineTest extends Assert {
         HttpConfiguration httpConfig = new HttpConfiguration();
         httpConfig.addCustomizer(new org.eclipse.jetty.server.ForwardedRequestCustomizer());
         HttpConnectionFactory httpFactory = new HttpConnectionFactory(httpConfig);
-        Collection<ConnectionFactory> connectionFactories = new ArrayList<ConnectionFactory>();
+        Collection<ConnectionFactory> connectionFactories = new ArrayList<>();
         connectionFactories.add(httpFactory);
         connector.setConnectionFactories(connectionFactories);
         engine.setConnector(connector);
-        List<Handler> handlers = new ArrayList<Handler>();
+        List<Handler> handlers = new ArrayList<>();
         handlers.add(handler1);
         engine.setHandlers(handlers);
         engine.finalizeConfig();

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpTransportFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpTransportFactory.java b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpTransportFactory.java
index c47a7f6..f2d4f25 100644
--- a/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpTransportFactory.java
+++ b/rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpTransportFactory.java
@@ -45,7 +45,7 @@ public class NettyHttpTransportFactory extends AbstractTransportFactory implemen
     /**
      * This constant holds the prefixes served by this factory.
      */
-    private static final Set<String> URI_PREFIXES = new HashSet<String>();
+    private static final Set<String> URI_PREFIXES = new HashSet<>();
     
    
     
@@ -64,7 +64,7 @@ public class NettyHttpTransportFactory extends AbstractTransportFactory implemen
      * @param ans The transport ids.
      */
     public void setActivationNamespaces(Collection<String> ans) {
-        setTransportIds(new ArrayList<String>(ans));
+        setTransportIds(new ArrayList<>(ans));
     }
     
     public Set<String> getUriPrefixes() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/00503840/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java
index 3c241be..d6c0456 100644
--- a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java
+++ b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletHandler.java
@@ -71,7 +71,7 @@ public class NettyHttpServletHandler extends ChannelInboundHandlerAdapter {
             NettyInterceptor interceptor) {
 
         if (this.interceptors == null) {
-            this.interceptors = new ArrayList<NettyInterceptor>();
+            this.interceptors = new ArrayList<>();
         }
         this.interceptors.add(interceptor);
         return this;


Mime
View raw message