You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2018/10/25 08:59:46 UTC

svn commit: r1844816 - in /santuario/xml-security-java/trunk/src: main/java/org/apache/xml/security/stax/impl/ main/java/org/apache/xml/security/stax/impl/processor/input/ main/java/org/apache/xml/security/stax/impl/securityToken/ main/java/org/apache/...

Author: coheigea
Date: Thu Oct 25 08:59:46 2018
New Revision: 1844816

URL: http://svn.apache.org/viewvc?rev=1844816&view=rev
Log:
More cleanup of the diamond operator

Modified:
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractSecurityToken.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/CanonicalizerBase.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ElementProxy.java
    santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java
    santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceTimingTest.java

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java?rev=1844816&r1=1844815&r2=1844816&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/DocumentContextImpl.java Thu Oct 25 08:59:46 2018
@@ -31,7 +31,7 @@ public class DocumentContextImpl impleme
 
     private String encoding;
     private String baseURI;
-    private final Map<Integer, XMLSecurityConstants.ContentType> contentTypeMap = new TreeMap<Integer, XMLSecurityConstants.ContentType>();
+    private final Map<Integer, XMLSecurityConstants.ContentType> contentTypeMap = new TreeMap<>();
     private final Map<Object, Integer> processorToIndexMap = new HashMap<>();
 
     @Override

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java?rev=1844816&r1=1844815&r2=1844816&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/processor/input/AbstractSignatureReferenceVerifyInputProcessor.java Thu Oct 25 08:59:46 2018
@@ -88,8 +88,8 @@ public abstract class AbstractSignatureR
                     "secureProcessing.MaximumAllowedReferencesPerManifest",
                     new Object[] {referencesTypeList.size(), maximumAllowedReferencesPerManifest});
         }
-        sameDocumentReferences = new ArrayList<KeyValue<ResourceResolver, ReferenceType>>(referencesTypeList.size());
-        externalReferences = new ArrayList<KeyValue<ResourceResolver, ReferenceType>>(referencesTypeList.size());
+        sameDocumentReferences = new ArrayList<>(referencesTypeList.size());
+        externalReferences = new ArrayList<>(referencesTypeList.size());
         processedReferences = new ArrayList<>(referencesTypeList.size());
 
         Iterator<ReferenceType> referenceTypeIterator = referencesTypeList.iterator();

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractSecurityToken.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractSecurityToken.java?rev=1844816&r1=1844815&r2=1844816&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractSecurityToken.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/securityToken/AbstractSecurityToken.java Thu Oct 25 08:59:46 2018
@@ -43,7 +43,7 @@ public abstract class AbstractSecurityTo
     private boolean asymmetric = false;
     private String sha1Identifier;
 
-    protected final Map<String, Key> keyTable = new HashMap<String, Key>();
+    protected final Map<String, Key> keyTable = new HashMap<>();
     protected final List<SecurityTokenConstants.TokenUsage> tokenUsages = new ArrayList<>();
 
     public AbstractSecurityToken(String id) {

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java?rev=1844816&r1=1844815&r2=1844816&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/stax/XMLSecNamespaceImpl.java Thu Oct 25 08:59:46 2018
@@ -68,7 +68,7 @@ public class XMLSecNamespaceImpl extends
                 return xmlSecNamespace;
             }
         } else {
-            nsMap = new WeakHashMap<String, XMLSecNamespace>();
+            nsMap = new WeakHashMap<>();
             XMLSecNamespace xmlSecNamespace = new XMLSecNamespaceImpl(prefixToUse, uriToUse);
             nsMap.put(uriToUse, xmlSecNamespace);
             xmlSecNamespaceMap.put(prefixToUse, nsMap);

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/CanonicalizerBase.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/CanonicalizerBase.java?rev=1844816&r1=1844815&r2=1844816&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/CanonicalizerBase.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/stax/impl/transformer/canonicalizer/CanonicalizerBase.java Thu Oct 25 08:59:46 2018
@@ -63,7 +63,7 @@ public abstract class CanonicalizerBase
         NODE_AFTER_DOCUMENT_ELEMENT
     }
 
-    private static final Map<String, byte[]> cache = new WeakHashMap<String, byte[]>();
+    private static final Map<String, byte[]> cache = new WeakHashMap<>();
     private final C14NStack<XMLSecEvent> outputStack = new C14NStack<>();
     private boolean includeComments = false;
     private DocumentLevel currentDocumentLevel = DocumentLevel.NODE_BEFORE_DOCUMENT_ELEMENT;

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ElementProxy.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ElementProxy.java?rev=1844816&r1=1844815&r2=1844816&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ElementProxy.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/utils/ElementProxy.java Thu Oct 25 08:59:46 2018
@@ -51,7 +51,7 @@ public abstract class ElementProxy {
     private Document wrappedDoc;
 
     /** Field prefixMappings */
-    private static Map<String, String> prefixMappings = new ConcurrentHashMap<String, String>();
+    private static Map<String, String> prefixMappings = new ConcurrentHashMap<>();
 
     /**
      * Constructor ElementProxy

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java?rev=1844816&r1=1844815&r2=1844816&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceMemoryTest.java Thu Oct 25 08:59:46 2018
@@ -35,8 +35,8 @@ public class PerformanceMemoryTest exten
     private static final int xmlResizeFactor = 1000;
 
     //junit creates for every test method a new class instance so we need a static list
-    private static Map<Integer, File> signedFiles = new TreeMap<Integer, File>();
-    private static Map<Integer, File> encryptedFiles = new TreeMap<Integer, File>();
+    private static Map<Integer, File> signedFiles = new TreeMap<>();
+    private static Map<Integer, File> encryptedFiles = new TreeMap<>();
 
 
     @Override

Modified: santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceTimingTest.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceTimingTest.java?rev=1844816&r1=1844815&r2=1844816&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceTimingTest.java (original)
+++ santuario/xml-security-java/trunk/src/test/java/org/apache/xml/security/test/stax/performance/PerformanceTimingTest.java Thu Oct 25 08:59:46 2018
@@ -36,8 +36,8 @@ public class PerformanceTimingTest exten
     private static final int runs = 40;
     private static final int xmlResizeFactor = 1000;
 
-    private static Map<Integer, File> signedFiles = new TreeMap<Integer, File>();
-    private static Map<Integer, File> encryptedFiles = new TreeMap<Integer, File>();
+    private static Map<Integer, File> signedFiles = new TreeMap<>();
+    private static Map<Integer, File> encryptedFiles = new TreeMap<>();
 
 
     @Override